E ExamMaster

Statistical Inference · Statistical Inference

Hypothesis tests

In Statistical Inference because H0 and Ha are two stories about the population, and 5 of 8 is not weird enough to reject a coin.

The owner wants to say customers come back more often than not. Write two stories first, about all customers, not about Anu. The null story H0: a typical customer is a coin — come-back chance one half. The alternative Ha: the chance is not one half. Then look at the sheet. Five of eight came back. Is that weird if the coin story were true?

  • Statistical Inference
  • Medium level
  • 5 concepts

1H0 and Ha are two stories

H0, the null, is the dull story we will try to embarrass: a typical customer is equally likely to come back or not. Like a fair coin — heads come back, tails do not. Ha, the alternative, is the owner's hope: the chance is not one half.

Both stories are about the population, not about Anu. We have not yet looked at whether 5 of 8 is weird. We have only named the two claims that could be true of all customers. The sheet waits until the stories are written.

No diagram — the idea is carried by the prose, table, code block or coding lab.

Two stories
NameStory about all customers
H0Come-back chance is 1/2
HaCome-back chance is not 1/2

Coding lab. Write the coin chance runs in the app, with checks on your output.

In hypothesis testing, what role does the null hypothesis (H0) serve?
  1. The desired outcome that the researcher hopes to prove beyond all doubt
  2. The default baseline story of no effect or no difference that data must contradict to reject
  3. The probability that the sample mean equals the population variance
  4. A machine learning regularisation parameter that penalises weight growth

H0 is the conservative baseline position of no change/no effect against which evidence is weighed.

2Five of eight came back

Now read the sheet. Yes: Anu, Chitra, Esha, Farah, Gopal. No: Bala, Deepak, Hari. That is 5 of 8. Under a fair coin, 4 of 8 would be the most ordinary count — half the coins land heads. 5 is one step off that centre.

A test asks whether the observed count is weird enough, if H0 were the world, that we should stop believing H0. Weird is not a vibe. The next card counts how many of the 256 equally likely 8-customer sheets are this far from 4, or farther.

No diagram — the idea is carried by the prose, table, code block or coding lab.

Who came back, week 1
namevisitsspentplancame_back
Anu4320monthlyyes
Bala180drop-inno
Chitra6510monthlyyes
Deepak00monthlyno
Esha3240drop-inyes
Farah2150monthlyyes
Gopal5400monthlyyes
Hari160drop-inno

The observed count

How many week-1 rows came back, and how far is that from a coin's 4?

  • yes count5
  • 5 − 41

Pro tip. One step off centre. That already smells ordinary. The count of sheets will confirm it.

Coding lab. Observed yes count runs in the app, with checks on your output.

If 5 out of 8 sampled customers return, why is this not immediate evidence of customer loyalty over a fair 50/50 baseline?
  1. Flipping 5 heads in 8 fair coin tosses happens frequently purely by chance
  2. Because 5 is an odd number and odd counts cannot be evaluated in hypothesis tests
  3. Because 5 of 8 represents a 100% certainty that the return rate is exactly 62.5%
  4. Because hypothesis testing can only evaluate continuous real-valued measurements

5 out of 8 (62.5%) is well within normal random fluctuation for a fair 50% process with only 8 trials.

3Fail to reject the coin

If each customer is a fair coin, every 8-row sheet is one of 256 equally likely outcomes — 2 to the power 8. The counts 0 through 8 appear 1, 8, 28, 56, 70, 56, 28, 8, 1 times. A result as far from 4 as 5 is — one step or more — is 186 of those 256 sheets.

186 of 256 is most of them. 5 of 8 is not weird under H0. We fail to reject the coin story. We do not get to say customers come back more often than not. The sheet was honest. It was also ordinary.

Figure. Under a coin, 70 of 256 sheets have 4 yes. 186 of 256 are at least one step away. 5 of 8 lives in the ordinary majority.

How many sheets are as far out as 5

Under a fair coin, how many of the 256 sheets have a yes-count at least one step from 4?

  • sheets with 4 yes70
  • 256 − 70186

Pro tip. 186/256 is ordinary. Fail to reject H0. That is not a shy way of saying Ha won.

Coding lab. Count ordinary sheets runs in the app, with checks on your output.

When a test fails to reject H0, what is the correct formal conclusion?
  1. The data does not provide sufficient evidence to contradict the null hypothesis
  2. The null hypothesis has been proven to be mathematically true and exact
  3. The alternative hypothesis has been confirmed with 95% certainty
  4. The experiment must be terminated due to corrupted measurement instruments

'Failure to reject H0' means lack of evidence against the null, not proof that H0 is true.

