TutorChase logo
Login
AP Statistics study notes

6.5.1 Calculating Test Statistics and p-Values

AP Syllabus focus:
‘Calculation of the z-statistic for a population proportion involves the formula: (p-hat - p0) / sqrt(p0(1-p0)/n), where p-hat is the sample proportion, p0 is the hypothesized population proportion, and n is the sample size. A p-value is calculated to assess the likelihood of observing a test statistic as extreme as, or more extreme than, the calculated z-statistic under the assumption that the null hypothesis is true.’

This subsubtopic develops a precise understanding of how to compute a test statistic for a population proportion and how the resulting p-value measures the extremeness of sample results.

Calculating Test Statistics and p-Values

A significance test for a population proportion begins by quantifying how far the observed sample proportion lies from the hypothesized value under the null model. This distance, standardized by expected variability, forms the basis of the test statistic, which follows a known distribution when the null hypothesis is assumed to be true.

The Role of the Test Statistic

The test statistic measures how inconsistent the sample evidence is with the null hypothesis value of the population proportion. It compares the difference between the observed proportion and the null hypothesized proportion in standard deviation units.

Test Statistic (z): A standardized measure showing how many standard deviations the sample proportion lies from the null hypothesis proportion.

The test statistic uses the properties of the standard normal distribution when appropriate conditions are met. This connection allows researchers to use tail probabilities from the normal distribution to compute p-values.

Computing the z-Statistic for a Population Proportion

The standardized form of the test statistic uses the hypothesized proportion to determine expected sampling variability.

EQUATION

z-statistic=p^p0p0(1p0)/n z\text{-statistic} = \dfrac{\hat{p} - p_{0}}{\sqrt{p_{0}(1 - p_{0})/n}}
p^ \hat{p} = sample proportion
p0 p_{0} = hypothesized population proportion
n n = sample size

Because the formula uses p0p_{0} rather than p^\hat{p} in the standard error, the z-statistic reflects sampling variation expected if the null hypothesis were true. This assumption ties directly to the logic of inference. This formula measures how many standard deviations the observed sample proportion is from the hypothesized population proportion under the null hypothesis.

This figure displays the test statistic for a one-sample z-test for a population proportion, showing each component of the formula clearly. It reinforces the idea that the z-statistic standardizes the difference between the sample proportion and the hypothesized proportion using the standard deviation of the sampling distribution. The color styling is decorative and not required by the syllabus but does not alter the statistical meaning. Source.

Understanding Sampling Variability Under the Null

The behavior of the test statistic is interpreted relative to the null distribution, which describes the distribution of the test statistic assuming the null hypothesis is accurate. The z-statistic should follow a standard normal distribution when conditions justify the use of normal approximation. This approximation allows researchers to determine how “extreme” the observed result is in comparison with what is expected under the null hypothesis.

Null Distribution: The theoretical distribution of a test statistic calculated under the assumption that the null hypothesis is true.

This distribution provides the basis for converting the test statistic into a probability statement.

Determining Extremeness Through p-Values

The p-value quantifies how surprising the observed test statistic would be if the null hypothesis accurately described the population. It represents a probability, not a measure of effect size or practical importance. Instead, it reflects the compatibility of the sample data with the null hypothesis.

p-value: The probability of observing a test statistic as extreme as, or more extreme than, the one obtained, assuming the null hypothesis is true.

Geometrically, the p-value is the area in the tail or tails of the standard normal curve beyond the calculated z-statistic, under the assumption that the null hypothesis is true.

This diagram represents the standard normal distribution used as the null distribution in a significance test. The dashed line marks the observed test statistic, and the shaded region represents the p-value for a right-tailed test. Although stylistically simplified, it illustrates exactly the same tail-area interpretation used for p-values in one-proportion z-tests. Source.

A test with a smaller p-value indicates stronger evidence against the null hypothesis because such an extreme result is less likely under the null model. A larger p-value suggests the observed sample outcome is not unusual given the hypothesized parameter.

Direction of the Alternative Hypothesis and Tail Areas

