and would wish to reduce them such that they have the same data.

In[1329]:= Dimensions[NewMeanA]

Out[1329]= {6200, 2}

In[1330]:= Dimensions[NewMeanB]

Out[1330]= {12400, 2}

How can reduce NewMeanB to the size of 6200 or change NewMeanA to 12400 and not affecting the calculated mean values? Appreciate some help here. Thank you.

  • 1
    $\begingroup$ ArrayResample might do what you're looking for. $\endgroup$
    – Carl Lange
    Commented Mar 29, 2019 at 9:27
  • $\begingroup$ Thank you i will give it a try. $\endgroup$
    – ljsg
    Commented Mar 29, 2019 at 9:29
  • $\begingroup$ If you want to combine the meanvalues m1=Mean [data1,n1 ] and m2=Mean [data2,n2 ] the combined meanvalue is m=(n1 m1+n2 m2)/(n1+n2) $\endgroup$ Commented Mar 29, 2019 at 9:36

1 Answer 1


You could just double every element in NewMeanA to extend it so that it has the same dimensions as NewMeanB:

NewMeanA2 = Join @@ Transpose @ {NewMeanA, NewMeanA};
Mean[NewMeanA] == Mean[NewMeanA2]
(* {12400, 2} *)
(* True *)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.