Descriptive Statistics

Measures of Location

Sample Mean

By definition, the sample mean is

Overscript[x, _] = Underoverscript[∑, i = 1, arg3] x_i

for a sample

In[18]:=

x = {76, 69, 72, 66, 75, 69}

Out[18]=

{76, 69, 72, 66, 75, 69}

In[19]:=

Sum[x[[i]], {i, 1, Length[x]}]/Length[x]

Out[19]=

427/6

Alternatively, we can make the same computation with the built in Mathematica function "Mean"

In[20]:=

Mean[x]

Out[20]=

427/6

[Trimmed mean?]

In[21]:=

Median[x]

Out[21]=

141/2

Variability

Sample Variance

In[23]:=

Sum[(x[[i]] - Mean[x])^2, {i, 1, Length[x]}]/(Length[x] - 1)

Out[23]=

449/30

In[24]:=

Variance[x]

Out[24]=

449/30

Sample Standard Deviation

In[25]:=

√ (Sum[(x[[i]] - Mean[x])^2, {i, 1, Length[x]}]/(Length[x] - 1))

Out[25]=

449/30^(1/2)

In[26]:=

StandardDeviation[x]

Out[26]=

449/30^(1/2)

Sample Range

In[27]:=

Max[x] - Min[x]

Out[27]=

10


Created by Mathematica  (July 20, 2006) Valid XHTML 1.1!