By the end you can tell a population from a sample, choose a graph, describe a data set, find its outliers, and explain why correlation is not causation.
Lecture, 50 minutesFirst year, no statistics background
Three questions, then a quiz
Where do the data come from? about 15 min
What kind of data are they? about 7 min
What do the data say? about 22 min
Quiz and summary about 5 min
Why statistics?
Statistics is the science of collecting, describing and drawing conclusions from data.
It works in the presence of variation and uncertainty.
Image placeholder: John Snow's 1854 street map of Soho, with each cholera death marked as a dot and the Broad Street pump
Part 1 · Where do the data come from?
A map of deaths pointed to the cause
In 1854 John Snow marked each cholera death on a street map. The deaths clustered around one water pump on Broad Street. The pump's handle was removed.
Image placeholder: the Literary Digest magazine, 1936 issue (cover or masthead)
Part 1 · Where do the data come from?
A huge biased sample is worse than a small, good one
1936: about 10 million ballots mailed, about 2.4 million returned.
Drawn largely from telephone directories and car-registration lists.
It predicted Landon would beat Roosevelt. Roosevelt won about 61% of the popular vote.
George Gallup's sample of about 50,000 correctly predicted Roosevelt's win.
Part 1 · Vocabulary
We want to know the population; we only measure a sample
Population: the whole group. Sample: the part we collected data from.
Part 1 · Sampling
Random samples spread across the population; convenience samples clump
Illustrative dot grids, not real data. Each dot is one person; the bright dots are the sample.
Part 1 · Sampling methods
Four methods use chance; convenience sampling is the one to avoid
How it works
Example
Simple random
every n-person group has the same chance
100 student IDs drawn at random
Stratified
random sample from each group
25 students from each year
Cluster
random whole groups
5 lecture sections, all surveyed
Systematic
every k-th after a random start
every 20th name on the list
Convenience
not random: avoid
asking friends in the cafeteria
Part 1 · Bias
Bias: four ways a sample misleads, and size fixes none of them
Selection bias
The way the sample is chosen leaves out part of the population.
Non-response bias
The people who do not respond differ from those who do.
Response bias
Question wording or setting pushes people towards an answer.
Voluntary response bias
Only people with strong opinions choose to take part.
A bigger sample does not fix bias
It only makes a biased answer look more precise.
Part 1 · Study design
Only a randomised experiment can show cause and effect
Observational study
Researchers observe without assigning treatments, e.g. surveying students about sleep and grades. It shows association, not cause and effect.
Experiment
Researchers assign the treatments and compare outcomes, with a control group, random assignment, and a placebo and blinding where possible.
Part 2 · Types of variables
Every variable is either categorical or numerical
Watch out: numbers are not always numerical. A postcode or a student ID is categorical; averaging it means nothing.
Part 2 · Levels of measurement
Only ratio data have order, equal intervals and a true zero
Nominal
Ordinal
Interval
Ratio
Order?
no
yes
yes
yes
Equal intervals?
no
no
yes
yes
True zero?
no
no
no
yes
Example
eye colour
race finishing position
temperature in °C
weight, income, time
Why it matters
20 °C is not twice as hot as 10 °C. 20 kg is twice 10 kg.
Interval data have no true zero; ratio data do.
Part 3 · Graphs
Plot before you compute, using the graph that fits the variable
Data
Graph
What it shows
Categorical
bar chart or pie chart
counts or percentages
Numerical
histogram
shape of the distribution
Numerical
box plot
five-number summary, outliers
Two numerical
scatter plot
direction, form, strength
Over time
line graph
trends
Part 3 · Always plot first
Same summary numbers, four completely different pictures
9mean of x in each data set
7.50mean of y, about
0.816correlation, about
0.5slope of the regression line, y = 3 + 0.5x
Anscombe's quartet (1973): four data sets of 11 points each
Part 3 · Shape and centre
Right skew pulls the mean above the median
Illustrative curves. In a right-skewed distribution the mean is above the median; in a left-skewed one it is below. Use the median for skewed data such as incomes.
Part 3 · Centre
The mean shares out the total; the median takes the middle
x̄ = Σx / n
Σx
add all the values
n
how many values
Median
middle of the ordered data; average the two middle values if n is even
Mode
the most frequent value
Worked example · commute times
Ten commutes give three different centres
26minmean: 260 ÷ 10
21minmedian: average of 20 and 22
15minmode: appears twice
Commute times in minutes, 10 students: 12, 15, 15, 18, 20, 22, 25, 27, 30, 76
Part 3 · Outliers and centre
One 76-minute commute moves the mean, but barely the median
All ten commutes
Without the 76
Mean
26 min
about 20.4 min
Median
21 min
20 min
Part 3 · Spread
The outlier stretches the range; the IQR covers the middle 50%
One 76-minute outlier triples the standard deviation
s = √( Σ(x − x̄)² / (n − 1) )
x̄
the sample mean
n − 1
for a sample we divide by n − 1, not n; this corrects for the sample mean sitting closer to the data than the true mean
With the 76: s ≈ 18.5 min. Without it: s ≈ 6.1 min.
Part 3 · Outliers
The 1.5 × IQR rule flags the 76-minute commute
Fences: Q1 − 1.5 × IQR = 15 − 18 = −3 and Q3 + 1.5 × IQR = 27 + 18 = 45. The whiskers reach 12 and 30; the 76 is an outlier.
Part 3 · z-scores
A z-score says how many SDs a value sits from the mean
z = (x − mean) / SD
x
the value we are looking at
SD
the standard deviation of the data
Exam: mean 70, SD 8. A score of 86 has z = (86 − 70) / 8 = 2: two SDs above the mean.
Part 3 · Bell-shaped data
For bell-shaped data, about 68%, 95% and 99.7% lie within 1, 2 and 3 SDs
Exam example (mean 70, SD 8): about 68% of scores fall between 62 and 78, about 95% between 54 and 86, about 99.7% between 46 and 94. The rule applies only to roughly bell-shaped data, not to skewed data such as the commute times.
Part 3 · Correlation
Ice cream does not cause drownings; hot weather drives both
Hot weather is a confounding variable. Other reasons for correlation without causation: reverse causation, and coincidence, especially when many variables are searched.
Quiz · 1 of 3
Check your understanding
Is "favourite colour" categorical or numerical, and at what level?
Categorical, nominal
A survey about exercise habits only asks people leaving a gym. What is the problem?
Selection bias from a convenience sample: gym-goers exercise more than the population.
Quiz · 2 of 3
Check your understanding
Find the mean and median of 2, 4, 4, 5, 10.
Mean 5, median 4
Which is resistant to outliers: the mean or the median?
The median
Quiz · 3 of 3
Check your understanding
An exam has mean 70 and SD 8. What is the z-score of 82?
1.5, since (82 − 70) / 8 = 1.5
Ice-cream sales and drownings are correlated. Does ice cream cause drowning?
No. Hot weather is a confounding variable.
Summary
Collect carefully, plot first, then describe with centre and spread
Design matters more than size
Random sampling and randomised experiments. A bigger biased sample does not help.
Know the variable
Categorical (nominal, ordinal) or numerical (discrete, continuous).
Plot before you compute
Anscombe's quartet: the same summary numbers, four different pictures.
Centre and spread
Mean (sensitive) or median (resistant); range, IQR, SD; outliers beyond 1.5 × IQR.
Correlation is not causation
Look for confounders. Next module: probability, the language of uncertainty.