Worked example
A sample variance from five systolic pressures, step by step. A nurse records the systolic blood pressures of five patients seen during one clinic session: 118, 124, 130, 136 and 142 mm Hg. The readings are a sample of the many patients the clinic sees, so the sample variance is required. Work through the deviation table and give the variance with its units.
- Find the sample mean. Add the five readings: 118 + 124 + 130 + 136 + 142 = 650. Divide by the number of readings, 5: x̄ = 650 ÷ 5 = 130 mm Hg.
- Subtract the mean from each reading to get the deviation x − x̄. A reading below the mean gives a negative deviation; one above gives a positive deviation. The five deviations are −12, −6, 0, +6 and +12 mm Hg.
- Square each deviation, one row at a time: (−12)² = 144, (−6)² = 36, 0² = 0, 6² = 36 and 12² = 144. The unit becomes mmHg².
- Add the squared deviations down the last column: Σ(x − x̄)² = 144 + 36 + 0 + 36 + 144 = 360 mmHg².
- Divide by n − 1, because this is a sample of five: 360 ÷ (5 − 1) = 360 ÷ 4 = 90 mmHg². The sample variance is 90 mmHg², a squared-unit number, and its square root would return a typical distance in millimetres of mercury.
The routine never changes: mean, then deviation, then squared deviation, then the sum, then divide by n − 1 for a sample. Checking that the deviations add to zero before squaring them catches an arithmetic slip while it is still cheap to fix, and the unit on the answer tells you whether you have finished or still owe the reader a square root.
Tutorial 1 — completing a full deviation table
A clinic records the systolic blood pressures of five patients: 125, 131, 125, 137 and 132 mm Hg. These five are a sample. Complete the deviation table column by column and produce the sample variance, writing the unit on every line.
Rule used: For a sample, s² = Σ(x − x̄)² ÷ (n − 1), where x is each observation in the original unit, x̄ is the sample mean in the same unit, n is the number of observations, and s² is the variance in the unit squared, here mmHg². The sum runs over every observation.
Write the five readings in a column and add them. Give the total with its unit.
Reveal this step
125 + 131 + 125 + 137 + 132 = 650 mm Hg. Reading the column twice before trusting the total is what keeps every later row honest.
How many observations are there, and what number will you divide by at the end?
Reveal the answer
There are n = 5 observations. Because the five patients are a sample, the divisor is n − 1 = 4, not 5. Dividing by 4 makes the answer slightly larger, which is the intended correction for a sample.
Compute the mean and write it with its unit.
Reveal this step
x̄ = 650 ÷ 5 = 130 mm Hg. To check it, notice that 125 and 137 sit symmetrically around 130, so the centre is plausible before any further arithmetic.
For each reading compute the deviation x − x̄ and write the five deviations in a column.
Reveal this step
125 − 130 = −5; 131 − 130 = +1; 125 − 130 = −5; 137 − 130 = +7; 132 − 130 = +2. All values are in mm Hg.
Add the five deviations. What total must you get, and what does that tell you?
Reveal the answer
−5 + 1 + (−5) + 7 + 2 = 0. The deviations of any dataset always sum to zero when the mean is exact, so a total other than zero is a signal that the mean or one deviation is wrong.
Square each deviation and add the squares. Keep the unit squared on every line.
Reveal this step
(−5)² = 25; 1² = 1; (−5)² = 25; 7² = 49; 2² = 4. The sum is 25 + 1 + 25 + 49 + 4 = 104 mmHg².
Divide the sum of squares by the correct divisor and state the sample variance with its unit. What single extra step would put the answer back on the scale of a blood pressure?
Reveal the answer
s² = 104 ÷ 4 = 26 mmHg². Taking the square root, √26 ≈ 5.1 mm Hg, would return the measure to millimetres of mercury; that square root is the standard deviation, which is the subject of the next section.
Answer: The sample mean is 130 mm Hg, the sum of squared deviations is 104 mmHg², and the sample variance is s² = 104 ÷ 4 = 26 mmHg².
Keep this habit: Build the table in strict columns — observation, deviation, squared deviation — and check that the deviations sum to zero before you square anything. If the deviations do not cancel, the mean is wrong, and every square below it will be wrong too. Finish by naming the divisor out loud: N for a population, n − 1 for a sample.
Tutorial 2 — why the deviations are squared, not added
A learner takes the five pulse rates 72, 80, 76, 84 and 78 beats per minute, works out the five deviations from the mean, adds them, gets zero, and concludes that the patients do not vary at all. Use the same data to show what zero really means and why squaring is the repair.
Rule used: The mean of the signed deviations is always zero, so it measures nothing. The variance therefore uses the squared deviation (x − x̄)², whose unit is the observation unit squared, and averages those: s² = Σ(x − x̄)² ÷ (n − 1) for a sample, in beats/min².
Compute the mean of the five pulse rates and write it with its unit.
Reveal this step
72 + 80 + 76 + 84 + 78 = 390; x̄ = 390 ÷ 5 = 78 beats per minute.
Write the five deviations and add them. What is the total, and does it prove the patients are identical?
Reveal the answer
The deviations are −6, +2, −2, +6 and 0, and their sum is exactly zero. It does not prove the patients are identical; it happens for every dataset, because the mean is by construction the balance point where the negative distances equal the positive ones.
If you dropped the minus signs and added the absolute deviations, you would get a real measure. Give that total, then say why squaring is preferred.
Reveal the answer
The absolute deviations are 6, 2, 2, 6 and 0 and their total is 16 beats per minute. Squaring is preferred because it removes the signs while remaining ordinary multiplication, and because it gives extra weight to observations far from the mean, which is exactly the behaviour a measure of spread should have.
Square the five deviations and add the squares, keeping the unit squared.
Reveal this step
(−6)² = 36; 2² = 4; (−2)² = 4; 6² = 36; 0² = 0. The sum is 36 + 4 + 4 + 36 + 0 = 80 beats/min².
Five patients form a sample. Divide by n − 1 and give the sample variance. Why must this answer never be read as “patients sit 20 beats per minute from the mean”?
Reveal the answer
s² = 80 ÷ 4 = 20 beats/min². The unit is squared, so 20 is not a distance on the pulse scale; the typical distance is √20 ≈ 4.5 beats per minute, and only that square root can be compared with a real pulse rate.
Answer: The signed deviations sum to 0 and teach nothing; the squared deviations sum to 80 beats/min², and the sample variance is 80 ÷ 4 = 20 beats/min².
Keep this habit: A sum of deviations that comes to zero is not evidence of sameness; it is the mathematical signature of a correct mean. Square before you add, keep the squared unit visible on the line, and remember that a variance figure can only be interpreted after a square root has restored the original unit.
Tutorial 3 — why the divisor is n − 1
A colleague computes the variance of the five pressures 118, 124, 130, 136 and 142 mm Hg, divides the sum of squares by 5, obtains 72 mmHg², and labels it the sample variance. The sum of squared deviations is 360 mmHg². Work through both divisors and decide which figure is defensible for a sample.
Rule used: The sample variance is s² = Σ(x − x̄)² ÷ (n − 1), with the squared deviations in the observation unit squared and n − 1 one less than the sample size. The population variance σ² = Σ(x − μ)² ÷ N uses the full population size N and the population mean μ instead.
Before any division, state what each symbol in the sample formula stands for and which unit each carries.
Reveal the answer
x is each observed pressure in mm Hg, x̄ is the sample mean also in mm Hg, (x − x̄)² is the squared deviation in mmHg², n is the number of observations and has no unit, and s² is the sample variance in mmHg².
Divide 360 mmHg² by 5 and record the result.
Reveal this step
360 ÷ 5 = 72 mmHg². This is the population variance for those five pressures, because it treats the five as the complete group and divides by N.
Now divide 360 mmHg² by 4 and record the result.
Reveal this step
360 ÷ 4 = 90 mmHg². This is the sample variance, and it is the larger of the two numbers because a smaller divisor enlarges the quotient.
Why does dividing by 4 rather than 5 give the more honest figure when these patients are a sample?
Reveal the answer
A sample tends to be less spread out than the whole population, partly because the sample mean is fitted to that very sample, so dividing by n alone would systematically understate the true variability. Dividing by n − 1 removes that downward bias; this adjustment is known as Bessel’s correction.
If the five pressures were the complete set of interest — every patient in a tiny unit — which divisor would you use, and what would the variance be?
Reveal the answer
You would use N = 5 and report σ² = 360 ÷ 5 = 72 mmHg². The question to ask is never “which formula is easier?” but “did I measure everyone in the group I am describing, or only part of it?”.
Answer: For the five pressures the sum of squared deviations is 360 mmHg²: the population variance is 72 mmHg² with N = 5, and the sample variance is 90 mmHg² with n − 1 = 4.
Keep this habit: Decide whether your data are a population or a sample before you write the division line, because that single choice changes the answer. In nursing and medical research the sample formula is the usual one, and its denominator n − 1 is not a typographical error but a deliberate correction for the tendency of small samples to look less variable than the population they come from.
Now you try
Attempt each one on paper first. Write the formula, substitute the numbers, then check the unit of your answer.
A ward records five fasting glucose results in mg/dL: 88, 92, 95, 101 and 104. Compute the sample variance through a deviation table, showing the mean, each deviation, each squared deviation, the sum of squares and the final division.
Hint
Add the five values first and divide by 5; then check that your five deviations add to zero before you square any of them.
Show the worked answer
88 + 92 + 95 + 101 + 104 = 480, so x̄ = 480 ÷ 5 = 96 mg/dL. The deviations are −8, −4, −1, +5 and +8, which sum to zero. Their squares are 64, 16, 1, 25 and 64, summing to 170 mg²/dL². Because the five patients are a sample, divide by n − 1 = 4: s² = 170 ÷ 4 = 42.5 mg²/dL², a squared-unit figure whose square root would return the result to mg/dL.
Two patients take six temperature readings each. Patient A: 36.8, 37.0, 37.1, 36.9, 37.0, 37.2 °C. Patient B: 36.2, 38.9, 36.4, 38.6, 36.1, 39.0 °C. Compute the range for each patient and explain what the two ranges tell you clinically.
Hint
The range uses only two numbers per patient. Find the maximum and the minimum in each list before subtracting anything.
Show the worked answer
Patient A: maximum 37.2, minimum 36.8, so the range is 37.2 − 36.8 = 0.4 °C. Patient B: maximum 39.0, minimum 36.1, so the range is 39.0 − 36.1 = 2.9 °C. Patient A’s temperature is stable across the six readings, so a single reading describes the situation well. Patient B swings nearly three degrees, alternating between near-normal and febrile values; the range warns you immediately that a single temperature would mislead, even though both patients could share the same mean.
A laboratory reports a potassium variance of 0.16 mmol²/L² for one group of patients and 0.81 mmol²/L² for another. Which group is more variable, by what arithmetic, and which single extra step would express both figures in mmol/L?
Hint
Compare the variances as they stand first, then remember what operation undoes a square.
Show the worked answer
The second group is more variable, because 0.81 is larger than 0.16. Taking the square root of each variance expresses both on the original scale: √0.16 = 0.4 mmol/L and √0.81 = 0.9 mmol/L, so a typical patient in the second group lies about 0.9 mmol/L from the group mean compared with 0.4 mmol/L in the first. Note that the variances themselves cannot be read as mmol/L; the squared units must first be undone by the square root.
Common misconception
Beginners often say that because the deviations always add to zero, the observations must be identical, or that the variance is a kind of average distance and can be read straight off the original scale. Both beliefs come from the same missing step. The deviations cancel because the mean is their balance point, not because the patients are the same; squaring each deviation before adding is what converts that useless zero into a real measure of spread. And because squaring multiplies the unit by itself, a variance of 90 mmHg² is not 90 mm Hg — it sits on a squared scale and only its square root returns to millimetres of mercury.
Check your reasoning
Explain in your own words why a medical study almost always divides the sum of squared deviations by n − 1 rather than by n, and what would go wrong if it divided by n.
Reveal an answer
A medical study measures a sample in order to describe a larger population it cannot examine in full. The sample mean is calculated from that same sample, so the observations are inevitably a little closer to their own mean than to the unknown population mean, and the sample looks slightly less variable than the population really is. Dividing by n keeps that downward distortion; dividing by n − 1, which is a slightly smaller number, enlarges the result and removes most of the bias. This is Bessel’s correction, and it matters because a variance that is systematically too small would understate the true spread of the population and make clinical variation look narrower than it is.
Where this comes from
- BMS 1110 Applied Mathematics and Medical Biostatistics lecture notes (supplied) · Lines 842–879: measures of dispersion as a family (lines 842–849); the range as Maximum − Minimum with the worked example 17 − 5 = 12 (lines 850–860); the introduction to variability and the fact that the mean does not show how closely observations are grouped (lines 868–871); variance as the average squared deviation from the mean (lines 872–873); population variance σ² = Σ(x − μ)² ÷ N with its symbols (lines 874–876); sample variance s² = Σ(x − x̄)² ÷ (n − 1) with the note that medical studies commonly use samples and therefore n − 1 (lines 877–879).
- BMS 1110 Applied Mathematics and Medical Biostatistics lecture notes (supplied) · Lines 868–870 repeat within the section’s range and fix the section’s clinical framing: age, weight, blood pressure, pulse rate, glucose and haemoglobin vary between individuals, and dispersion measures exist precisely because the mean does not show how closely observations are grouped.
- Beyond the supplied notes: Bessel’s correction and the reason for n − 1 · The supplied notes use n − 1 in the sample variance (line 878) without explaining it. The bias of the n divisor, the notion of degrees of freedom, the computational formula Σx² − (Σx)² ÷ n, the scaling rules for adding and multiplying constants, and the bedside examples of reading variability are standard statistical knowledge added here and labelled as beyond the notes.
- Note on the course code · The supplied cover page reads “Course Number: BMS 110”. The curriculum catalogue in this project records “BMS 1110”; the catalogue is treated as authoritative and the notes’ cover value is retained here for provenance.