7. Basic Statistics
The arithmetic mean or average of N numbers is their sum divided by their count.
The median of a list of numbers is the middle number in the sorted set if there are an odd number of elements in the list, or the average of the two middle numbers in the list if the list contains an even number of elements.
The mode of a list of numbers is the most frequently occurring element of the list. A set may have multiple modes. A mode may not be unique.
e.g. Consider \$S=[1,1,1,2,2,3,4,5,7,7,7,8,9]\$. There are 13 numbers in the list S.
The arithmetic mean or average is=\$[1+1+1+2+2+3+4+5+7+7+7+8+9]/13=57/13=4.384...\$
The median of S is: 4, the 7th element in the sorted set.
The mode of S is \$[1,7]\$. The set has two modes because both 1 and 7 occur 3 times each.

The range of a data set is the difference between its largest and smallest elements.
If you sort the data list S of n elements and split it in half:
a. n-even sets into two sets S1 and S2 of \$n/2\$ elements each or
b. n-odd sets into two sets S1 and S2 of \$n/2\$ elements each after taking out the median element of S,
Then, the median of S1 and that of S2 are called the quartiles of S
And the absolute value of their difference is called the inter-quartile range.
e.g. \$S=[1,1,1,2,2,3,4,5,7,7,7,8,9]\$;
range=\$9-1=8\$;
S1=\$[1,1,1,2,2,3]\$,
S2=\$[5,7,7,7,8,9]\$
median(S1)=3/2=1.5\$;
median(S2)=7.
The two quartiles are 1.5 and 7, and the inter-quartile range is \$7-1.5=5.5\$
These details are usually graphically depicted in a "box and whiskers" plot as shown below The geometric mean of N numbers is defined as the Nth root of the product of these N numbers.
e.g. S=\$[1,2,3,4]\$, the geometric mean= 4th root of \$(1*2*3*4)\$=4th root of \$24=2.21\$
The geometric mean is always less than the arithmetic mean unless the set S contains all equal numbers in which case the two means are equal.

 Follow @xChiPrime Tweet

By continuing to use this website, you acknowledge that this service is provided as is, with no warranty of any kind whatsoever.
Copyright 2015 ChiPrime. All rights reserved.