Mean

Author

Eric W. Weisstein
February 16, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Statistics/Mean.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Mean.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<Statistics`DescriptiveStatistics`

Order

l={HarmonicMean,GeometricMean,ArithmeticGeometricMean@@#&,Mean,RootMeanSquare};
means=Through[l[{a,b}]]

Transpose[{HoldForm[#[a,b]]&/@l,means}]//TableForm

Refine[LessEqual@@means,0≤a≤b]

FullSimplify[LessEqual@@means,0≤a≤b]

Refine[(Sqrt[a b])≤(((a+b) π)/(4 EllipticK[((((a-b))^2)/(((a+b))^2))]))≤((a+b)/2),0<a<b]

And@@Table[(Sqrt[a b])≤ArithmeticGeometricMean[a,b]≤((a+b)/2)/.Thread[{a,b}->Sort[Table[Random[Real,{0,10}],{2}]]],{1000}]

FunctionExpand[ArithmeticGeometricMean[a,b]]

FunctionExpand[ArithmeticGeometricMean[a,b],a>0&&b>0]

Graphic

<<Statistics`DataManipulation`
<<Graphics`Graphics`
<<Graphics`Arrow`

d=Table[Random[NormalDistribution[0,1]],{50}];

Median[d]

Mean[d]

Mode[d]

d

barLabels[x0_,x1_,{dx_,ddx_}]:=Module[{i},
Flatten[Table[{ToString[i],Table["",{dx/ddx-1}]},{i,x0,x1,dx}]]
]

barLabels[-3,3,{1,.25}]

Show[{
BarChart[BinCounts[d,{-3,3,.25}],BarSpacing->0,
BarLabels->barLabels[-3,3,{1,.25}],PlotRange->All],
Graphics[Arrow[{(3+Median[d])/.25,-3},{(3+Median[d])/.25,0}]]
},
PlotRange->All
]