Deviation, variance & standard deviation
Work through each part in order. Type your answers into the boxes and press Check. Round decimals to 2 places; answers within 0.01 are accepted.
The three ideas
Each measure builds on the one before it. Deviation looks at one value; variance and standard deviation summarise the whole dataset.
Deviation
Distance of one value from the mean. Signed: positive above, negative below. Deviations always sum to zero.
Variance
Average squared deviation. Population divides by N; sample divides by n − 1 (Bessel's correction). Units are squared.
Standard deviation
Square root of variance, back in the data's own units. For roughly normal data, about 68% of values lie within ±1 SD.
Guided example
Work out the spread of this dataset step by step.
Hint
Add all eight values, then divide by 8.| x | x − x̄ | (x − x̄)² |
|---|---|---|
| Σ |
Hint
Subtract the mean from each value. A negative deviation squared is positive. What should the deviations add up to?Each row is one value. The bar runs from the mean (dashed line) to the value: its length is the deviation. Bars to the left and right balance out exactly.
| Treat the data as a… | Variance | SD |
|---|---|---|
| Population (÷ N) | ||
| Sample (÷ n − 1) |
Hint
Divide your Σ(x − x̄)² by 8 for the population and by 7 for the sample. Then take square roots.Concept check
Pick one answer for each question.
Practice with new data
Each press of New dataset gives fresh numbers. Choose whether to treat them as a population or a sample.
Check it in Python
Libraries disagree on the default. Run this and match each line to the population or sample answer from Part B.
import statistics as st import numpy as np data = [2, 4, 4, 4, 5, 5, 7, 9] print(st.pvariance(data), st.pstdev(data)) # population print(st.variance(data), st.stdev(data)) # sample print(np.std(data)) # population by default print(np.std(data, ddof=1)) # sample