CIs & p-Values
for Experiments
Learn to compute and interpret confidence intervals and p-values: the two pillars of statistical inference in business experiments.
What Is a Confidence Interval?
A confidence interval (CI) is a range of plausible values for an unknown population parameter, computed from sample data. Instead of a single point estimate, a CI tells you: "We are X% confident the true value lies within this range."
What Is a p-Value?
A p-value measures the probability of observing data as extreme as (or more extreme than) your sample result, assuming the null hypothesis is true. A small p-value suggests the observed effect is unlikely due to chance alone.
Why Experiments Need Both
In business experiments (A/B tests, pricing trials, marketing campaigns), a p-value tells you whether an effect exists, while a confidence interval tells you how large that effect might be. Both pieces are essential for good decisions.
The Confidence Interval Formula
For a population mean with known or large-sample standard deviation, the 95% confidence interval is:
Computing a p-Value via z-Test
To test whether a sample mean differs from a hypothesized value \(\mu_0\), compute the test statistic:
CI vs. p-Value: Key Distinction
| Confidence Interval | p-Value | |
|---|---|---|
| Question answered | "How big could the effect be?" | "Is the effect real?" |
| Output | A range of values | A single probability |
| Decision rule | Does the interval exclude 0? | Is \(p < \alpha\)? |
| Practical use | Estimate magnitude of lift | Signal vs. noise verdict |
| Connection | A 95% CI excludes \(\mu_0\) if and only if \(p < 0.05\) | |
How to Apply in an Experiment
Example 1: Building a CI
A company tests a new checkout flow on \(n = 100\) users. The sample mean revenue per user is \(\bar{x} = \$5.20\) with \(s = \$3.00\). Build a 95% CI.
Visualizing the Confidence Interval
Example 2: Computing a p-Value
A marketing team wants to know if their new ad changes the click rate from the historical mean of \(\mu_0 = 2.0\%\). In a sample of \(n = 64\) days, they observe \(\bar{x} = 2.5\%\) with \(s = 1.6\%\). Test at \(\alpha = 0.05\).
Example 2: CI Confirms the p-Value
Let's build the 95% CI for the same data to see if it agrees with our p-value conclusion.
Example 3: Two-Group Experiment
An A/B test compares Control vs. Treatment on average order value. Is the treatment lift statistically significant?
| Control | Treatment | |
|---|---|---|
| \(n\) | 200 | 200 |
| \(\bar{x}\) | \$48.00 | \$52.00 |
| \(s\) | \$20 | \$22 |
Common Mistakes
Summary Cheat Sheet
| Concept | Formula / Rule | Interpretation |
|---|---|---|
| Standard Error | \(\frac{s}{\sqrt{n}}\) | Precision of \(\bar{x}\) |
| 95% CI | \(\bar{x} \pm 1.96 \cdot \text{SE}\) | Range of plausible \(\mu\) |
| z-Statistic | \(\frac{\bar{x} - \mu_0}{\text{SE}}\) | How many SEs from \(\mu_0\) |
| p-Value | Tail area from z-table | Prob of data if \(H_0\) true |
| Decision | \(p < \alpha\) or CI excludes \(\mu_0\) | Reject \(H_0\) |
Question 1 of 5
A sample of \(n = 49\) has \(\bar{x} = 80\) and \(s = 14\). What is the standard error?
Question 2 of 5
A 95% confidence interval for a mean is \([12.4,\; 17.6]\). What is the point estimate \(\bar{x}\)?
Question 3 of 5
A hypothesis test yields \(p = 0.03\). At a significance level of \(\alpha = 0.05\), what is the correct conclusion?
Question 4 of 5
A 95% CI for the difference in conversion rates is \([-0.5\%, 3.1\%]\). What does this tell us?
Question 5 of 5
Which statement about p-values is correct?