From the Formula to a Hand Calculation
In The Test Statistic \(z\) for One Proportion, you learned that the statistic measures how far the observed sample proportion is from the null value, in standard-error units. This tutorial puts that formula to work by hand. You will calculate \(z\) for 42 successes in a sample of 135 when the null proportion is \(p_0=0.60\), then sketch the Normal curve used to picture the comparison.
Keep the quantities distinct as you work: \(x\) is the observed number of successes, \(n\) is the sample size, \(\hat{p}=x/n\) is the sample proportion, and \(p_0\) is the proportion stated in the null hypothesis. For a one-proportion \(z\)-test, the standard error is calculated under the null model, using \(p_0\).
A hand calculation is not complete just because the formula has been filled in. Before using the Normal model for a test, check the Random condition, the 10% condition when appropriate, and the Large Counts condition using the null proportion. These checks were developed in the earlier tutorials on one-proportion test conditions; here, we will use them as part of the calculation.
Sketching the Null Normal Curve
Under \(H_0:p=p_0\), the sampling distribution of \(\hat{p}\) is modeled as approximately Normal when the test conditions are met. Its center is \(p_0\), and its standard deviation under the null model is \(SE_0\). A sketch shows this null distribution, the observed \(\hat{p}\), and the tail or tails that correspond to the alternative hypothesis.
For a useful hand sketch, draw a bell-shaped curve and label its center \(p_0\). Mark a few standard-error steps to the left and right. Then locate the observed sample proportion, or equivalently its \(z\) score, on the horizontal axis. A \(z\) score of \(-2\), for instance, goes two standard errors left of the center; \(z=2\) goes two standard errors right.
The curve is a model for sample proportions that could occur if the null hypothesis were true. The observed \(\hat{p}\) is one result from the sample, not the center of that null model. Also, a sketch helps communicate the direction and extremeness of a result; it does not replace the arithmetic or, by itself, establish the final test conclusion.
Worked Examples
Worked Example: 42 Out of 135 Compared with 0.60
A fictional community survey randomly selects 135 residents and asks whether they support a proposed service change. Forty-two say yes. Consider \(H_0:p=0.60\) and \(H_a:p<0.60\), where \(p\) is the true proportion of residents in the community who support the change. Calculate the test statistic by hand and describe how to sketch the null Normal curve.
State: The parameter is \(p\), the true proportion of residents in the community who support the service change. The null value is \(p_0=0.60\). The sample has \(x=42\) successes and \(n=135\), so the observed sample proportion is:
Plan and check conditions: The survey is described as a random sample, so the Random condition is met. If the sample was selected without replacement from at least 1,350 community residents, the 10% condition is met: \(135\leq0.10(1350)=135\). Under the null, the expected number of successes is \(np_0=135(0.60)=81\), and the expected number of failures is \(n(1-p_0)=135(0.40)=54\). Both expected counts are at least 10, so the Large Counts condition for the test is met.
Do: Calculate the standard error from \(p_0\), then use the observed \(\hat{p}\) in the numerator:
Conclude about the statistic: The sample proportion is about 6.852 null-model standard errors below 0.60. The negative sign is expected because \(0.3111<0.60\).
Sketch: Draw an approximately Normal curve centered at \(0.60\). Its standard deviation is about \(0.04216\), so one standard-error step left of the center is \(0.60-0.04216\approx0.5578\), and one step right is about \(0.6422\). Mark \(\hat{p}\approx0.3111\), or mark \(z\approx-6.852\) more than six standard-error steps to the left. Since \(H_a:p<0.60\), shade the area to the left of the observed value. The mark lies far into that tail; the sketch communicates its position, while a later p-value calculation quantifies the tail area.
Worked Example: A Sample Proportion Above the Null Value
In a fictional survey, 68 of 100 randomly selected members of a large recreation program say they attended an event last month. Test-statistic calculations are being made for \(H_0:p=0.60\), where \(p\) is the true proportion of program members who attended. For a sketch, use the alternative \(H_a:p>0.60\).
The sample proportion is \(\hat{p}=68/100=0.68\). The sample is random, and if it was drawn without replacement from at least 1,000 program members, the 10% condition holds because \(100\leq0.10(1000)=100\). The null expected counts are \(100(0.60)=60\) successes and \(100(0.40)=40\) failures, both at least 10.
The null standard error and test statistic are:
The observed proportion is about 1.633 null-model standard errors above 0.60. For the sketch, center the curve at \(0.60\), mark the observed result to the right at \(z\approx1.633\), and shade the area to its right because the alternative is \(p>0.60\). The right-tail direction comes from the alternative hypothesis, not from a decision made after seeing the sample.
Worked Example: A Two-Sided Sketch
A fictional random sample of 120 online orders finds that 70 were delivered within the promised time. Calculate \(z\) for \(H_0:p=0.50\), where \(p\) is the true proportion of orders delivered within the promised time. Suppose the question asks whether the proportion differs from 0.50, so \(H_a:p\ne0.50\).
The sample proportion is \(\hat{p}=70/120\approx0.5833\). The orders were randomly selected. If sampled without replacement from at least 1,200 eligible orders, the 10% condition holds because \(120\leq120\). Under the null, there are \(120(0.50)=60\) expected successes and \(120(0.50)=60\) expected failures. Both meet the Large Counts condition.
Calculate the null standard error and \(z\):
The sample proportion is about 1.826 standard errors above the null proportion. Sketch a curve centered at \(0.50\), mark the observed value at \(z\approx1.826\), and shade the area at least that far from the center in both directions. Thus, the sketch has a right-tail region beyond \(z=1.826\) and a matching left-tail region below \(z=-1.826\). Both tails are shown because the alternative allows a departure in either direction.
Common Mistakes and What Full Credit Says
A clear hand calculation makes each quantity visible, uses the null model consistently, and connects the sketch to the alternative hypothesis. Avoid these specific errors:
- Using \(x\) instead of \(\hat{p}\) in the numerator. The formula compares proportions, so first calculate \(\hat{p}=x/n\). In the main example, compare \(42/135\) with \(0.60\), not 42 with 0.60.
- Using \(\hat{p}\) in the test standard error. The test standard error is \(\sqrt{p_0(1-p_0)/n}\). As in Why Tests Use \(p_0\) in the Standard Deviation, it describes variation predicted by the null model.
- Reversing the subtraction. Use \(\hat{p}-p_0\), not \(p_0-\hat{p}\). The sign tells whether the observed proportion is below or above the null value.
- Centering the curve at the observed proportion. The sketch represents the null model, so its center is \(p_0\). Mark \(\hat{p}\) as the observed result away from that center.
- Shading the wrong tail. Read the direction from \(H_a\): below means left, above means right, and “different” means both tails. Do not choose the tail just because of where the data happened to land.
- Calling the \(z\) statistic a probability or a decision. A \(z\) score is a signed distance in standard-error units. It is not the p-value and does not alone say “reject” or “fail to reject.”
Key Takeaway
Calculating a one-proportion test statistic by hand links the observed sample proportion to the sampling model assumed by the null hypothesis. The Normal curve makes that standardized comparison visible: \(p_0\) is at the center, and the observed result is placed according to its \(z\) score.
Check Your Understanding
For each question, show the calculation when requested and describe the appropriate sketch.
- A sample has \(x=36\), \(n=90\), and \(p_0=0.50\). Calculate \(\hat{p}\), \(SE_0\), and \(z\).
- For the values in Question 1, explain where the observed sample proportion lies relative to the null curve’s center.
- If \(H_a:p>p_0\), which part of the curve should be shaded? Explain how the alternative determines the shading.
- For a test with \(n=80\) and \(p_0=0.15\), calculate the expected successes and failures and check the Large Counts condition.
- A student draws the null curve centered at \(\hat{p}\). What should the center be, and why?