Deviation and Variance Worksheet
Statistics · Measures of spread

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.

A · Recap B · Guided example C · Concept check D · Practice
A

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

di = xi − x̄

Distance of one value from the mean. Signed: positive above, negative below. Deviations always sum to zero.

Variance

σ² = Σ(x − μ)²N   s² = Σ(x − x̄)²n − 1

Average squared deviation. Population divides by N; sample divides by n − 1 (Bessel's correction). Units are squared.

Standard deviation

σ = √σ²    s = √s²

Square root of variance, back in the data's own units. For roughly normal data, about 68% of values lie within ±1 SD.

B

Guided example

Work out the spread of this dataset step by step.

Step 1 · Mean
HintAdd all eight values, then divide by 8.
Step 2 · Deviations and squared deviations
xx − x̄(x − x̄)²
Σ
HintSubtract the mean from each value. A negative deviation squared is positive. What should the deviations add up to?
Picture it

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.

Step 3 · Variance and standard deviation
Treat the data as a…VarianceSD
Population (÷ N)
Sample (÷ n − 1)
HintDivide your Σ(x − x̄)² by 8 for the population and by 7 for the sample. Then take square roots.
C

Concept check

Pick one answer for each question.

D

Practice with new data

Each press of New dataset gives fresh numbers. Choose whether to treat them as a population or a sample.

0 / 0 correct
E

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