Unit 3 · Topic 3.5 · about 20 minutes

Setting Up a Test for a Population Proportion

Set up a one-sample z-test for a population proportion: define the parameter in context, state the hypotheses, and verify the conditions with the null value.

Predict first

A biologist suspects that fewer than half of the frogs in a large lake carry a skin fungus. She plans a significance test using a random sample of frogs. Which statement does the test assume is true until the data say otherwise?

What a test does

A hypothesis test, also called a significance test, uses sample data to make a decision about the value of a population parameter. It works like a trial.

The null hypothesis, H0, is the status quo: a statement about the parameter that is assumed to be correct unless there is convincing statistical evidence otherwise. The alternative hypothesis, Ha, is the claim or belief about the parameter that evidence is being collected for. The researcher's claim or suspicion, the thing the study is looking for evidence of, goes in Ha.

A defendant is presumed innocent, and it is the prosecution's job to produce convincing evidence of guilt. A test does the same thing with H0. It assumes H0 is true and asks whether the data would be surprising if it were. Data that would be surprising, in the direction Ha predicts, are evidence for Ha. Data that would not be surprising leave H0 standing, which is not the same as proving it. The next lesson makes "surprising" precise.

For a single proportion, the procedure is the one-sample z-test for a population proportion.

Writing the hypotheses

Hypotheses are statements about a parameter, so they use p, never p^. You already know p^ the moment you collect the data, so there is nothing to test about it. Define p in words first, naming the proportion, the response variable and the population: "p = the proportion of all players of a free video game who buy something in the game."

The null hypothesis names one value, p0:

H0:p=p0

The alternative takes one of three forms, and the research question picks the form before anyone looks at the data. Ha:p>p0 and Ha:p<p0 are one-sided. Ha:p≠p0 is two-sided, for questions that ask whether the proportion is different without saying which way.

You will sometimes see a one-sided null written with an inequality, such as H0:p≤0.12 against Ha:p>0.12. That is acceptable. The test is still carried out at the boundary value, p=0.12.

Matching the alternative hypothesis to the question
The question asks whether the proportion isAlternativeKind
greater than, more than, higher than, or has increased from p0Ha:p>p0One-sided
less than, fewer than, lower than, or has decreased from p0Ha:p<p0One-sided
different from, not equal to, or has changed from p0Ha:p≠p0Two-sided

Sort it

An online store says 12% of its orders are returned. A manager suspects the return rate has gone up, and checks a random sample of 400 recent orders: 62 were returned, so p^=0.155. Sort each pair of hypotheses.

Correct for this question

Has an error

Conditions, checked with the null value

The one-sample z-test for a population proportion requires three conditions.

  • Randomization condition: the data come from a random sample.
  • 10% condition: when sampling without replacement, the population is at least 10 times the sample size, n≤0.10N.
  • Normality condition: the expected number of successes, np0, and the expected number of failures, n(1−p0), are both at least 10.

The last one differs from the interval version. A test does all of its calculations in a world where H0 is true, so it checks normality with the counts you would expect if p really were p0. The interval check in 3.3 Constructing a Confidence Interval for a Population Proportion uses the observed counts instead, because an interval assumes no particular value of p.

Worked exampleSetting up a test about in-game purchases

A video game company tells investors that 25% of the players who download its free game buy something in the game. An analyst suspects the true proportion is lower. She selects a random sample of 250 of the game's 1.8 million players and finds that 51 of them have bought something. Set up a significance test: name the test, define the parameter, state the hypotheses, and check the conditions.

  1. Name the test. One-sample z-test for a population proportion.

  2. Define the parameter. p = the proportion of all players of this game who buy something in the game.

  3. State the hypotheses. H0:p=0.25 and Ha:p<0.25. The company's figure is the status quo, so it goes in the null. The analyst's suspicion is what she is collecting evidence for, so it goes in the alternative, and it is one-sided because she suspected lower before she saw any data.

  4. Check the conditions. Randomization: the 250 players were randomly selected. 10%: 250 is far less than 10% of 1.8 million. Normality: np0=250(0.25)=62.5 and n(1−p0)=250(0.75)=187.5, both at least 10.

Answer.

A one-sample z-test of H0:p=0.25 against Ha:p<0.25, with all three conditions met. Notice that the sample result, p^=51250=0.204, appears nowhere in the setup. It is used when the test is carried out in 3.7 Carrying Out a Test for a Population Proportion.

Lab

Is This Coin Fair?

Every round of this lab is a test about one coin. Before your first flip, define p in words, write H0, and decide whether the alternative should be one-sided or two-sided for a coin that could be rigged toward either side. Then play a few rounds and see where p0 shows up in the calculations.

Open the full Is This Coin Fair? lab

Check your understanding

1

Last year, 8% of a hospital's heart patients were readmitted within 30 days of going home. This year the hospital starts a new discharge program meant to lower that rate, and it will test a random sample of patients discharged under the program. Which pair of hypotheses should it use?

2

A national survey found that 57% of teens get less than eight hours of sleep on school nights. A counselor wants to know whether the proportion at her large high school is different from the national figure. In a random sample of 120 of her students, 75 report getting less than eight hours. Which alternative hypothesis should she use?

3

A quality inspector tests H0:p=0.10 against Ha:p>0.10, where p is the proportion of all circuit boards from a production line that are defective. Her random sample of 150 boards from a run of 20,000 contains 24 defective boards. Which calculation correctly checks the normality condition for this test?

4

A city wants to test whether more than 30% of its households compost food waste. It surveys a random sample of 500 households. Which is the best definition of the parameter for this test?

5

A consumer group writes the hypotheses H0:p≤0.05 and Ha:p>0.05, where p is the proportion of a brand's smoke detectors that fail a safety check. Which value of p is used to carry out the test?

Course alignment, for teachers

AP Statistics topic 3.5, Unit 3: Inference for Categorical Data: Proportions.

  • Skill 2.C: Identify appropriate statistical inference methods.
  • Skill 2.E: Identify the null and alternative hypotheses.
  • Skill 4.E: Justify the use of a chosen statistical inference method by verifying conditions.