Two common descriptions of data
Location (or central tendency)
Describing data
Width (or spread)
Chapter 3
Measures of location Mean
Mean
Median
Mode
n is the size of the sample
Mean Median
The median is the middle
Y1 = 56, Y2 = 72, Y3 = 18, Y4 = 42 measurement in a set of ordered
data.
! (56+72+18+42) / 4 = 47
"=
The data:
Mode
18 28 24 25 36 14 34
The mode is the
can be put in order: most frequent
14 18 24 25 28 34 36 measurement.
Median is 25.
The mean is the center of gravity;
the median is the middle measurement.
Mean and median for US
household income, 2005
Median $46,326
Mean $63,344
Mode $5000-$9999
Why?
University student heights
Mean 169.3 cm
Median 170 cm
Mode 165-170 cm
Measures of width Range
14 17 18 20 22 22 24
• Range
25 26 28 28 28 30 34 36
• Standard deviation
• Variance
• Coefficient of variation The range is the maximum minus the
minimum:
36 -14 = 22
The range is a poor measure of Variance in a population
distribution width
Small samples tend to give lower ( "
estimates of the range than large "
∑%&' )% − +
! =
samples ,
So sample range is a biased estimator of
the true range of the population.
N is the number of individuals in the population.
µ is the true mean of the population.
Example: Sample variance
Sample variance (in units of
Family sizes of 5 BIOL 300 students: 2 3 3 4 4 siblings)
2 + 3 + 3 + 4 + 4 16
+* = = = 3.2
5 5
∑(%&' )% − )+ " 2 -1.2 1.44
" ∑5234 +2 − +* "
! = 3 -0.2 0.04
!" =
7−1
,−1 3 -0.2 0.04
4 0.8 0.64
2.80 (in units of
!" = = 0.70 siblings
4 0.8 0.64 4 squared)
Sums: 16 2.80
n is the sample size
“Sum of squares”
Shortcut for calculating sample Example: Sample variance (shortcut)
variance Family sizes of 5 BIOL 300 students: 2 3 3 4 4
2+3+3+4+4
,- = = 3.2
5
∑+()* ,("
2 4 -1.2 1.44
$
!" = − ,- " 3 9 -0.2 0.04
!" =
$ ∑+()* ,("
− ,- "
$−1 $ 3 9 -0.2 0.04
$−1 $
4 16 0.8 0.64
. ./
4 16 0.8 0.64 !" = − 3.2 "
=0.70
/ .
Sums: 16 54 2.80
Standard deviation (SD)
Positive square root of the variance
s is the true standard deviation
s is the sample standard deviation:
∑(%&' )% − )+ #
!= !# =
,−1
! # = 0.70 people2
! = 0.70 = 0.84 people
Coefficient of variation (CV) Skew
Skew is a measurement of asymmetry.
' Skew (as in "skewer") refers to the
!" = 100% pointy tail of a distribution
)(
Nomenclature Basic stats in R
Population Sample > mean(classHeightDataFull$height)
[1] 169.7955
Parameters Statistics
> median(classHeightDataFull$height)
Mean [1] 170
Variance s2 > sd(classHeightDataFull$height)
[1] 11.48828
Standard s > var(classHeightDataFull$height)
Deviation [1] 131.9807
Manipulating means Manipulating variance
• The mean of the sum of two variables: • The variance of the sum of two variables:
E[X + Y] = E[X]+ E[Y] Var[X + Y] = Var[X]+ Var[Y]
if and only if X and Y are independent.
• The mean of the sum of a variable and a
• The variance of the sum of a variable and a
constant: E[X + c] = E[X]+ c constant: Var[X + c] = Var[X]
• The mean of a product of a variable and a • The variance of a product of a variable and a
constant: E[c X] = c E[X] constant: Var[c X] = c2 Var[X]
Example: converting units
Height:
Mean = 169.8 cm
Variance = 131.98 cm2
In inches (1 cm = 0.394 in):
Mean: 169.8 cm ✕ 0.394 = 66.9 in
Variance: 131.98 cm2 (0.394)2 = 20.5 in2