MATH 1401 · Sections 9.3 & 9.4 · Hypothesis Tests for Proportions and Means

Hypothesis Tests for Proportions and Means

Sections 9.3 & 9.4
Case Study

The 5-Second Rule

You drop a piece of food on the floor. Is it still safe to eat if you pick it up fast enough?

A 2024 survey found that 44% of U.S. adults believe in the "5-second rule," assuming bacteria need time to accumulate. However, the science tells us that bacteria can transfer to food almost instantly upon contact.

A young woman with curly hair eats a burger at a low table in a dorm room, a paper bag, a fry container and a cup beside her, while a single fry lies on the floor nearby.
Case Study

The 5-Second Rule

A campus health researcher suspects that college students are more likely than the general public to follow the 5-second rule. She surveys a random sample of 200 college students and finds that 102 of them believe in it.

The sample proportion is p^=102200=0.51, which is higher than the national rate of 0.44. But is that difference large enough to draw a real conclusion, or could it simply be due to chance?

Case Study

Setting Up the Test

A young man kneels on one knee, barefoot, on a kitchen floor, eating a piece of food he has picked up off it, with crumbs scattered on the tiles in front of him.

To answer this question, we perform a hypothesis test.

The null hypothesis is that college students believe in the 5-second rule at the same rate as the general public:

H0:p=0.44

The alternate hypothesis represents the claim that college students are more likely to believe in it:

H1:p>0.44

We have a right-tailed test.

Case Study

The Logic of the Test

We assume the null hypothesis is true and ask: if p really were 0.44, how likely would we be to observe a sample proportion as high as 0.51?

If that outcome would be very unlikely, we reject H0. If it's reasonably likely, we do not reject H0.

Before performing the test, we choose a significance level α: the maximum probability of a Type I error we are willing to accept.

A Type I error means rejecting H0 when it's actually true: concluding that college students are more likely to believe the 5-second rule when they actually are not.

We use α=0.05 (the most common choice).

A woman in glasses sits at a wooden desk with a pen at her chin, reading a completed survey form, with a stack of surveys and a mug in front of her and bookshelves behind.
Case Study

The Test Statistic

If H0 is true, p^ follows an approximately normal distribution with μp^=p0=0.44 and standard error: σp^=0.44(1−0.44)200=0.0351.

We compute a quantity called the test statistic, which is the z-score of p^=0.51: z=p^−μp^σp^=0.51−0.440.0351≈1.994.

The observed value p^=0.51 is fairly far out in the tail of the distribution, well above the null hypothesis value p=0.44. Intuitively, the evidence against H0 appears to be strong.

We need a way to measure precisely how far out p^=0.51 really is.

Case Study

The P-Value

The P-value answers this question:

If H0 were true, what is the probability of observing a test statistic as extreme as ours, or more extreme?

For a right-tailed test, the P-value is the area to the right of z=1.994, which we find to be 0.0231. In other words, if the true proportion were 0.44, there's only about a 2.3% chance of getting a sample proportion as high as 0.51.

Watching the P-Value Change

Curve: the standard normal curveShaded: the P-value
The plan

What we'll do: drag z from 1.994 farther out to the right, then switch to a two-tailed test.

What to look for: the shaded area and the P-value.

Try it

Drag z out to 2.5.

The farther out the test statistic, the smaller the P-value.

  • At z=2.50, the P-value is 0.0062.
  • Two-tailed: both tails count, so the P-value doubles, to 0.0124.
Try it

Press Two-tailed.

The P-Value

The smaller the P-value, the stronger the evidence against H0.

P-valueInterpretation
Less than 0.01Very strong evidence against H0
0.01 to 0.05Strong evidence against H0
0.05 to 0.10Moderate evidence against H0
Greater than 0.10Weak (or very little) evidence against H0
QUESTION

How small does the P-value have to be to reject H0?

ANSWER

Less than or equal to the significance level α.

RULE

If P-value ≤α → Reject H0

Otherwise → Fail to reject H0

Case Study

The 5-Second Rule

A young man kneels on one knee, barefoot, on a kitchen floor, eating a piece of food he has picked up off it, with crumbs scattered on the tiles in front of him.

