Exact p-values for a coin

Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

About this lesson

Statistics (AP-aligned) › Significance tests

To save a PDF, choose “Save as PDF” in the print dialog.

Sources and credits

Original sedifier lesson.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits

Exact p-values for a coin

Significance tests.

Discover

You suspect a coin favors heads. You flip it 8 times and get 8 heads. If the coin were fair, how likely is that?

  1. (12)8=1256≈0.4 %\left(\tfrac{1}{2}\right)^8 = \tfrac{1}{256} \approx 0.4\,\%
  2. 816=50 %\tfrac{8}{16} = 50\,\%

Key idea

Exact p-values for a coin.

For nn flips of a fair coin:

  • P(all n heads)=12nP(\text{all } n \text{ heads}) = \dfrac{1}{2^n};
  • P(at least n−1 heads)=n+12nP(\text{at least } n - 1 \text{ heads}) = \dfrac{n + 1}{2^n}.

These are one-sided p-values for 'the coin favors heads'.

Worked example

10 flips, 9 or more heads.

1+10=111 + 10 = 11 out of 210=10242^{10} = 1024
Count the outcomes.
≈0.011\approx 0.011: significant at the 5 % level
p-value.

Your turn, guided

Your turn: 5 flips, all heads: p-value as a fraction?

132\dfrac{1}{32}
125\dfrac{1}{2^5}.

Practice ★

  1. A fair coin is flipped 11 times. Find the probability (as a fraction) that all 11 flips are heads.
  2. A fair coin is flipped 7 times. Find the probability (as a fraction) that all 7 flips are heads.
  3. A fair coin is flipped 10 times. Find the probability (as a fraction) that all 10 flips are heads.

Practice ★★

  1. A fair coin is flipped 5 times. Find the p-value (as a fraction) for getting at least 4 heads.
  2. A fair coin is flipped 7 times. Find the p-value (as a fraction) for getting at least 6 heads.

Exit ticket

Two questions to check.

  1. A fair coin is flipped 11 times. Find the probability (as a fraction) that all 11 flips are heads.
  2. A fair coin is flipped 7 times. Find the probability (as a fraction) that all 7 flips are heads.

Summary card

Coin p-values

  • All heads: 12n\dfrac{1}{2^n}.
  • At least n−1n - 1: n+12n\dfrac{n + 1}{2^n}.

Sign tests in medicine use exactly this idea: did more patients improve than chance allows?

Sources and credits

Original sedifier lesson.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits