Confidence interval vs hypothesis test: which to use

By Jude Wallis · Updated

Use a confidence interval when the question asks you to estimate the parameter, and a hypothesis test when it asks whether one specific claimed value holds up. The interval returns a range of plausible values; the test returns a p-value and a decision about that single value.

AP Statistics: Unit 3 (topics 3.3 Constructing a Confidence Interval for a Population Proportion, 3.4 Justifying a Claim Based on a Confidence Interval for a Population Proportion, 3.5 Setting Up a Test for a Population Proportion, 3.7 Carrying Out a Test for a Population Proportion). The Fall 2026 AP Statistics course teaches both procedures side by side in Unit 3 for proportions (topics 3.3 and 3.4 for the interval, topics 3.5 through 3.7 for the test) and repeats the pairing in Unit 4 for means (topics 4.2 and 4.3 for the interval, topics 4.4 and 4.5 for the test), which is why knowing the wording cues matters on the free-response section.

The short answer

These two procedures answer different questions, so the choice is not a matter of taste.

  • A confidence interval estimates. It starts from your data and hands back a range of plausible values for the unknown parameter.
  • A hypothesis test evaluates a claim. It starts from one specific value someone asserted and rates the evidence against it.

If nobody has named a number, you cannot run a test, because a test needs a null value to work from. If a number has been named and the question is only about that number, an interval does more work than was asked.

Both start from the same three ingredients: a sample statistic, a standard error, and a distribution (z or t). They differ in what they do with them.

What each procedure actually gives you

A confidence interval takes the form

statistic±(critical value)(standard error)\text{statistic} \pm (\text{critical value})(\text{standard error})

and the output is two numbers. You read it as a set of plausible parameter values, and you choose the confidence level CC yourself. Details of the arithmetic are in how to calculate a confidence interval, and the meaning of the 95% is in what 95% confidence means.

A hypothesis test takes the form

test statistic=statisticclaimed valuestandard error\text{test statistic} = \frac{\text{statistic} - \text{claimed value}}{\text{standard error}}

and the output is a p-value, which you compare against a significance level α\alpha you fixed in advance. The p-value is the probability of a statistic at least this extreme when the null hypothesis is true, spelled out in what a p-value means.

The difference in information matters. The interval tells you roughly how big the parameter is, so it speaks to size. The p-value only rates how surprising your data would be under one claim, so it speaks to strength of evidence and says nothing about magnitude.

Reading the choice off the wording of the question

The phrasing is a reliable signal. Sort the prompt into one of these two piles.

Build an interval when you see: estimate, construct a 95% interval, plausible values, give a range, margin of error, how large is the difference, with 95% confidence.

Run a test when you see: is there convincing evidence, test the claim, do the data support, at the α=0.05\alpha = 0.05 level, has the proportion changed, is the mean greater than, state the hypotheses.

Two shortcuts sharpen this further.

  1. Look for a number attached to a claim. "The company says 30%" gives you a null value, which points to a test. No claimed number means no test is possible.
  2. Look for the word "convincing". In an AP prompt it almost always means a significance test is wanted, and it is your cue to write hypotheses.

A prompt can also name the procedure outright, which settles it. If a free-response question says "construct and interpret a 95% confidence interval", constructing a test statistic instead earns nothing, no matter how good the arithmetic is.

Side by side

Confidence intervalHypothesis test
Question it answersWhat is the parameter, roughly?Is this specific claimed value believable?
What you must supplyA confidence level CCA claimed value (p0p_0 or μ0\mu_0) and a level α\alpha
OutputTwo endpointsA test statistic, a p-value, a decision
Formstatistic ±\pm (critical value)(SE)(statistic - claimed value) / SE
Standard error for a proportionBuilt from p^\hat{p}Built from p0p_0
Standard error for a means/ns/\sqrt{n}s/ns/\sqrt{n}
Speaks to effect sizeYes, through width and locationNo, only to strength of evidence
Conclusion wording"We are 95% confident the true ... is between ... and ...""There is (not) convincing evidence that ..."
AP topics3.3, 3.4, 4.2, 4.33.5, 3.6, 3.7, 4.4, 4.5

