One-Proportion Z-Test, STAT 3011 – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Normal distribution basics, sampling distributions, standard error.

TL;DR

This topic covers how to build and interpret a confidence interval for a population proportion, and how to run a one-proportion z-test to decide whether a population proportion differs from a claimed value. You will set up hypotheses, compute a z-test statistic, find the P-value from the standard normal distribution, and write a conclusion in context. These are the core mechanics behind questions like "is the true proportion of speeding vehicles greater than 25%?"

Key Terms

Population proportion (p)

The true fraction of the entire population that has a given characteristic. You never observe this directly; it is the parameter you are trying to learn about.

In simple terms, this is the "real answer" for the whole population, which your sample is trying to estimate.

Sample proportion (p-hat)

The fraction of your sample that has the characteristic, calculated as x / n where x is the count of successes and n is the sample size.

Think of it as your best available estimate of the population proportion, based on the data you collected.

Null hypothesis (H0)

The default claim about the population parameter, assumed true unless the data provide strong enough evidence against it. For a one-proportion test this takes the form H0: p = p0, where p0 is the claimed value.

In simple terms, this is the "nothing special is happening" statement that you are trying to disprove.

Alternative hypothesis (Ha)

The claim you are looking for evidence to support. It can be one-sided (p > p0 or p < p0) or two-sided (p is not equal to p0).

Think of it as the research question, phrased as a statement about the parameter.

Significance level (alpha)

The threshold you set in advance for how much evidence you require. A common choice is alpha = 0.05. If the P-value falls at or below alpha, you reject H0.

In simple terms, this is your tolerance for being wrong when you reject the null, set before you look at the data.

Test statistic (z)

A standardised score that measures how far the sample proportion is from the null value, in units of the standard error under H0. Larger absolute values mean the sample result is harder to explain if H0 were true.

P-value

The probability, assuming H0 is true, of observing a test statistic at least as extreme as the one calculated from the data. A small P-value means the observed data would be surprising under H0.

Think of it as a measure of how compatible your data are with the null hypothesis. Smaller means less compatible.

Confidence interval (for a proportion)

A range of plausible values for the population proportion, constructed so that if you repeated the sampling process many times, a stated percentage (e.g. 95%) of such intervals would contain the true proportion.

In simple terms, it is a net you cast around your estimate; the confidence level tells you how often that net-casting method catches the true value.

Core Content

Interpreting a confidence interval for a proportion

  • A 95% confidence interval does not mean there is a 95% probability that the true proportion lies in this particular interval. The true proportion is fixed; it either is or is not inside.

  • The correct interpretation: if we took repeated samples of the same size and built the interval the same way each time, 95% of those intervals would contain the true population proportion.

  • Always state the interpretation in context. For example: "If we took repeated samples of 250 vehicles and calculated the interval in a similar manner, 95% of such intervals would contain the true proportion of vehicles that are speeding."

Setting up a one-proportion z-test

  • State the hypotheses:

    • H0: p = p0 (the null value)

    • Ha: p > p0 (right-tailed), p < p0 (left-tailed), or p is not equal to p0 (two-tailed)

  • Choose the significance level alpha before looking at the data. The quiz uses alpha = 0.05.

  • State the decision rule: reject H0 if the P-value is less than or equal to alpha.

Computing the sample proportion

  • p-hat = x / n, where x is the number of successes in the sample and n is the total sample size.

  • Example from the quiz: 75 vehicles speeding out of 250 gives p-hat = 75 / 250 = 0.30.

Computing the z-test statistic

  • The test statistic measures how many standard errors the sample proportion falls from the null value.

  • z = (p-hat - p0) / sqrt(p0(1 - p0) / n)

  • The denominator uses p0 (the null value), not p-hat. This is because you are computing how unlikely the data are under the assumption that H0 is true.

  • Example: z = (0.30 - 0.25) / sqrt(0.25 x 0.75 / 250) = 0.05 / 0.02739 = 1.83.

Finding the P-value

  • For a right-tailed test (Ha: p > p0), the P-value is P(Z >= z), where Z is a standard normal variable.

  • Look up the cumulative probability P(Z < z) in the standard normal table, then subtract from 1.

  • Example: P(Z >= 1.83) = 1 - P(Z < 1.83) = 1 - 0.9664 = 0.0336.

  • For a left-tailed test, the P-value is P(Z <= z). For a two-tailed test, double the one-tail probability.

Making a decision

  • If P-value <= alpha, reject H0. State: "At the [alpha x 100]% level of significance, we have sufficient evidence that [Ha stated in context]."

  • If P-value > alpha, fail to reject H0. State: "At the [alpha x 100]% level of significance, we have insufficient evidence that [Ha stated in context]."

  • Never say "accept H0." Failing to reject is not the same as proving the null is true.

Interpreting the P-value in a sentence

  • The P-value is always interpreted as a conditional probability, assuming H0 is true.

  • Template: "If the true proportion were [p0], the probability of observing a sample proportion at least as [extreme direction] as [p-hat] would be [P-value]."

  • Example: "If the true proportion of speeding vehicles were 0.25, the probability of observing a sample proportion at least as high as 0.30 would be 0.0336."

Formulas

Sample proportion

p-hat = x / n

where x = number of successes, n = sample size.

Standard error of p-hat under H0

SE = sqrt( p0 (1 - p0) / n )