H0:p=0.44

H1:p>0.44

Because the P-value (0.0231) is less than the level of significance (0.05), we reject H0.

There is sufficient evidence at the α=0.05 level to conclude that college students are more likely than the general public to believe in the 5-second rule.

Check your understanding

Make the Decision

A city library reports that 30% of residents hold a library card. A librarian suspects the rate is higher, so she tests H0:p=0.30 vs. H1:p>0.30. Her P-value is 0.018.

(a)She tests at α=0.05. Does she reject H0? State the conclusion.

0.018≤0.05, so she rejects H0. There is sufficient evidence at the α=0.05 level to conclude that the proportion of residents who hold a library card is greater than 30%.

(b)She tests at α=0.01 instead. Does she reject H0? State the conclusion.

0.018>0.01, so she does not reject H0. There is not sufficient evidence at the α=0.01 level to conclude that the proportion of residents who hold a library card is greater than 30%.

Testing a Proportion with Technology

Recall

H0:p=0.44

H1:p>0.44

x=102

n=200

α=0.05

TI-84 Plus: 1-PropZTest

The 1-PropZTest command performs a hypothesis test for a population proportion. Access it by pressing STAT and choosing the TESTS menu.

The required inputs are x and n. If you know p^ instead, you can compute x=p^·n.

Assumptions

The following assumptions are the conditions under which the Central Limit Theorems let us use standard inference methods for proportions and means.

Testing a Population Proportion pTesting a Population Mean μ
  • We have a simple random sample
  • The population is at least 20 times as large as the sample.
  • The values np0 and n(1−p0) are both at least 10.
  • We have a simple random sample
  • The sample size is large (n>30) or the population is approximately normal.

Why Assumptions Matter

A checklist on a clipboard with seven boxes down the page, every one ticked except the third, which is marked with an X, and a pen lying beside it.

Assumptions aren't formalities, they are the conditions under which the math is valid.

When assumptions are violated:

  • P-values become meaningless
  • Conclusions can't be trusted
  • Papers get retracted

Retraction Watch tracks scientific papers that have been withdrawn due to errors, fraud, or methodological problems, including statistical violations.

Example

Example 1: Defect Rate

Inspectors in hard hats, safety glasses and lab coats stand along a production line, checking trays of small bottles and noting results on clipboards.

A manufacturer guarantees that no more than 8% of its products are defective. After upgrading equipment, quality control runs a routine audit. In a random sample of 400 items, 24 are defective. Does the data support that the defect rate has dropped below 8%? Test at α=0.05.

Solution

H0:p=0.08 vs. H1:p<0.08

Check assumptions:

  • Simple random sample ✓
  • Reasonable to believe that the population is at least 20 times as large as the sample ✓
  • np0=400×0.08=32≥10 ✓
  • n(1−p0)=400×0.92=368≥10 ✓
Example

Example 1: Defect Rate

Recall

n=400

x=24

H0:p=0.08

H1:p<0.08

α=0.05

In a left-tailed test, the P-value is the area to the left of the test statistic.

Perform the test:

TI-84 Plus

Because the P-value is greater than α, we do not reject H0.

There is not sufficient evidence to conclude that the defect rate has dropped below 8%.

Example

Example 2: Public Transit

A line of commuters in work clothes boards a city bus at a stop, with the driver at the wheel.

Before approving funding for modifying bus routes, a city council requires evidence that ridership has changed from the previous rate of 35%. A random sample of 250 residents finds that 30% commute by public transit. Use α=0.05 level of significance.

Solution

H0:p=0.35 vs. H1:p≠0.35

Check assumptions:

  • Simple random sample ✓
  • Reasonable to believe that the population is at least 20 times as large as the sample ✓
  • np0=250×0.35=87.5≥10 ✓
  • n(1−p0)=250×0.65=162.5≥10 ✓
Example

Example 2: Public Transit

p^×n=0.30×250=75

Perform the test:

TI-84 Plus
The TI-84 Plus Draw screen for the 1-PropZTest: a normal curve with both tails shaded, z = −1.6575 and p = 0.0974 (the P-value).
Recall

n=250

p^=0.30

H0:p=0.35

H1:p≠0.35