One row deserves a second look. For a mean the two standard errors are identical, and for a proportion they are not. That single difference is what the last two sections are about.

The duality: values outside the interval are values the test rejects

The two procedures are linked, and the link is called duality. A confidence interval at level CC is very nearly the collection of null values that a two-sided test at α=1C\alpha = 1 - C would fail to reject.

So for a two-sided test:

  • A claimed value outside the interval generally corresponds to rejecting H0H_0.
  • A claimed value inside the interval generally corresponds to failing to reject H0H_0.

That is why a 95% interval pairs with α=0.05\alpha = 0.05 and a 90% interval with α=0.10\alpha = 0.10. Line up α=1C\alpha = 1 - C before comparing anything.

Tails have to line up too. A one-sided test at α\alpha pairs with a two-sided interval at level 12α1 - 2\alpha, so a one-sided test at 0.05 corresponds to a 90% interval, not a 95% one. Mismatched tails are the most common fake disagreement, and one-tailed vs two-tailed tests walks through why.

For a mean the duality is exact. The one-sample t interval and the one-sample t test both divide by sn\frac{s}{\sqrt{n}} and both use the same t distribution with n1n - 1 degrees of freedom, so with matched level and matched tails they can never contradict each other. If they seem to, recheck the arithmetic.

The one-proportion exception, stated honestly

For proportions the duality is an approximation, not an identity, and the reason is a single line of algebra.

The one-proportion z test uses the standard deviation the sampling distribution would have if H0H_0 were true, so its denominator is built from the null value p0p_0:

z=p^p0p0(1p0)nz = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1 - p_0)}{n}}}

The confidence interval has no null value to lean on, so it estimates the standard error from the data, using p^\hat{p} (p-hat, the sample proportion):

p^±zp^(1p^)n\hat{p} \pm z^{*}\sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}

Same gap in the numerator, two different denominators. Since p(1p)p(1-p) is largest at 0.5, the comparison depends on where p^\hat{p} and p0p_0 sit relative to 0.5. When p^\hat{p} is closer to 0.5 than p0p_0 is, the interval is the wider yardstick and the test rejects more readily; when p^\hat{p} is farther from 0.5, the interval is narrower and it can exclude p0p_0 while the p-value still sits above α\alpha.

So do not tell a reader that a 95% interval excluding p0p_0 is the same statement as p<0.05p < 0.05. It is a strong tendency that breaks in borderline cases, and the split is worked out in full in when a confidence interval and p-value disagree.

Two proportions behave the same way, and more so. The two-proportion z test pools both samples into one combined proportion for its standard error, while the two-proportion interval keeps the samples separate, so a 95% interval for p1p2p_1 - p_2 that excludes 0 does not guarantee a p-value below 0.05. See two-proportion confidence interval contains zero.

Writing the conclusion for each one

The procedures need different sentences, and graders read for the specific pieces.

For an interval, name the level, the parameter in context, and the two endpoints, then answer the question that was asked:

"We are 95% confident that the true proportion of bike-share trips ending at a docking station is between 0.563 and 0.697. Since 0.70 is not in that interval, 0.70 is not a plausible value for the true proportion."

For a test, compare the p-value to α\alpha, give a decision about H0H_0, and then say what that means in context:

"Since the p-value of 0.031 is less than α=0.05\alpha = 0.05, reject H0H_0. There is convincing evidence that the proportion of trips ending at a docking station differs from 0.70."

Three wording rules apply to both. Never say you proved anything, never say you accept H0H_0 (failing to reject is not evidence that the claim is true), and never attach the confidence level to a single interval as if it were a probability that the parameter is inside. The confidence level describes the method that produced the interval, not the one interval in front of you.

Mistakes to avoid

  • Running a test with no claimed value. Without a p0p_0 or a μ0\mu_0 there is no null hypothesis, so estimate instead.
  • Comparing a 95% interval against a one-sided test at α=0.05\alpha = 0.05. That test pairs with a 90% interval.
  • Putting p^\hat{p} into the test's standard error, or p0p_0 into the interval's. The swap costs points on its own and can fake either agreement or conflict.
  • Reusing one condition check for both procedures on a proportion. The test checks np010np_0 \geq 10 and n(1p0)10n(1 - p_0) \geq 10; the interval checks np^10n\hat{p} \geq 10 and n(1p^)10n(1 - \hat{p}) \geq 10. A problem can pass one and fail the other.
  • Reporting only the p-value when the question asked how large the effect is.
  • Concluding a claim is true because the interval contains it. The interval only says that value is plausible, along with every other value in the range.

