Lesson 1

A

Locked — confirm your name above to unlock this section.

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.

  • Ten coin flips, three times over.
  • The strip fills one flip at a time.
  • The tally keeps the head count from every round.
flips so far: 0 / 10  |  heads: 0

Controls

To open the Pause

  • Flip ten coins, three times over. 0 of 3 rounds
Three rounds done.

R code

set.seed(42)flips <- rbinom(10, size = 1, prob = 0.5)sum(flips)   # count of heads

Pause

Complete Stage A to unlock this section.
RoundHeadsTails
Look at the three rounds you actually flipped. What number of heads would have left you as often above as below?
heads
Now the same question across all hundred and three rounds. What number of heads leaves you as often above as below?
heads

B

Complete Stage A to unlock this section.

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.

  • Type a height, then draw ten people against it.
  • Every draw is a real measurement from seven thousand adults.
  • A round ends after ten. Then predict again, knowing what you now know.
  • You are through when a round comes back balanced — over about as often as under, and by about as much.
you expect:  |  this round: 0 / 10  |  overestimated: 0  |  underestimated: 0  |  average error: — how wrong one number leaves you when it is all you have

Controls

cm

To open Stage C

  • Bring a round back balanced — over about as often as under, and by about as much. no rounds yet
Stage C is open.

R code

# 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)

C

Complete Stage B to unlock this section.

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.

  • Thirty more people, and you keep the number you already settled on.
  • Grey: the first thirty. Red: these thirty.
your number: cm  |  drawn: 0 / 30  |  taller than your number: 0  |  shorter: 0  |  average error:

Controls

To finish the lesson

  • Draw all thirty. 0 of 30
  • Answer the question below.
Thirty drawn.
Your number sat in the middle of the first thirty. How far would you have to move it to sit in the middle of these thirty?
cm

R code

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)