4.4 Intervals and Tests for Two Proportions
Section Overview
- Gallery 4.4.1 - 1 & 2 sided tests for 2 Prop.
- Example 4.4.1
- Gallery 4.4.2 - 2 Samp. z-test on Calc
- Interactive 4.4.1 - Example 4.4.1
- Gallery 4.4.3 - 2 Samp. z-interval on Calc
- Pop Quiz 4.4.1
Using The Difference Between Two Sample Proportions
After discovering that we can perform statistical inference on the sample proportion , it should probably be no surprise that we can also perform statistical inference on the difference between two sample proportions .
There are three conditions that must be met before inference procedures can be carried out on the difference between two sample proportions. They are very similar to the conditions we learned about in Chapter 4.1, but apply to two samples instead of one. We will include the conditions for the difference between two sample means to parallel the structure in that section:
- Random – For both samples or groups, the data we use comes from a random sample or randomized experiment.
- Normal – For the difference between two sample proportions, we want to make sure that there are at least 10 successes and 10 failures for both samples or groups, or and . For the difference between two sample means, we know its sampling distribution will be approximately Normal if and as ensured by the Central Limit TheoremEditorial qualification: The captured n ≥ 30 statement is not a universal guarantee. Under the CLT’s assumptions, the accuracy of a Normal approximation depends on the population and sample size..
- Independent – The observations within and between both samples or groups must be independent of one another. If we are sampling without replacement we want to make sure that the populations are at least 10 times as large as their respective samples, or and .
Significance Tests for Two Proportions
When performing significance tests for the difference between two sample proportions , we use the two-sample z test to find the z-statistic:
Our null hypothesis is:
We also have our three possible alternative hypotheses, where:
See Gallery 4.6.1 for a visualization of one and two-sided tests.
Confidence Intervals for Two Proportions
The two-sample z test to calculate the z-statistic is:
Gallery 4.4.1 One and Two-sided Significance Tests for Two Proportions
Frame 1 of 3
A possible one-sided test where the area to the right of the z-statistic is the p-value. Open full-size image S0389Frame 2 of 3
A possible one-sided test where the area to the left of the z-statistic is the p-value. Open full-size image S0390Frame 3 of 3
The two-sided test where the areas to the left and right of the absolute value of the z-statistic are the p-value. Open full-size image S0391
Capture provenance
Filename capture times, with no recorded timezone. Frames above follow the original gallery positions.
- · S0389 · displayed frame 1
Screenshot 2026-10-05 at 4.03.02 PM.png - · S0390 · displayed frame 2
Screenshot 2026-10-05 at 4.03.07 PM.png - · S0391 · displayed frame 3
Screenshot 2026-10-05 at 4.03.10 PM.png
Captured hypotheses in frame order:
The two-sided plot marks and .
Example 4.4.1
Recorded answer to Example 4.4.1 (a)
a) Random – It can be assumed that you didn’t pick the rooms where each of your gift baskets were found.
Normal – There are at least 10 successes (37 and 57) and at least 10 failures (18 and 25) for each sample.
Independent – We can assume that the two samples from different chains are independent from one another. We can also assume that individual items within each gift basket are independent from one another because it was mentioned that the items are randomly chosen by a computer program. Since we are sampling without replacement, there have to be at least gift basket items in the first resort and at least gift basket items in the second resort, which we can assume to be true since it is stated in the problem that thousands of items are randomly assigned to gift baskets each day.
Since we want to know if the the proportion of fruit differs between the two resorts, we use a two-sided test:
The pooled sample proportion is:
Using the formula for the two-sample z test to calculate the z-statistic, we get:
Refer to Gallery 4.4.2 for how to perform these steps on your calculator. Note that the value from the calculator () will be slightly different than the value we derived manually (). Due to the relative ease of use of the calculator, we will use , which corresponds to a p-value of 0.782. Since the p-value is greater than the significance level (), we fail to reject the null hypothesis; we lack the evidence to suggest that the proportions of fruit actually differs between the two resorts.
Note that even if we used the manually-derived value of , we still would have rejected the null hypothesis.
Gallery 4.4.2 Example 4.4.1 (Two-sample z Test on TI-83/84)
Frame 1 of 3
Press the STAT button, go to TESTS, choose “2-PropZTest” and press ENTER Open full-size image S0393Frame 2 of 3
Fill in the number of successes for both populations, the total sample size for both populations, the type of one or two-sided test, and hit “Calculate” Open full-size image S0394Frame 3 of 3
You will be taken back to the main screen and the z-statistic and p-value will be shown. Open full-size image S0395
Capture provenance
Filename capture times, with no recorded timezone. Frames above follow the original gallery positions.
- · S0393 · displayed frame 1
Screenshot 2026-10-05 at 4.03.15 PM.png - · S0394 · displayed frame 2
Screenshot 2026-10-05 at 4.03.19 PM.png - · S0395 · displayed frame 3
Screenshot 2026-10-05 at 4.03.24 PM.png
| Screen | Field | Captured value |
|---|---|---|
| Input | 37 | |
| Input | 55 | |
| Input | 57 | |
| Input | 82 | |
| Input | Alternatives shown | |
| Input | Selected alternative | Indeterminate; no alternative is visibly highlighted. |
| Result | Alternative shown in header | |
| Result | −0.276882… | |
| Result | p-value | 0.7818706… |
| Result | 0.672727… | |
| Result | 0.695122… | |
| Result | Pooled | 0.686131… |
Interactive 4.4.1 Example 4.2.1
Captured callout labels: z-statistic of Interest; p-value of interest. Captured cutoffs: and .
Recorded answer to Example 4.4.1 (b)
b) A confidence interval consistent with our results in (a) would have a confidence level of 95%. A confidence level of 95% for a two-sided significance test means that we have to divide the significance level, , between both tails; an area of 0.025 lies in the right tail and an area of 0.025 lies in the left. 0.025 in the right tail means that the area to the left of it is 0.975, which corresponds to a critical z-value of 1.96 according to the z-table.
Using the formula for the two-sample z-interval, we get:
Refer to Gallery 4.4.3 for how to perform these steps on your calculator.
We can be 95% confident that a given gift basket from the second resort contains between 18.2% less fruit and 13.7% more fruit than a gift basket from the first resort. Since 0 is included in this interval (meaning that the first resort puts just as large a percentage of fruit in their gift baskets as the second resort), this goes with the results from the hypothesis test in stating that we lack the evidence to say if the fruit ratios actually differ between the two dif-
Gallery 4.4.3 Example 4.4.1 (Two-sample z Interval on TI 83/84)
Frame 1 of 3
Press the STAT button, go to TESTS, choose “1-PropZInt” and press ENTER Open full-size image S0397Frame 2 of 3
Fill in the number of successes, the total sample size, and the desired confidence level and hit “Calculate”. Open full-size image S0398Frame 3 of 3
You will be taken back to the main screen and your interval will be shown. Open full-size image S0399
Capture provenance
Filename capture times, with no recorded timezone. Frames above follow the original gallery positions.
- · S0397 · displayed frame 1
Screenshot 2026-10-05 at 4.03.30 PM.png - · S0398 · displayed frame 2
Screenshot 2026-10-05 at 4.03.34 PM.png - · S0399 · displayed frame 3
Screenshot 2026-10-05 at 4.03.39 PM.png
| Screen | Field | Captured value |
|---|---|---|
| Input | 37 | |
| Input | 55 | |
| Input | 57 | |
| Input | 82 | |
| Input | C-Level | 0.95 |
| Result | Interval | (−0.1815, 0.13668) |
| Result | 0.672727… | |
| Result | 0.695122… | |
| Result | 55 | |
| Result | 82 |
Pop Quiz 4.4.1
Glossary and deeper reading · 14 refreshers
These editorial refreshers supplement the reading. Definitions and examples are added guidance; original source wording and recorded answers remain in their original context.
-
Statistical inference
Statistical inference uses data and a study design to draw conclusions beyond the observed values. Random sampling supports population generalization, while well-conducted random assignment supports treatment-effect conclusions. For example, a random sample can estimate a school-wide preference without surveying every student.
Read more: Statistical inference in the captured Statistics reading →
-
Sample proportion
A sample proportion is the number of sampled individuals with a specified characteristic divided by the sample size. It is commonly written p-hat and estimates the corresponding population proportion. For example, 18 walkers among 60 sampled students give a sample proportion of 0.30.
Read more: Sample proportion in the captured Statistics reading →
-
Difference between sample proportions
A difference between sample proportions compares the observed fractions in two samples. Its order matters, and inference must account for both sample sizes and the independence or dependence of the groups. For example, subtracting one class’s walking proportion from another’s estimates a difference between their population proportions.
Read more: Difference between sample proportions in the captured Statistics reading →
-
Difference between sample means
A difference between sample means compares two groups’ observed averages. Inference must reflect whether the samples are independent or paired rather than treating every comparison the same way. For example, two independently sampled classes’ mean travel times can estimate a difference between their population means.
Read more: Difference between sample means in the captured Statistics reading →
-
Sample
A sample is the subset of a population actually studied. How it is selected matters for the conclusions that can be drawn about the population. For example, 60 selected students may be a sample from a school’s full enrollment.
-
Random sampling
Random sampling uses a specified chance process to select individuals from a population. It supports population inference when the sampling frame and data collection are appropriate, but does not guarantee perfect balance or eliminate every source of bias. For example, a random-number generator can select student identifiers from an enrollment list.
Read more: Random sampling in the captured Statistics reading →
-
Sampling distribution
A sampling distribution describes how a statistic varies across all possible samples drawn under a specified sampling design and sample size. It is a distribution of statistics rather than of individual observations. For example, the proportions from repeated random samples of 60 students form a sampling distribution.
Read more: Sampling distribution in the captured Statistics reading →
-
Central limit theorem
Editorial qualification: The captured n ≥ 30 statement is not a universal guarantee. Under the CLT’s assumptions, the accuracy of a Normal approximation depends on the population and sample size.
For independent identically distributed observations with finite variance, the central limit theorem explains why the standardized sample mean approaches a Normal distribution as sample size increases. There is no universal sample size that makes every population sufficiently close to Normal; skewness and extreme tails affect the approximation. For example, averaging many independent waiting times can produce a less skewed distribution of averages than the original waiting-time distribution.
Read more: Central limit theorem in the captured Statistics reading →
-
Statistical independence
Statistical independence means that learning one outcome does not change the probability distribution of another. For two events, it implies that the probability of both occurring equals the product of their probabilities. For example, independent draws with replacement keep the second draw’s color probabilities unchanged by the first.
Read more: Statistical independence in the captured Statistics reading →
-
Sampling without replacement
Sampling without replacement does not return selected items before later selections. Selections from a finite population are dependent, although treating them as approximately independent can be reasonable when the sample is a small fraction of the population. For example, selecting students without replacement ensures that no student is chosen twice.
Read more: Sampling without replacement in the captured Statistics reading →
-
Significance test
A significance test assesses how compatible observed data are with a specified null model. It compares a test statistic or p-value with a decision rule chosen for the study. For example, a test can assess whether a sample provides evidence that a population walking proportion differs from a stated value.
Read more: Significance test in the captured Statistics reading →
-
Test statistic
A test statistic summarizes how the sample departs from the null model. Its reference distribution under the null supplies the probabilities used in testing. For example, a z-statistic expresses a sample proportion’s difference from a hypothesized proportion in null-model standard-error units.
Read more: Test statistic in the captured Statistics reading →
-
Null hypothesis
A null hypothesis specifies the reference claim or model used to calculate a test’s probabilities. It commonly states no population difference or a particular parameter value. For example, a null hypothesis can state that the population mean travel time equals 15 minutes.
Read more: Null hypothesis in the captured Statistics reading →
-
Alternative hypothesis
An alternative hypothesis specifies the population difference or direction for which a test seeks evidence. It should be chosen from the research question before inspecting results. For example, an alternative can state that the population mean travel time is greater than 15 minutes.
Read more: Alternative hypothesis in the captured Statistics reading →