Both procedures on the same proportion data

A campus bike-share operator claims that 70% of trips end at a docking station. The system logged 40,000 trips last semester, and in a random sample of 200 of them, 126 ended at a docking station. Test H0:p=0.70H_0: p = 0.70 against Ha:p0.70H_a: p \neq 0.70 at α=0.05\alpha = 0.05, then construct a 95% confidence interval, and compare what each one tells you.

  1. Define the parameter and the hypotheses. Let pp be the true proportion of all trips that end at a docking station. H0:p=0.70H_0: p = 0.70 and Ha:p0.70H_a: p \neq 0.70, with α=0.05\alpha = 0.05.

  2. Sample proportion: p^=126200=0.63\hat{p} = \frac{126}{200} = 0.63.

  3. Check conditions separately for each procedure. The sample is random, and 0.10(40,000)=4,0000.10(40{,}000) = 4{,}000 with 2004,000200 \leq 4{,}000, so the 10% condition is met. For the test, np0=200(0.70)=14010np_0 = 200(0.70) = 140 \geq 10 and n(1p0)=200(0.30)=6010n(1 - p_0) = 200(0.30) = 60 \geq 10. For the interval, np^=12610n\hat{p} = 126 \geq 10 and n(1p^)=7410n(1 - \hat{p}) = 74 \geq 10.

  4. Test standard error, from p0p_0. Multiply: (0.70)(0.30)=0.21(0.70)(0.30) = 0.21. Divide by 200: 0.21/200=0.001050.21/200 = 0.00105. Square root: 0.00105=0.032404\sqrt{0.00105} = 0.032404.

  5. Test statistic: z=0.630.700.032404=0.070.032404=2.160z = \frac{0.63 - 0.70}{0.032404} = \frac{-0.07}{0.032404} = -2.160.

  6. P-value. The test is two-sided, so double one tail. The z-table gives P(Z<2.16)=0.0154P(Z < -2.16) = 0.0154, so the p-value is 2(0.0154)=0.03082(0.0154) = 0.0308. Technology gives 0.0308 as well.

  7. Test decision: 0.0308<0.050.0308 < 0.05, so reject H0H_0. There is convincing evidence that the proportion of trips ending at a docking station differs from 0.70.

  8. Interval standard error, from p^\hat{p}. Multiply: (0.63)(0.37)=0.2331(0.63)(0.37) = 0.2331. Divide by 200: 0.2331/200=0.00116550.2331/200 = 0.0011655. Square root: 0.0011655=0.034139\sqrt{0.0011655} = 0.034139.

  9. Margin of error at 95% confidence, where z=1.96z^{*} = 1.96: 1.96(0.034139)=0.0669131.96(0.034139) = 0.066913.

  10. Interval: 0.63±0.0669130.63 \pm 0.066913, giving (0.5631,0.6969)(0.5631, 0.6969). The claimed value 0.70 falls just outside the upper endpoint, so the interval agrees with the test here.

  11. Read the two outputs. The test says the data are unlikely under a true proportion of 0.70. The interval adds the size information the test does not carry: the plausible values run from about 56% to just under 70%, so the shortfall against the claim could be as small as a third of a percentage point.

  12. Notice how close the agreement is. The interval's own standardized distance is 0.070.034139=2.050\frac{-0.07}{0.034139} = -2.050, against the test's 2.160-2.160, because p^=0.63\hat{p} = 0.63 is closer to 0.5 than p0=0.70p_0 = 0.70 is. Shift the data slightly and these two can land on opposite sides of the cutoff.

The test rejects H0H_0: z=2.16z = -2.16 with a p-value of 0.0308, below α=0.05\alpha = 0.05. The 95% interval is (0.563,0.697)(0.563, 0.697), which excludes 0.70. Both point the same way, and the interval also shows that the true proportion is plausibly anywhere from about 0.56 to just under 0.70.