The method for computing the p-value depends on the form of the alternative hypothesis. Understanding which tail—or tails—of the distribution represent more extreme outcomes is essential.

  • For greater-than alternatives (H_{a}: p > p_{0}):

    • The p-value corresponds to the upper tail area beyond the observed z-statistic.

  • For less-than alternatives (H_{a}: p < p_{0}):

    • The p-value corresponds to the lower tail area beyond the observed z-statistic.

  • For not-equal-to alternatives (Ha:pp0H_{a}: p \neq p_{0}):

    • The p-value is the sum of both tail areas, capturing extremeness in either direction.

These tail interpretations ensure alignment between the research question and the probability being assessed.

Connecting Test Statistics and Inference

Together, the test statistic and p-value provide a framework for evaluating the plausibility of the null model. The z-statistic offers a standardized numerical summary of sample evidence, while the p-value translates that evidence into a probabilistic measure. Both components rely on assuming the null hypothesis is true—a fundamental aspect of significance testing that supports valid inference about population proportions.

FAQ

The normal distribution is used because, under certain conditions, the sampling distribution of the sample proportion becomes approximately normal due to the Central Limit Theorem.

This approximation improves as the sample size increases. When both expected successes and failures based on the null hypothesis are at least 10, the normal model closely reflects the true distribution of the test statistic.

The alternative hypothesis identifies which tail(s) of the null distribution represent more extreme outcomes.

• For a greater-than test, only the upper tail is relevant.
• For a less-than test, only the lower tail is used.
• For a two-sided test, areas from both tails are combined.

The direction does not change the value of the test statistic, only the probability attached to it.

The denominator represents the expected standard deviation of the test statistic if the null hypothesis is true.

Because significance testing asks how plausible the sample result is under the null model, the hypothesised proportion determines the variability. This ensures the calculation reflects conditions assumed by the null hypothesis rather than characteristics of the observed sample.

A test statistic is considered extreme if it lies far from zero when measured in standard deviation units under the null model.

Extremeness depends on:
• The magnitude of the statistic
• The direction specified by the alternative hypothesis
• The shape and symmetry of the null distribution

A statistic in a tail area with very low probability indicates strong inconsistency with the null hypothesis.

A larger sample size reduces the standard error, making deviations from the hypothesised proportion more detectable.

As a result:
• Smaller differences may produce larger test statistics
• p-values tend to decrease for the same difference in proportions
• Tests become more sensitive, increasing the chance of identifying meaningful differences

This means identical sample proportions can yield different strength of evidence depending on sample size.

Practice Questions

Question 1 (1–3 marks)
A researcher claims that the proportion of households in a city that recycle regularly is 0.60. In a random sample of 100 households, 54 report recycling regularly.
(a) State the value of the sample proportion.
(b) Calculate the test statistic for testing the claim using a one-sample z-test for a population proportion.

Question 1
(a) 1 mark
• Correctly states the sample proportion as 0.54.

(b) 2 marks
• 1 mark for correctly substituting values into the z-statistic formula: (0.54 − 0.60) / sqrt(0.60 × 0.40 / 100).
• 1 mark for the correct numerical value of the test statistic (approximately −1.22).

Question 2 (4–6 marks)
A wildlife conservation group believes that the proportion of visitors who support a new habitat restoration plan is different from 0.50. They survey a random sample of 160 visitors and find that 104 of them express support.
(a) State the null and alternative hypotheses for the test.
(b) Calculate the test statistic for the one-sample z-test for a population proportion.
(c) Explain what the corresponding p-value represents in the context of the study.

Question 2
(a) 1 mark
• Correctly states hypotheses:
– H0: p = 0.50
– Ha: p ≠ 0.50

(b) 2–3 marks
• 1 mark for correct substitution into the z-statistic formula: (0.65 − 0.50) / sqrt(0.50 × 0.50 / 160).
• 1 mark for calculating the correct standard error (0.0395 or close).
• 1 mark for the correct test statistic (approximately 3.80).

(c) 1–2 marks
• 1 mark for stating that the p-value is the probability of obtaining a test statistic as extreme as the one observed if the null hypothesis were true.
• 1 mark for contextualising this specifically to visitor support for the restoration plan.

Hire a tutor

Please fill out the form and we'll find a tutor for you.

1/2
Your details
Alternatively contact us via
WhatsApp, Phone Call, or Email