Tutorials › AP Statistics › One-Sided Two-Proportion Test Example

Two-proportion hypothesis tests · Tutorial 531 of 1000

One-Sided Two-Proportion Test Example

Learn how to test for a higher treatment success proportion by matching the alternative hypothesis to the question and finding the corresponding one-tailed p-value.

Intermediate 10 min read

What You'll Learn

  • Define treatment and control population proportions in a consistent order.
  • Write a one-sided alternative for a higher treatment success rate.
  • Check the design and pooled expected counts for a two-proportion z-test.
  • Calculate the pooled standard error, test statistic, and upper-tail p-value.
  • Interpret the p-value and conclusion in the context of a treatment comparison.
  • Explain why a negative test statistic does not change the chosen tail.

Testing Whether a Treatment Has a Higher Success Rate

In Two-Sided Two-Proportion Test Example, the question was whether two population proportions differed in either direction. Here, the research question is directional: does a new treatment produce a higher success proportion than control? That prediction determines the alternative hypothesis and which tail of the standard normal distribution supplies the p-value.

As explained in Hypotheses for Comparing Two Population Proportions and P-Values for One-Sided Versus Two-Sided Tests, the direction must come from the research question, not from looking at which sample proportion turned out to be larger. For a higher-treatment-rate claim, put treatment first and use an upper-tail alternative. The null model still assumes equal population proportions, so the test uses a pooled proportion and pooled standard error.

Definition: Let \(p_T\) be the true proportion of units that would have a defined successful outcome under the treatment condition, and let \(p_C\) be the true proportion that would have that outcome under control. To test whether treatment has a higher success proportion, use \(H_0:p_T=p_C\) and \(H_a:p_T>p_C\). The alternative is one-sided because only a higher treatment proportion counts as evidence for the stated claim.

The Test Statistic and the One-Tailed P-Value

The test statistic measures how many pooled standard errors the observed difference \(\hat{p}_T-\hat{p}_C\) is above or below zero. Under the null hypothesis, the pooled proportion estimates the common success rate. The p-value for \(H_a:p_T>p_C\) is the area to the right of the observed \(z\)-statistic.

Formula: If \(x_T\) of \(n_T\) treatment units and \(x_C\) of \(n_C\) control units succeed, calculate \(\hat{p}_T=x_T/n_T\), \(\hat{p}_C=x_C/n_C\), and \(\hat{p}_c=(x_T+x_C)/(n_T+n_C)\). Then calculate \(SE_{\text{pooled}}=\sqrt{\hat{p}_c(1-\hat{p}_c)(1/n_T+1/n_C)}\) and \(z=(\hat{p}_T-\hat{p}_C)/SE_{\text{pooled}}\). For the upper-tail alternative \(H_a:p_T>p_C\), the p-value is \(P(Z\ge z_{\text{obs}})\), where \(Z\) is a standard normal random variable.

The conditions are the same design and null-model checks used in a two-proportion \(z\)-test, described in Conditions for a Two-Proportion z-Test and Large Counts Using Expected Successes and Failures in Each Group. Random assignment or appropriate random sampling supports the chance-based inference; the two groups must be independent. If units are sampled without replacement, check the 10% condition. For the Large Counts condition, use the pooled proportion to calculate expected successes and failures in each group. Each of the four expected counts must be at least 10.

A Four-Step Structure

A complete response follows the familiar State, Plan, Do, Conclude structure. State the directional hypotheses before examining the test result. In the Plan step, justify the procedure with the study design and expected counts. In the Do step, calculate the pooled quantities and the right-tail area. In the Conclude step, compare the p-value with the stated significance level and explain what the evidence says about the population proportions.

1
State.
Define \(p_T\) and \(p_C\), then write \(H_0:p_T=p_C\) and \(H_a:p_T>p_C\).
2
Plan.
Identify the random sampling or random assignment process, check independence and the 10% condition when relevant, and verify the four pooled expected counts.
3
Do.
Calculate the pooled proportion, pooled standard error, \(z\)-statistic, and upper-tail p-value.
4
Conclude.
Compare the p-value with \(\alpha\), then state whether the evidence is convincing that the treatment success proportion is higher, in context.

Worked Examples

Worked Example: Testing a New Treatment for a Higher Success Rate

