InfluentialPoints.com
Biology, images, analysis, design...
 Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

# Variance and standard deviation

### Calculating variance from individual observations

#### Worked example

These are the data on the weights of thirty cattle that we gave in the More Information page on Measures of location.

 Weights of cows 445530540510570 530545545505535 450500520460430 520520430535535 475545420495485 570480495470490

Using the calculator formula to calculate the variance we get:

 s2 = 7629900  − 227406400 30 29

The sample standard deviation (s) is then the square root of the variance.

Standard deviation (s)   =   √1713.3 =   41.4

### Calculating variance from a frequency distribution

#### Worked example

Let us assume you have the following observations of bird weight (in grams), which have been divided into class intervals, but you not know their individual values, nor their mean.

 Weight class 100 - 120 120 - 130 130 - 140 140-170 Class mid-point 110 125 135 155 Number of birds 23 15 6 2

Lacking their mean, we can estimate it by multiplying the mid-point of each class by the number of observations it contains.

 = (110×23) + (125×15) + (135×6) + (155×2) = 23 + 15 + 6 + 2 = 5525/46 = 120.1

Now we can work out the deviation of each mid-class from the sample mean. Then multiply the square of this deviation by the number of observations it refers to.

 Class mid-point 110 125 135 155 Deviation from mean ( y ) − 10.1 4.9 14.9 34.9 Squared deviation ( y2 ) 102.0 24.01 222 1218 Number of birds ( f ) 23 15 6 2 fy2 2346 360.2 1332 2436

We then estimate the variance of this sample as

s2 = 6474.2 / 45, or 143.9

### Calculating the corrected standard deviation for a small sample

#### Worked example

Let's take an example of packed cell volume values of five lambs:

 Lamb No. PCV 1 33 2 26 3 29 4 32 5 31 ΣY 151

The sample variance (s2) is calculated in the usual way:

 s2   = 4591   − 22801 =   7.7 5 4

The (uncorrected) sample standard deviation (s) is then:

s   =   √ 7.7 =   2.775

Since we have a very small sample (n = 5), we need to correct this by multiplying by Cn.

 Cn = √ ×  Γ({5 − 1}/2) = √2 ×  1 = 1.064 (5 − 1)/2 Γ(5/2) 1.329

The corrected standard deviation is then given by:

scorr.    =    Cn × s    =    1.064 × 2.775    =   2.953

### Calculating within-subject standard deviation

#### Worked example

Let's take an example of two repeated measurements of packed cell volume.

By taking the square root of the mean of the variances we get:
Within-subject standard deviation = √(28.5/10) = 1.688
 CowNo. PCV si2 di2 1. 2. 1 33 35 2 4 2 26 23 4.5 9 3 29 29 0 0 4 32 35 4.5 9 5 31 28 4.5 9 6 31 31 0 0 7 31 34 4.5 9 8 31 29 2 4 9 35 33 2 4 10 21 24 4.5 9 Sum 28.5 57

By taking the square root of half the mean of the differences we get:
Within-subject standard deviation = √(57/20) = 1.688

Hence, assuming the observations are normally distributed:

• the difference between a measured PCV and the true value should be less than (1.96 × 1.688) or 3.3 for 95% of observations.

• the difference between two PCV measurements on the same cow should be less than √2 × 1.96 × 1.688 or 4.68 for 95% of pairs of observations.