Both procedures on the same mean data, where they match exactly

A roaster fills coffee bags labelled 340 grams. From a day's production of 2,000 bags, a random sample of 16 bags has a mean of 336.5 grams and a standard deviation of 6.0 grams, and a dotplot of the sample shows no strong skew or outliers. Test H0:μ=340H_0: \mu = 340 against Ha:μ340H_a: \mu \neq 340 at α=0.05\alpha = 0.05, and construct a 95% confidence interval.

  1. Define the parameter and the hypotheses. Let μ\mu (mu) be the true mean fill weight in grams. H0:μ=340H_0: \mu = 340 and Ha:μ340H_a: \mu \neq 340, with α=0.05\alpha = 0.05.

  2. Conditions: the sample is random, 0.10(2,000)=2000.10(2{,}000) = 200 and 1620016 \leq 200, and the dotplot shows no strong skew or outliers, so a t procedure is reasonable. Degrees of freedom: 161=1516 - 1 = 15.

  3. Standard error, shared by both procedures: sn=6.016=6.04=1.5\frac{s}{\sqrt{n}} = \frac{6.0}{\sqrt{16}} = \frac{6.0}{4} = 1.5.

  4. Test statistic: t=336.53401.5=3.51.5=2.333t = \frac{336.5 - 340}{1.5} = \frac{-3.5}{1.5} = -2.333.

  5. P-value from the t-table with 15 degrees of freedom. The two-tailed cutoffs are 2.131 at 0.05 and 2.602 at 0.02, and 2.131<2.333<2.6022.131 < 2.333 < 2.602, so the p-value is between 0.02 and 0.05. Technology gives about 0.034.

  6. Test decision: the p-value is below α=0.05\alpha = 0.05, so reject H0H_0. There is convincing evidence that the true mean fill weight differs from 340 grams.

  7. Confidence interval with the same standard error, using t=2.131t^{*} = 2.131 for 95% confidence and 15 degrees of freedom. Margin of error: 2.131(1.5)=3.19652.131(1.5) = 3.1965.

  8. Interval: 336.5±3.1965336.5 \pm 3.1965, giving (333.30,339.70)(333.30, 339.70). The claimed value 340 falls outside it.

  9. Check the duality directly. The interval excludes 340 exactly when t>t|t| > t^{*}, and here 2.333>2.1312.333 > 2.131. For a mean this is an identity, not a coincidence, because both procedures divide by the same 1.5.

The test rejects H0H_0: t=2.333t = -2.333 with 15 degrees of freedom, p-value about 0.034. The 95% interval (333.30,339.70)(333.30, 339.70) excludes 340 and estimates the shortfall at roughly 0.3 to 6.7 grams below the label.

Frequently asked questions

Can I use a confidence interval instead of running a hypothesis test?

For a two-sided question at a matching level, usually yes: check whether the claimed value lies inside the interval. Two cautions apply. A one-sided test needs the level adjusted, and for proportions the two procedures use different standard errors, so borderline cases can split.

Which one does an AP free-response question want?

Whichever it names. Prompts are explicit, asking you to construct and interpret an interval or to carry out a test, and answering with the other procedure earns little credit. When a prompt supplies an interval and asks you to justify a claim, use the interval and do not compute a p-value.

Does a confidence interval give me a p-value?

Not directly, and how close it gets depends on the parameter. For a mean the correspondence is exact, so a matched-level interval tells you whether the value would be rejected, though never how far the p-value sits from α\alpha. For a proportion the interval and the test use different standard errors, so the correspondence is only approximate and a borderline case can split. Either way, if the question asks for the strength of the evidence, run the test.

If the interval contains the claimed value, is the claim true?

No. The interval says the claimed value is plausible, and so is every other value in the range. Failing to reject a null hypothesis is never evidence that it is correct, only evidence that your data do not contradict it.

Which one is more informative?

The interval, in most reporting situations. It gives a range for the parameter, so it speaks to how large an effect might be, while a p-value only rates the evidence against one specific value. A tiny p-value can accompany an effect too small to matter in practice.