Question: In a fictional trial, 320 eligible adults are selected at random from a large target population and randomly assigned in equal numbers to a new treatment or control. A defined health outcome counts as a success. After the trial, 104 of the 160 treatment participants and 80 of the 160 control participants have a successful outcome. Is there evidence that the treatment has a higher success proportion? Use \(\alpha=0.05\).

State: Let \(p_T\) be the true proportion of eligible adults who would have a successful outcome under the new treatment, and let \(p_C\) be the true proportion who would have a successful outcome under control. The hypotheses are \(H_0:p_T=p_C\) and \(H_a:p_T>p_C\). The alternative matches the question because the claim is that treatment has a higher success rate.

Plan: The adults were randomly selected from the target population, supporting inference to that population, and randomly assigned to treatment or control. The two groups consist of different participants, so the groups are independent. The sample is less than 10% of the large target population, satisfying the 10% condition for sampling without replacement. Under \(H_0\), the pooled proportion is \((104+80)/(160+160)=184/320=0.575\). The expected successes are \(160(0.575)=92\) in each group, and expected failures are \(160(0.425)=68\) in each group. All four expected counts are at least 10, so the Large Counts condition is met.

Do: The sample proportions are \(\hat{p}_T=104/160=0.65\) and \(\hat{p}_C=80/160=0.50\). The observed difference, treatment minus control, is \(0.65-0.50=0.15\). The pooled proportion is:

$$ \hat{p}_c =\frac{104+80}{160+160} =\frac{184}{320} =0.575 $$

Use that pooled value to calculate the standard error under the null hypothesis:

$$ SE_{\text{pooled}} =\sqrt{0.575(0.425)\left(\frac{1}{160}+\frac{1}{160}\right)} =\sqrt{0.0030546875} \approx 0.0552692 $$

The test statistic is:

$$ z =\frac{0.65-0.50}{0.0552692} \approx 2.714 $$

Because the alternative is \(p_T>p_C\), only the area to the right of \(2.714\) is included. The one-tailed p-value is approximately \(P(Z\ge2.714)=0.0033\), rounded to four decimal places. A TI-84 2-PropZTest with \(x_T=104,n_T=160,x_C=80,n_C=160\), and the \(p_T>p_C\) alternative gives a test statistic and p-value that round to these values.

Conclude: If the true success proportions under treatment and control are equal, the probability of obtaining a sample difference at least as large in the treatment-favoring direction as the observed difference is about \(0.0033\). Since \(0.0033<0.05\), we reject \(H_0\). The trial provides convincing evidence that the true proportion of eligible adults with a successful outcome is higher under the new treatment than under control.

Worked Example: A Positive Difference That Is Not Convincing Evidence

Question: In a separate fictional trial, 92 of 160 participants assigned to a new treatment have a successful outcome, compared with 80 of 160 assigned to control. Assume the participants were randomly assigned and the test conditions are met. Is there evidence that the treatment success proportion is higher? Use \(\alpha=0.05\).

Let \(p_T\) and \(p_C\) be the true success proportions for the treatment and control conditions. Test \(H_0:p_T=p_C\) against \(H_a:p_T>p_C\). The observed proportions are \(\hat{p}_T=92/160=0.575\) and \(\hat{p}_C=80/160=0.50\), so the observed difference is \(0.075\). The pooled proportion is \((92+80)/(160+160)=172/320=0.5375\). The expected successes are \(160(0.5375)=86\) per group, and expected failures are \(160(0.4625)=74\) per group. Each expected count is at least 10.

The pooled standard error and test statistic are:

$$ SE_{\text{pooled}} =\sqrt{0.5375(0.4625)\left(\frac{1}{160}+\frac{1}{160}\right)} =\sqrt{0.003107421875} \approx 0.0557447 $$
$$ z =\frac{0.575-0.50}{0.0557447} \approx 1.345 $$

For the higher-treatment-rate alternative, the p-value is the area to the right of \(1.345\): \(P(Z\ge1.345)\approx0.0894\). Since \(0.0894>0.05\), we fail to reject \(H_0\). Although the treatment sample proportion is higher, these data do not provide convincing evidence that the treatment’s true success proportion is higher than control’s. Failing to reject does not establish that the proportions are equal.

Worked Example: A Negative Statistic With a Higher-Treatment Alternative

Question: In a fictional trial, 78 of 120 participants assigned to a new treatment have a successful outcome, while 84 of 120 control participants have a successful outcome. Assume the assignment and test conditions are appropriate. Test whether treatment has a higher success proportion at \(\alpha=0.05\).

