Why the Sign of the z Statistic Matters
A one-proportion z test compares a sample proportion with a value specified by the null hypothesis. The z statistic tells us how far the sample result is from that null value, measured in standard errors. Its sign tells us whether the sample proportion is above or below the null value. To calculate a p-value, we also need the alternative hypothesis: it identifies which results count as evidence against the null.
For a lower-tail alternative, small values of the statistic are evidence against the null, so the p-value is the standard normal area to the left of the observed z statistic. For a two-sided alternative, departures in either direction count, so the p-value includes extreme values on both sides. These rules depend on the direction of the alternative, not on which direction happens to look more convenient after seeing the data.
The One-Proportion z Model
Before using a z-test p-value, confirm that the normal model for the test statistic is reasonable. Suppose each observation is a binary outcome, with “success” defined in advance, and the null hypothesis specifies population proportion \(p_0\). The sample proportion is \(\hat{p}=x/n\), where \(x\) is the number of successes among \(n\) observations. Under the null, its standard error is calculated using \(p_0\), not \(\hat{p}\).
The p-value procedure uses the approximation \(Z\sim N(0,1)\) for the test statistic under \(H_0\). This approximation is appropriate when the data come from a suitable random sample or randomized process, observations are independent (or the sampling design justifies treating them as approximately independent), and the null expected numbers of successes and failures are sufficiently large. A common check is \(np_0\ge 10\) and \(n(1-p_0)\ge 10\). These checks concern the null model; a large observed count alone does not establish that the approximation is suitable.
The standard normal cumulative distribution function, often written \(\Phi(z)\), gives the area to the left of \(z\): \(\Phi(z)=P(Z\le z)\). A table or calculator may report this left-tail area directly. If it reports left-tail areas, an upper-tail area is \(P(Z\ge z)=1-\Phi(z)\). For a continuous distribution, using \(<\) instead of \(\le\) does not change these probabilities.
Lower-Tail p-Values
For a lower-tail test, the alternative is \(H_a:p<p_0\). Values of \(\hat{p}\) below \(p_0\) give negative z statistics, and more negative statistics are increasingly far in the direction specified by the alternative. The p-value is the probability of getting a statistic at least that far into the lower tail if \(H_0\) is true.
Worked Example: A Lower-Tail Test
In a hypothetical random sample of 100 customers, 34 report a specified binary outcome. Test \(H_0:p=0.40\) against \(H_a:p<0.40\), and find the p-value using a one-proportion z test.
Check the model conditions. The hypothetical sample is treated as random, with independent customer outcomes. Under the null, the expected numbers of successes and failures are \(np_0=100(0.40)=40\) and \(n(1-p_0)=100(0.60)=60\). Both exceed 10, so the normal approximation is reasonable under these stated conditions.
The sample proportion is \(\hat{p}=34/100=0.34\). The null standard error and observed statistic are
Because the alternative is lower-tailed, the p-value is the area to the left of \(-1.225\):
If the null proportion really were 0.40 and the model conditions held, the probability of obtaining a z statistic of \(-1.225\) or smaller would be about 0.110. The observed sample proportion is below 0.40, but that fact by itself does not make the result statistically significant at a 0.05 significance level.
Two-Sided p-Values
For a two-sided test, the alternative is \(H_a:p\ne p_0\). A sample proportion much smaller than \(p_0\) and one much larger than \(p_0\) both count as departures from the null. The two-sided p-value adds the tail area at least as extreme as the observation on each side of zero.
The two equivalent tail expressions follow from the symmetry of the standard normal distribution. In terms of the observed sign, if \(z>0\), double the upper-tail area beyond \(z\); if \(z<0\), double the lower-tail area below \(z\). Thus, a positive observed statistic does not turn a two-sided test into an upper-tail test: it merely tells us which tail is the smaller one to double.
Worked Example: A Positive Statistic in a Two-Sided Test
In a hypothetical random sample of 100 observations, 58 are successes. Test \(H_0:p=0.50\) against \(H_a:p\ne 0.50\). Assume the sample is random and the observations are independent.
The null expected success and failure counts are \(100(0.50)=50\) each, satisfying the usual minimum count check. The sample proportion is \(\hat{p}=58/100=0.58\). Calculate the null standard error and z statistic:
The statistic is positive, so the smaller tail is the upper tail beyond 1.60. Its area is approximately \(P(Z\ge 1.60)=0.0548\). A two-sided p-value includes the equally large lower-tail area:
Under the null model, the probability of a standard normal statistic at least 1.60 units from zero in either direction is about 0.110. The two directions are both included because the alternative allows the population proportion to be either below or above 0.50.
Why the Two-Sided Rule Works
The two-sided formula is a consequence of symmetry and the definition of “at least as far from zero.” Let \(a=|z|\), so \(a\ge 0\). A standard normal statistic is at least as far from zero as the observed statistic exactly when it is no greater than \(-a\) or no less than \(a\). These events do not overlap, so their probabilities add.
The standard normal density is symmetric about zero, so reflecting values on the right of \(a\) to the left of \(-a\) preserves area: \(P(Z\ge a)=P(Z\le -a)\). Therefore,
If the observed \(z\) is negative, then \(-a=z\), giving \(2P(Z\le z)\). If it is positive, then \(a=z\), giving \(2P(Z\ge z)\). This also explains why the absolute value is essential: the two-sided probability depends on distance from zero, not on the sign alone. At \(z=0\), the probability is 1, since every possible value of \(Z\) is at least zero units from zero.
Worked Example: A Negative Statistic in a Two-Sided Test
In a hypothetical random sample of 100 independent observations, 24 are successes. Test \(H_0:p=0.30\) against \(H_a:p\ne 0.30\). Treat the sample as random and check that the null expected counts support the z approximation.
The expected numbers of successes and failures under the null are \(100(0.30)=30\) and \(100(0.70)=70\), both at least 10. The observed proportion is \(\hat{p}=24/100=0.24\), and the null standard error is
The observed statistic is
Because the statistic is negative, the smaller tail is the lower tail. The standard normal area to the left of \(-1.309\) is approximately 0.0952. Double that area for the two-sided test:
The p-value is about 0.190. Under the null model, a statistic at least as far from zero as \(-1.309\), in either direction, would occur with probability about 0.190. The negative sign indicates that the sample proportion was below 0.30; the two-sided alternative means that equally extreme results above 0.30 also count.
A Reliable Calculation Routine
The following sequence keeps the hypothesis direction, the observed sign, and the normal tail area aligned. Retain the unrounded statistic during the calculation when possible, and round the reported p-value to an appropriate number of significant figures.
Use \(H_a:p<p_0\) for a lower-tail p-value, and \(H_a:p\ne p_0\) for a two-sided p-value. The alternative determines which outcomes count as evidence against \(H_0\).
Calculate \(z=(\hat{p}-p_0)/SE_0\), using the standard error under the null. Check that the randomization or sampling and normal-approximation conditions are reasonable.
For a lower-tail test, use \(P(Z\le z)\). For a two-sided test, use twice the area in the tail in the direction of the observed statistic, equivalently \(2P(Z\le -|z|)\).
State the p-value and explain it as a probability under the null model, in the context of the tested proportion. Do not describe it as the probability that \(H_0\) is true.
Common Mistakes and Why the P-Value Matters
A frequent mistake is to use the tail corresponding to the sign of \(z\) without first checking the alternative. A negative \(z\) does not automatically call for a lower-tail p-value: it does for a lower-tail alternative, but a two-sided alternative requires including both extreme tails. Similarly, a positive \(z\) in a two-sided test requires twice the upper-tail area, not just the upper-tail area.
Another error is to double the larger tail. For \(z=1.60\), for example, the upper-tail area is about 0.0548, whereas the lower-tail area is about 0.9452. Doubling the larger area would give 1.8904, which cannot be a probability. The two-sided p-value must be the probability in the two tails beyond \(-|z|\) and \(|z|\), so it cannot exceed 1.
A p-value summarizes how unusual the observed statistic, or one more extreme under the alternative, would be if the null model were correct and the assumptions held. It does not measure the size or practical importance of a difference in proportions, and it is not the probability that the null hypothesis is true. Correctly matching the tail to the alternative is essential: even perfectly read normal probabilities answer the wrong question if the wrong tail is chosen.
Check Your Understanding
For each question, identify the required tail area before calculating or interpreting it.
- A lower-tail test has observed statistic \(z=-1.40\). Write the probability expression for its p-value.
- A two-sided test has observed statistic \(z=1.25\). Which tail area should be doubled?
- For a two-sided test with \(z=-2.00\), explain why the upper tail beyond 2.00 is also included.
- In a lower-tail test, the observed statistic is positive. Does its sign change the alternative hypothesis? Explain which area the p-value represents.
- Why is doubling the larger of the two tail areas not a valid way to compute a two-sided p-value?