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)

Search this site

 

 

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
445
530
540
510
570
530
545
545
505
535
450
500
520
460
430
520
520
430
535
535
475
545
420
495
485
570
480
495
470
490

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 - 120120 - 130130 - 140140-170
Class mid-point 110125135155
Number of birds 231562

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 110125135155
Deviation from mean ( y ) − 10.14.914.934.9
Squared deviation ( y2 ) 102.024.01222.01218
Number of birds ( f ) 231562
fy2 2346360.213322436

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
133
226
329
432
531
Σ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
Cow
No.
PCVsi2 di2
1.2.
1333524
226234.59
3292900
432354.59
531284.59
6313100
731344.59
8312924
9353324
1021244.59
Sum   28.557

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.