Humans like patterns, and we look for them everywhere. This is dangerous, because asserting that a pattern exists and needs explanation is you imposing a particular order on the world — we need to be cautious about doing that.
Statistics, at a fundamental level, is a rigorous way of assessing if a particular assertion of order is necessary to explain something we observe in the world. It pushes against our natural intuition, and lets us assess when we have good evidence to overturn a mental model of the world.
For this activity you are going to flip a coin ten times. It is a fair coin, working just the same as a quarter in the real world, and you are going to record how many heads and tails you get. Streakiness and patterns invite our minds to come up with an explanation whether one is needed or not.
set.seed(42)flips <- rbinom(10, size = 1, prob = 0.5)sum(flips) # count of heads
| Round | Heads | Tails |
|---|
Most of the time you have to act in the face of uncertainty, but you still need to make some prediction. Sometimes your data is very limited.
I will tell you one thing: I am 198 centimetres tall. On that basis alone, predict the height of a person drawn at random from real measurements.
Then draw ten of them. Use what those ten tell you to predict the next ten, and keep going — updating your best prediction on the information you have — until you are wrong in each direction as often as the other, and by the same amount.
# 30 random adult heights from real data.nh <- read.csv("data/clean/nhanes_adults.csv")set.seed(7)truths <- sample(nh$Height, 30)guess <- ___ # type a value; aim for an average error near zeromean(guess - truths)
The purpose of statistics is to help determine when we need to update our mental models — our mental explanation of the world around us — and how we should do so in the light of new data.
Presented below in grey is the same distribution you have already seen. Now observe thirty more people, and see what that does to your model of what is happening.
nh <- read.csv("data/clean/nhanes_adults.csv")set.seed(73)second <- sample(nh$Height, 30)guess <- ___ # the number you kept from beforemean(guess - second)sum(second > guess); sum(second < guess)