01 / 20

Confidence Intervals &
Hypothesis Testing

Learn how to estimate population parameters using confidence intervals and test claims about data using hypothesis tests: all powered by your GDC.

IB Math AI HL

What Is a Confidence Interval?

A confidence interval (CI) gives a range of plausible values for an unknown population parameter (like \(\mu\) or \(p\)), calculated from sample data. Instead of a single estimate, you get an interval that captures the true value with a stated level of confidence.

Anatomy of a Confidence Interval

Margin of Error (E) Point Estimate Lower Bound Upper Bound 95% Confidence Interval

Key Vocabulary

Point Estimate
A single value from the sample used to estimate the parameter: \(\bar{x}\) for \(\mu\), or \(\hat{p}\) for \(p\).
Margin of Error
The "half-width" of the interval: \(E = z^* \cdot \dfrac{s}{\sqrt{n}}\). Larger \(n\) means smaller \(E\).
Confidence Level
The probability (e.g. 90%, 95%, 99%) that the method produces an interval containing the true parameter.

What Is Hypothesis Testing?

A hypothesis test is a formal procedure for deciding whether sample data provide enough evidence to reject a claim about a population parameter. You start with two competing statements and use data to decide between them.

\(H_0\): Null Hypothesis
The "default" claim: no effect, no difference. Example: \(H_0\!: \mu = 50\).
\(H_1\): Alternative Hypothesis
What you suspect is true. Example: \(H_1\!: \mu \neq 50\) (two-tailed) or \(H_1\!: \mu > 50\) (one-tailed).

Understanding the p-value

\(\mu_0\) Reject Reject Two-Tailed Test \(\alpha/2\) \(\alpha/2\)

CI vs Hypothesis Test

Confidence Interval Hypothesis Test
Goal Estimate a range for the parameter Decide whether to reject a claim
Output An interval: \((\text{lower}, \text{upper})\) A p-value and a decision
Uses "How big is the effect?" "Is there an effect at all?"
Connection If the hypothesised value lies outside the CI, we reject \(H_0\) at the corresponding \(\alpha\)

One-Tailed vs Two-Tailed Tests

One-Tailed
\(H_1\!: \mu > \mu_0\) or \(H_1\!: \mu < \mu_0\). Tests for a specific direction. Rejection region on one side only.
Two-Tailed
\(H_1\!: \mu \neq \mu_0\). Tests for any difference. Rejection region split across both tails: \(\alpha/2\) each.

The \(z\)-Test for a Mean

In the IB, you will almost always use technology (GDC) to compute the test statistic and p-value directly. The formula above helps you understand what the calculator is doing.

Step-by-Step Procedure

1
State hypotheses. Write \(H_0\) and \(H_1\) using the population parameter.
2
Choose significance level. Usually \(\alpha = 0.05\) (5%) unless told otherwise.
3
Enter data into GDC. Use the \(z\)-test or \(t\)-test function. Input \(\bar{x}\), \(s\) (or \(\sigma\)), \(n\), and \(\mu_0\).
4
Read the p-value. The GDC outputs the test statistic and p-value.
5
Compare and conclude. If \(p \leq \alpha\), reject \(H_0\). If \(p > \alpha\), do not reject \(H_0\). State the conclusion in context.

Example 1: Confidence Interval

A sample of \(n = 36\) students scored a mean of \(\bar{x} = 72\) on a test, with \(s = 9\). Find a 95% confidence interval for the population mean \(\mu\).

Example 2: Hypothesis Test

A factory claims its bolts have a mean length of \(\mu = 5.00\) cm. A quality inspector measures \(n = 50\) bolts and finds \(\bar{x} = 5.08\) cm, \(s = 0.21\) cm. Test at the 5% significance level.

1
\(H_0\!: \mu = 5.00\), \(H_1\!: \mu \neq 5.00\) (two-tailed).
2
\(\alpha = 0.05\).
3
GDC: \(z = \dfrac{5.08 - 5.00}{0.21/\sqrt{50}} = \dfrac{0.08}{0.0297} \approx 2.69\).
4
p-value \(\approx 0.0071\).
5
Since \(0.0071 < 0.05\), we reject \(H_0\). There is sufficient evidence that the mean bolt length differs from 5.00 cm.

Example 3: One-Tailed Test

A nutritionist claims a diet reduces cholesterol. Before: \(\mu = 220\) mg/dL. After the diet, \(n = 25\) patients have \(\bar{x} = 212\), \(s = 18\). Test at \(\alpha = 0.05\).

Type I and Type II Errors

\(H_0\) is true \(H_0\) is false
Do not reject \(H_0\) Correct Type II Error (\(\beta\))
Reject \(H_0\) Type I Error (\(\alpha\)) Correct
Type I
Rejecting \(H_0\) when it is actually true. Probability = \(\alpha\). A "false positive."
Type II
Failing to reject \(H_0\) when it is actually false. Probability = \(\beta\). A "false negative."

Common Mistakes

✕ "Accept \(H_0\)"
Never say "accept \(H_0\)." The correct phrasing is "do not reject \(H_0\)": we lack evidence against it, not that it is proven true.
✕ Confusing \(\alpha\) with p-value
\(\alpha\) is chosen before the test. The p-value is computed from the data. They play different roles.
✕ Misinterpreting the CI
A 95% CI does NOT mean "95% probability the parameter is in this interval." The parameter is fixed: the interval is what varies.

Question 1 of 5

A 95% confidence interval for a population mean is \((42.3,\; 51.7)\). What is the margin of error?

Question 2 of 5

A hypothesis test produces a p-value of 0.032. At the \(\alpha = 0.05\) significance level, what is the correct conclusion?

Question 3 of 5

Which of the following correctly interprets a 95% confidence interval?

Question 4 of 5

A researcher tests \(H_0\!: \mu = 100\) vs \(H_1\!: \mu > 100\) and gets a p-value of 0.08. She uses \(\alpha = 0.05\). A Type II error occurs if:

Question 5 of 5

Increasing the sample size \(n\) while keeping the confidence level constant will: