Tutorials › Introduction to Statistics › Finding Upper-Tail Z-Test P-Values

Tests for Proportions · Tutorial 630 of 996

Finding Upper-Tail Z-Test P-Values

Use the observed z statistic and the stated alternative to find and interpret the probability in the standard normal upper tail.

Intermediate 8 min read

What You'll Learn

  • Identify when a one-proportion test requires an upper-tail probability
  • Convert a z statistic into a right-tail area using a standard normal table
  • Use statistical software to calculate the same probability
  • Keep enough precision when moving from a test statistic to a p-value
  • Interpret an upper-tail p-value under the null model and in context
  • Recognize common errors in selecting or interpreting the tail

From a Test Statistic to an Upper-Tail Probability

In a one-proportion z test, the z statistic describes how far the observed sample proportion is from the null proportion, measured in standard errors. The statistic alone does not tell us how unusual the result is under the null hypothesis. To assess that, we find the probability in the direction specified by the alternative hypothesis.

This tutorial focuses on an upper-tail test, where the alternative claims that the population proportion is greater than a specified value. A result far above the null value supports that direction, so the p-value is the area to the right of the observed z statistic. Choosing the correct tail is essential: the direction comes from the alternative hypothesis, not from whichever tail gives a smaller probability.

Definition: For a one-proportion z test with alternative hypothesis \(H_a:p>p_0\), the upper-tail p-value is the probability, assuming \(H_0:p=p_0\), of obtaining a z statistic at least as large as the observed statistic. Using the standard normal distribution, it is \(P(Z\ge z_{\text{obs}})\), where \(Z\sim N(0,1)\).

The Normal-Model Calculation

The usual one-proportion z test assumes a binary outcome, an independent random sample (or a design that justifies treating observations as independent), and a null model with enough expected successes and failures for the normal approximation to be reasonable. A common check is \(np_0\ge 10\) and \(n(1-p_0)\ge 10\). If sampling is without replacement, the population should also be large enough relative to the sample to support the independence approximation; a common guideline is that the sample is no more than 10% of the population.

Under these conditions and assuming the null hypothesis is true, the standardized sample proportion is approximately standard normal. For an upper-tail alternative, values of the test statistic that are at least as large as the observed value are at least as supportive of the alternative as the observed result. Therefore, the p-value is the standard normal probability to the right of \(z_{\text{obs}}\).

$$ p\text{-value}=P(Z\ge z_{\text{obs}})=1-\Phi(z_{\text{obs}}) $$

Here, \(\Phi(z)\) denotes the standard normal cumulative distribution function: \(\Phi(z)=P(Z\le z)\). Most standard normal tables report \(\Phi(z)\), the area to the left. For such a table, subtract the table entry from 1. Some tables instead give the area between 0 and a positive z value; with that format, subtract the listed area from 0.5 to get the upper-tail area.

The standard normal distribution is continuous, so \(P(Z\ge z_{\text{obs}})\) and \(P(Z>z_{\text{obs}})\) have the same value. The equality notation is convenient and does not add probability at a single point.

Worked Examples

Worked Example: A Test Statistic of 2.00

Suppose a hypothetical survey randomly samples 100 eligible voters. Of these, 60 support a proposed measure. The research question is whether the population proportion supporting it exceeds 0.50. The null and alternative hypotheses are \(H_0:p=0.50\) and \(H_a:p>0.50\).

The sample proportion is \(\hat{p}=60/100=0.60\). The null expected counts are \(100(0.50)=50\) successes and \(100(1-0.50)=50\) failures, so both count checks are satisfied. Assume the sample was drawn independently and represents no more than 10% of the eligible population.

Under the null, the standard error is \(\sqrt{0.50(1-0.50)/100}=0.05\). Thus the test statistic is:

$$ z_{\text{obs}}=\frac{0.60-0.50}{0.05}=2.00 $$

The upper-tail p-value is \(P(Z\ge 2.00)\). A standard normal table gives \(\Phi(2.00)=0.9772\), so:

$$ p\text{-value}=1-0.9772=0.0228 $$

Under the null model, the probability of a z statistic of 2.00 or larger is about 0.0228. In this survey context, that is approximately a 2.28% chance of obtaining a sample proportion of at least 0.60 if the population proportion were actually 0.50, using the z-test approximation.

Worked Example: A Less Extreme Positive Statistic

In a different hypothetical study, a random sample of 100 customers finds that 56 would recommend a service. Test \(H_0:p=0.50\) against \(H_a:p>0.50\). Suppose the sample is independent, the population is large relative to the sample, and the null expected counts are adequate.

The observed proportion is \(\hat{p}=56/100=0.56\). Under the null, the standard error is \(\sqrt{0.50(0.50)/100}=0.05\), so:

$$ z_{\text{obs}}=\frac{0.56-0.50}{0.05}=1.20 $$

The standard normal table reports \(\Phi(1.20)=0.8849\). The upper-tail area is its complement:

$$ p\text{-value}=P(Z\ge 1.20)=1-0.8849=0.1151 $$

Assuming the population proportion is 0.50, there is about an 11.51% chance of obtaining a z statistic of at least 1.20 in the direction of the alternative. This p-value is larger than the one in the first example because 1.20 is less far into the upper tail than 2.00.

