Why do a two-sided hypothesis test and its confidence interval agree?

Quick Overview

Explain why a two-sided hypothesis test at level alpha rejects exactly when the matching confidence interval excludes the null value. Tests test inversion, the coverage argument, the one-sided case, and the situations where a reported test and interval disagree.

Why do a two-sided hypothesis test and its confidence interval agree?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

Can you explain the duality between a two-sided hypothesis test and a confidence interval? Why does a test at level $\alpha$ reject exactly when the corresponding $(1 - \alpha)$ confidence interval excludes the null value? ```hint Solve for the null value Write the rejection rule of a z-test as an inequality involving $\hat\theta$, $\theta_0$ and the standard error, then solve it for $\theta_0$. ``` ```hint Think about coverage If the test rejects a true null with probability $\alpha$, how often does the set of values it fails to reject miss the true parameter? ``` ### What a Strong Answer Covers - The confidence interval as the set of null values the test does not reject - An algebraic demonstration for a standard test statistic - Why the coverage of the inverted set equals one minus the size of the test - How one-sided tests map to intervals, and at which level - Cases where a reported interval and a reported test disagree, and why ### Follow-up Questions - A two-proportion z-test gives $p = 0.048$, but the reported 95% CI for the difference includes 0. How can that happen? - Two groups' 95% confidence intervals overlap. Can the difference between them still be significant at 0.05? - Which confidence interval corresponds to a one-sided test at level 0.05? - You only have a permutation test for a treatment effect. How would you turn it into a confidence interval?

Overview: Explain why a two-sided hypothesis test at level alpha rejects exactly when the matching confidence interval excludes the null value. Tests test inversion, the coverage argument, the one-sided case, and the situations where a reported test and interval disagree.

General logo
General
Nov 24, 2026
mediumData ScientistOtherStatistics & Math
0
0

Can you explain the duality between a two-sided hypothesis test and a confidence interval? Why does a test at level α\alpha reject exactly when the corresponding (1−α)(1 - \alpha) confidence interval excludes the null value?

What a Strong Answer Covers Guidance

  • The confidence interval as the set of null values the test does not reject
  • An algebraic demonstration for a standard test statistic
  • Why the coverage of the inverted set equals one minus the size of the test
  • How one-sided tests map to intervals, and at which level
  • Cases where a reported interval and a reported test disagree, and why

Follow-up Questions Guidance

  • A two-proportion z-test gives p=0.048p = 0.048 , but the reported 95% CI for the difference includes 0. How can that happen?
  • Two groups' 95% confidence intervals overlap. Can the difference between them still be significant at 0.05?
  • Which confidence interval corresponds to a one-sided test at level 0.05?
  • You only have a permutation test for a treatment effect. How would you turn it into a confidence interval?