Let \(p_T\) and \(p_C\) represent the true treatment and control success proportions. The hypotheses are \(H_0:p_T=p_C\) and \(H_a:p_T>p_C\). The groups are independent by design, and the pooled proportion is \((78+84)/(120+120)=162/240=0.675\). The null expected counts are \(120(0.675)=81\) successes and \(120(0.325)=39\) failures in each group. All four counts are at least 10.

The sample proportions are \(\hat{p}_T=78/120=0.65\) and \(\hat{p}_C=84/120=0.70\), so the observed treatment-minus-control difference is \(-0.05\). Calculate:

$$ SE_{\text{pooled}} =\sqrt{0.675(0.325)\left(\frac{1}{120}+\frac{1}{120}\right)} =\sqrt{0.00365625} \approx 0.0604669 $$
$$ z =\frac{0.65-0.70}{0.0604669} \approx -0.827 $$

The alternative remains \(p_T>p_C\), so the p-value is the area to the right of the observed statistic, even though that statistic is negative: \(P(Z\ge-0.827)\approx0.7960\). This large p-value means the data are not unusual under the equal-proportions null in the direction specified by the alternative. We fail to reject \(H_0\); the trial does not provide convincing evidence that treatment has a higher success proportion. The negative statistic indicates that the treatment sample proportion was actually lower than the control sample proportion.

Common Mistakes and AP Exam Tips

  • Choosing the direction after seeing the sample results: The alternative must express the research question before looking at the observed difference. If the question predicts a higher treatment rate, use \(H_a:p_T>p_C\), even if the treatment sample proportion turns out lower.
  • Using two tails for a one-sided claim: For \(H_a:p_T>p_C\), the p-value is the area to the right of the observed \(z\). Do not double that area; doubling is associated with a two-sided alternative.
  • Using the confidence-interval standard error: The test of equal proportions uses the pooled proportion because \(H_0\) assumes a common success proportion. The two-proportion interval uses separate sample proportions in its standard error.
  • Checking the observed counts instead of null expected counts: For the Large Counts condition in this test, calculate expected successes and failures in each group using \(\hat{p}_c\). Check all four values.
  • Changing tails when \(z\) is negative: The alternative determines the tail, not the sign of the statistic. With \(H_a:p_T>p_C\), a negative \(z\) still calls for the area to its right, which will be greater than one-half.
  • Overstating a large p-value: If you fail to reject \(H_0\), do not claim that treatment and control have equal success proportions. Say that the data do not provide convincing evidence for a higher treatment proportion.
  • Giving a conclusion without context: A full-credit conclusion connects the decision to the true success proportions for the treatment and control conditions and uses the stated direction.
AP Exam Tip: State the group order and directional hypotheses clearly, justify the two-proportion \(z\)-test with the design and pooled expected counts, and report the p-value as an upper-tail probability for \(H_a:p_T>p_C\). Then compare it with \(\alpha\) and conclude about the treatment’s population success proportion in context.

Key Takeaway

A one-sided two-proportion test asks whether the treatment success proportion is higher than the control success proportion. The pooled test statistic measures the observed treatment-minus-control difference in null standard-error units, and the p-value is the standard normal area to the right of that statistic. Keep the tail fixed by the alternative, even when the statistic is negative.

Key takeaway: For a higher-treatment-rate claim, define \(p_T\) and \(p_C\), test \(H_0:p_T=p_C\) against \(H_a:p_T>p_C\), check the conditions, and find \(P(Z\ge z_{\text{obs}})\). A small p-value gives convincing evidence in the predicted direction; a large p-value does not prove equality.

Check Your Understanding

Assume the conditions for a two-proportion \(z\)-test are met unless a question asks you to identify a condition.

  1. A treatment group has 96 successes among 150 participants, and a control group has 78 successes among 150 participants. Define the population proportions and write hypotheses for testing whether treatment has a higher success proportion.
  2. For the counts in Question 1, calculate the pooled proportion and the expected successes and failures in each group under the null hypothesis.
  3. If a one-sided test gives \(z=1.80\), which standard normal area is the p-value for \(H_a:p_T>p_C\)?
  4. If the observed statistic is \(z=-0.60\) for the same higher-treatment alternative, which tail supplies the p-value, and should that p-value be greater or less than \(0.50\)?
  5. A one-sided test has \(p=0.041\) and \(\alpha=0.05\). State the decision and a conclusion about the population success proportions in context, without claiming more than the test supports.