α=0.05

In a two-tailed test, the P-value includes area from both tails: the probability of being this far from p0 in either direction.

Because the P-value is greater than α, we do not reject H0.

There is not sufficient evidence to conclude that the proportion of residents who commute by public transit has changed from 35%.

Testing a Mean with Technology

When σ is unknown, the test statistic for a mean is t=x¯−μ0sn.

If H0 is true, it follows a Student's t distribution with n−1 degrees of freedom.

Givens

H0:μ=75.6

H1:μ<75.6

x¯=74.1

s=6.2

n=36

α=0.05

TI-84 Plus: T-Test

If we are testing a population mean, we use the T-Test command.

The required inputs are x¯, s, and n.

Example

Example 3: Battery Life

A smartphone manufacturer advertises 24-hour battery life. After complaints, the company runs a test. A random sample of 35 phones has a mean battery life of 22.1 hours with a standard deviation of 3.8 hours. Test whether the mean battery life is less than advertised. Use α=0.01 level of significance.

Solution

H0:μ=24 vs. H1:μ<24

Check assumptions:

  • Simple random sample ✓
  • n=35>30 ✓
A smartphone lies on a table beside a coiled charging cable, its screen showing a nearly empty battery icon.
Example

Example 3: Battery Life

Recall

x¯=22.1

s=3.8

n=35

H0:μ=24

H1:μ<24

α=0.01

Perform the test:

TI-84 Plus

Because the P-value is less than α, we reject H0.

There is sufficient evidence to conclude that the mean battery life is less than 24 hours.

The customer complaints appear to be justified.

Example

Example 4: Latte Calories

A large cup of latte topped with whipped cream sits on a saucer on a wooden coffee shop table, beside a small jar of syrup and a spoon.

A nutrition blogger suspects that a coffee chain's vanilla latte contains more than the advertised 250 calories. She collects a random sample of 18 lattes from various locations. The sample has a mean of 281 calories with a standard deviation of 64 calories. At the 0.05 significance level, is there evidence that the mean exceeds 250 calories?

Solution

H0:μ=250 vs. H1:μ>250

Check assumptions:

  • Simple random sample ✓
  • n=18≯30 ✗

We have no information about the population to suggest it may be approximately normal.

We cannot justify performing the test.

The blogger would need to collect more data or provide evidence that calorie counts are approximately normally distributed.

Example

Example 5: A Generic Drug

Before a generic drug can be sold in the U.S., the FDA requires testing to confirm it performs equivalently to the brand-name version. A pharmaceutical company tests a generic topical pain reliever. The brand-name version delivers a mean of 3.5 micrograms of active ingredient per square centimeter of skin.

Seven volunteers apply the generic ointment. After six hours, the amount absorbed (in micrograms) is:

2.63.22.13.03.12.93.7

Is there evidence at the α=0.01 level that the generic delivers a different amount?

A gloved technician squeezes ointment from a tube onto a square marked on a seated woman's forearm, as she watches.
Solution

H0:μ=3.5 vs. H1:μ≠3.5

Check assumptions:

  • Simple random sample ✓
  • n=7 → we must check for normality
2.02.22.42.62.83.03.23.43.63.84.0

There is no evidence of outliers or strong skewness,

so it is reasonable to assume the population is approximately normal.

Example

Example 5: A Generic Drug

Recall

2.6, 3.2, 2.1, 3.0, 3.1, 2.9, 3.7

H0:μ=3.5

H1:μ≠3.5

α=0.01

Perform the test:

TI-84 Plus
The TI-84 Plus list editor with seven values in L1: 2.6, 3.2, 2.1, 3, 3.1, 2.9 and 3.7.

The P-value is greater than α, so we do not reject H0.

There is not sufficient evidence at the α=0.01 level to conclude that the mean amount absorbed differs from 3.5 micrograms.

You Are Ready For:

Sections 9.3 & 9.4: Hypothesis Tests for Proportions and Means

Find the test statistic and the P-value, and use the P-value to decide whether to reject H0

Check the assumptions before testing a population proportion or a population mean

Perform a test with technology, and state the conclusion in words

1 / 29 → ← advance · Z zoom · B blank · H hides this bar