Worked Example: A Small Upper-Tail Probability

A hypothetical quality-control team tests whether more than 20% of a product batch has a specified feature. In an independent random sample of 100 products, 31 have the feature. The hypotheses are \(H_0:p=0.20\) and \(H_a:p>0.20\).

The null expected counts are \(100(0.20)=20\) products with the feature and \(100(0.80)=80\) without it; both meet the count guideline. Assume the sample is no more than 10% of the batch. The observed proportion is \(31/100=0.31\), and the null standard error is \(\sqrt{0.20(0.80)/100}=0.04\). Therefore:

$$ z_{\text{obs}}=\frac{0.31-0.20}{0.04}=2.75 $$

A table gives \(\Phi(2.75)\approx 0.9970\), so the table-based p-value is:

$$ p\text{-value}\approx 1-0.9970=0.0030 $$

Software using the unrounded normal probability gives approximately 0.002980. These values differ slightly because the table entry is rounded. The z-test result says that, under the null proportion of 0.20, a statistic at least as large as 2.75 has a probability of about 0.003 under the normal approximation.

Using a Table or Statistical Software

A table and software calculate the same upper-tail probability, but they may display different amounts of precision. With a left-cumulative table, locate the observed z value and read \(\Phi(z_{\text{obs}})\), then calculate \(1-\Phi(z_{\text{obs}})\). If the table lists z values only to two decimal places, round the statistic to match the table and report the resulting p-value as approximate.

In software, request the standard normal cumulative probability at the observed z value and take its complement. For example, a command that returns the area to the left of 2.75 returns about 0.9970; the upper-tail p-value is 1 minus that value. Some software allows the right-tail probability to be requested directly. Check what probability the function returns rather than assuming that every normal-distribution function gives the upper tail.

When the original test statistic has more digits than the table supports, use the unrounded statistic for a software calculation. If only a table is available, report a sensible approximation and state it as such. Rounding the z statistic too early can alter the last reported digit of a small p-value.

1
Confirm the alternative.
Use an upper-tail calculation only when the test is \(H_a:p>p_0\).
2
Use the observed statistic.
Take the z statistic from the one-proportion test, retaining its precision when possible.
3
Find the area to the right.
Calculate \(1-\Phi(z_{\text{obs}})\), either from a left-cumulative table or with software.
4
Interpret under the null.
Describe the chance of a result at least as extreme in the direction of the alternative, assuming the null model.

Why the Alternative Determines the Tail

For \(H_a:p>p_0\), sample proportions well above \(p_0\) provide evidence in the claimed direction. Because the z statistic increases as \(\hat{p}\) increases, the relevant outcomes are statistics at least as large as the observed one. This is why the p-value uses the upper tail. The direction is set before examining the sample result; it is not chosen afterward based on whether the observed statistic is positive or negative.

For instance, if an upper-tail test produced a negative observed z statistic, the same rule would still apply: its p-value would be \(P(Z\ge z_{\text{obs}})\), which is greater than 0.5. A negative statistic points away from the upper-tail alternative, but it does not authorize switching to a different tail. Tests with lower-tail or two-sided alternatives require different calculations.

Common Mistakes and Interpretation

  • Reporting the left-tail area. If a table gives \(\Phi(z_{\text{obs}})\), that is the area to the left, not the upper-tail p-value. Subtract it from 1.
  • Choosing a tail from the observed sign. The alternative hypothesis determines the tail. Do not switch tails merely because the observed z statistic has an unexpected sign.
  • Calling the p-value the probability that the null is true. The p-value is calculated assuming the null model; it is not the probability that the null hypothesis is correct.
  • Describing the probability of the exact sample. The p-value is a probability of results at least as extreme in the direction specified by the alternative, not generally the probability of obtaining exactly the observed data.

An upper-tail p-value is evidence measured against the null model, not a measure of the size or practical importance of a difference. For example, a p-value of 0.0228 does not mean there is a 2.28% probability that the null proportion is true. It means that, if the null proportion and test assumptions hold, the probability of a z statistic at least as large as the observed one is about 2.28%.

Key takeaway: For a one-proportion z test with \(H_a:p>p_0\), find the standard normal area to the right of the observed statistic: \(1-\Phi(z_{\text{obs}})\). Interpret that area as a probability calculated under the null model, in the direction set by the alternative.

Check Your Understanding

For each question, keep the alternative hypothesis in view when identifying the probability to calculate.

  1. A one-proportion test has \(H_a:p>p_0\) and \(z_{\text{obs}}=1.50\). If a table gives \(\Phi(1.50)=0.9332\), what is the upper-tail p-value?
  2. Why is the upper-tail p-value for \(z_{\text{obs}}=2.00\) calculated as \(1-\Phi(2.00)\), rather than \(\Phi(2.00)\)?
  3. A researcher obtains a negative z statistic in a test with \(H_a:p>p_0\). Should the researcher switch to a lower-tail probability? Explain.
  4. In context, what does an upper-tail p-value of 0.04 mean under the null hypothesis?
  5. Why can a software p-value differ slightly from one calculated using a standard normal table?