4Reject is not proof

Fail-to-reject is not proof that H0 is true. A coin can still be slightly unfair — say a 0.55 come-back chance — and still spit out 5 of 8. We only said the data were not weird enough to embarrass H0.

The other side is the same trap flipped: even if we had rejected, we would not have proved Ha. We would have said the coin story is a poor fit. Never write 'we proved customers come back'. The language is reject or fail to reject the null story.

No diagram — the idea is carried by the prose, table, code block or coding lab.

What the decision is allowed to say
DecisionAllowed sentence
Fail to reject H0The data are not weird under the coin
Reject H0The coin story is a poor fit
EitherNot: we proved Ha
Why does rejecting the null hypothesis H0 not constitute absolute proof of a specific alternative hypothesis?
  1. Because p-values are randomly generated numbers without mathematical rigor
  2. Because alternative hypotheses can only be proven using unsupervised clustering
  3. Statistical tests only establish that the observed data is unlikely under H0, not that a specific alternative is certain
  4. Because significance tests require sample sizes greater than one million

Rejecting H0 rules out the null model as a plausible explanation; it does not prove any particular alternative mechanism.

5Eight yes would be weird

Contrast: if all eight had come back — Anu through Hari all yes — only two of the 256 coin-sheets do that: all yes, or (on the other tail) all no. Two of 256 is rare. That count would embarrass H0. We would reject the coin story.

The shop did not give us 8 of 8. It gave us 5 of 8. Keep both numbers: the same test, two different sheets, two different decisions. The rule did not change. The weirdness did.

Figure. If Anu through Hari had all come back yes, only two of the 256 coin-sheets do that: all yes, or all no. 2/256 is weird — that count would reject the coin story. The shop gave 5 of 8, not 8 of 8. Same H0, different weirdness.

The all-yes tail

How many fair-coin 8-row sheets are as extreme as 8 yes?

  • all yes1
  • all no1
  • 1 + 12

Pro tip. 2/256 is weird. 186/256 is not. Same H0, different data.

Coding lab. Two tails runs in the app, with checks on your output.

5 of 8 came back. Under H0 = a fair coin, the right decision is:
  1. Fail to reject H0 — 5 of 8 is ordinary
  2. Prove Ha — five is more than four
  3. Prove H0 — the coin is now a fact

Ordinary data fail to reject. They do not prove either story.

Notes

  • In Statistical Inference because H0 and Ha are two stories about the population, and 5 of 8 is not weird enough to reject a coin.
  • H0, the null, is the dull story we will try to embarrass: a typical customer is equally likely to come back or not. Like a fair coin. Ha, the alternative, is the owner's hope: the chance is not one half.
  • Now read the sheet. Yes: Anu, Chitra, Esha, Farah, Gopal. No: Bala, Deepak, Hari. That is 5 of 8. Under a fair coin, 4 of 8 would be the most ordinary count. 5 is one step off.

Exam traps & shortcuts

  • A sample number describes these rows. A population claim reaches past them.
  • Fail-to-reject is not proof. A p-value is not the chance the null is true.

Recap

H0 and Ha are population stories. 5 of 8 is ordinary under a coin, so we fail to reject H0. That is not proof H0 is true, and rejecting would not prove Ha.

H0 and Ha are two stories
H0, the null, is the dull story we will try to embarrass: a typical customer is equally likely to come back or not. Like a fair coin — heads come back, tails do not. Ha, the alternative, is the owner's hope: the chance is not one half.
Five of eight came back
Now read the sheet. Yes: Anu, Chitra, Esha, Farah, Gopal. No: Bala, Deepak, Hari. That is 5 of 8. Under a fair coin, 4 of 8 would be the most ordinary count — half the coins land heads. 5 is one step off that centre.
Fail to reject the coin
If each customer is a fair coin, every 8-row sheet is one of 256 equally likely outcomes — 2 to the power 8. The counts 0 through 8 appear 1, 8, 28, 56, 70, 56, 28, 8, 1 times. A result as far from 4 as 5 is — one step or more — is 186 of those 256 sheets.
Reject is not proof
Fail-to-reject is not proof that H0 is true. A coin can still be slightly unfair — say a 0.55 come-back chance — and still spit out 5 of 8. We only said the data were not weird enough to embarrass H0.

Practise Hypothesis tests

Reading is free and needs no account. Practice, mocks and progress live in the app.

  • A 3-question practice set that ends the chapter
  • 5 quick checks with worked explanations
  • Timed mocks scored with the real marking scheme
  • Readiness tracked per topic, kept on your device
Continue with Google — freeNo card, no trial. Works offline once installed.