Note: this uses the null value p0, not the observed p-hat.

Z-test statistic for a one-proportion test

z = (p-hat - p0) / SE = (p-hat - p0) / sqrt( p0 (1 - p0) / n )

P-value (right-tailed test)

P-value = P(Z >= z) = 1 - P(Z < z)

Read P(Z < z) from the standard normal (Z) table.

Common Misconceptions

  • "There is a 95% probability the true proportion is in this interval." This is incorrect. Once the interval is computed, the true proportion is either inside it or not. The 95% refers to the long-run success rate of the method, not the probability for any single interval.

  • Using p-hat instead of p0 in the denominator of the test statistic. The standard error for a hypothesis test uses the null value p0 because you are evaluating the data under the assumption H0 is true. The formula that uses p-hat is for constructing a confidence interval, not for testing.

  • Saying "accept H0" when the P-value is large. A large P-value means the data are consistent with H0, but it does not prove H0 is true. The correct language is "fail to reject H0" or "insufficient evidence."

  • Confusing the P-value with the probability that H0 is true. The P-value is the probability of seeing data this extreme assuming H0 is true. It is not the probability that H0 is true or false.

Why It Matters / Exam Flags

  • The confidence interval interpretation is asked almost verbatim on exams. Memorise the phrasing: "If we took repeated samples of size n and calculated the interval in a similar manner, [C]% of such intervals would contain the true [parameter in context]."

  • You will be asked to write out all steps of a hypothesis test: hypotheses, test statistic, P-value, decision, and conclusion in context. Marks are lost for skipping any step.

  • The P-value interpretation question is a classic: "If H0 were true, the probability of observing a sample proportion at least as [extreme] as [observed value] would be [P-value]." Getting the conditional framing wrong (e.g. dropping "if H0 were true") typically costs marks.

  • Know when to reject and when to fail to reject. If P-value <= alpha, reject. If P-value > alpha, fail to reject. The direction of the inequality matters.

Quick Self-Test

True or False: A 95% confidence interval means there is a 95% chance the true parameter is inside it.

False. The 95% refers to the method's long-run success rate, not the probability for one specific interval.

True or False: If the P-value is 0.03 and alpha is 0.05, we fail to reject H0.

False. 0.03 < 0.05, so we reject H0.

Fill in the blank: The denominator of the one-proportion z-test statistic uses ______ (p-hat / p0).

p0, the null value.

True or False: "Fail to reject H0" and "accept H0" mean the same thing.

False. "Fail to reject" means the data are not strong enough to rule out H0. It does not prove H0 is true.

Fill in the blank: For a right-tailed test, the P-value equals P(Z >= ______).

The observed test statistic z.

Practice Q&A

Q: In a sample of 300 vehicles, 99 are speeding. Test whether the true proportion of speeding vehicles is greater than 0.30 at the 5% significance level. What are the hypotheses, test statistic, P-value, and conclusion?

A: H0: p = 0.30, Ha: p > 0.30. p-hat = 99/300 = 0.33. z = (0.33 - 0.30) / sqrt(0.30 x 0.70 / 300) = 0.03 / 0.02646 = 1.13. P-value = P(Z >= 1.13) = 1 - 0.8708 = 0.1292. Since 0.1292 > 0.05, we fail to reject H0. At the 5% level, there is insufficient evidence that the true proportion of speeding vehicles is greater than 0.30.

Q: A 95% confidence interval for the proportion of speeding vehicles is (0.22, 0.38). A friend says "there is a 95% probability the true proportion is between 0.22 and 0.38." Is this correct? Why or why not?

A: This is incorrect. The true proportion is a fixed value, not random, so we cannot assign it a probability of being in the interval. The correct interpretation is: if we repeated the sampling process many times and built the interval the same way, 95% of those intervals would contain the true proportion.

Q: You compute a P-value of 0.0336 for a right-tailed test with H0: p = 0.25. Interpret this P-value in context.

A: If the true proportion of speeding vehicles were 0.25, the probability of observing a sample proportion at least as high as the one we observed would be 0.0336.

Q: In the z-test statistic formula for a proportion, why does the denominator use p0 rather than p-hat?

A: Because the test evaluates how surprising the data are under the assumption that H0 is true. Under H0, the population proportion is p0, so the standard error is calculated using p0. Using p-hat would be appropriate for a confidence interval, where no null assumption is being made.

Q: A test yields a P-value of 0.0853 with alpha = 0.05. What is the decision, and what does it mean?

A: Since 0.0853 > 0.05, we fail to reject H0. At the 5% significance level, the data do not provide sufficient evidence to support the alternative hypothesis. This does not mean H0 is proven true.

Connections to Other Topics

This material connects directly to confidence intervals for proportions (the interval construction uses a similar standard error formula, but with p-hat instead of p0). It also lays the groundwork for two-proportion z-tests, where you compare proportions from two independent samples. The logic of hypothesis testing here (set up hypotheses, compute a test statistic, find a P-value, make a decision) carries over identically to t-tests for means, chi-square tests, and ANOVA.


Related Terms / Search Tags

one-proportion z-test, z-test for a proportion, hypothesis test for p, proportion hypothesis test, P-value interpretation, confidence interval interpretation, significance level, alpha, null hypothesis, alternative hypothesis, sample proportion, p-hat, standard normal, z-score, one-sided test, right-tailed test, STAT 3011, intro to probability and statistics