Skip to content

Unit 4: Inference for Quantitative Data: Means

AP Stats cheatsheet

Open ↗

Loading…

Use a z procedure for a population mean only when the population standard deviation σ\sigma is known:

z=xˉ−μ0σ/n.z = \frac{\bar{x}-\mu_0}{\sigma/\sqrt{n}}.

In most real problems, σ\sigma is unknown, so use the sample standard deviation ss and a t-distribution:

t=xˉ−μ0s/n.t = \frac{\bar{x}-\mu_0}{s/\sqrt{n}}.

The t-distribution is symmetric and bell-shaped like the normal distribution, but it has heavier tails. As degrees of freedom increase, the t-distribution approaches the standard normal distribution.

normalthasheaviertailstdensity

For a quantitative variable with population mean μ\mu and standard deviation σ\sigma, the sample mean xˉ\bar{x} has

μxˉ=μ\mu_{\bar{x}}=\mu

and

σxˉ=σn.\sigma_{\bar{x}}=\frac{\sigma}{\sqrt{n}}.

If the population is normal, the sampling distribution of xˉ\bar{x} is normal for any sample size. If the population is not normal, the Central Limit Theorem says the sampling distribution of xˉ\bar{x} becomes approximately normal as nn gets large, assuming independence.

For two independent sample means,

μxˉ1−xˉ2=μ1−μ2\mu_{\bar{x}_1-\bar{x}_2}=\mu_1-\mu_2

and

σxˉ1−xˉ2=σ12n1+σ22n2.\sigma_{\bar{x}_1-\bar{x}_2} =\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}.

When σ1\sigma_1 and σ2\sigma_2 are unknown, use s1s_1 and s2s_2 in the standard error for t procedures.


Use a one-sample t-interval to estimate a population mean μ\mu:

xˉ±t∗sn.\bar{x} \pm t^*\frac{s}{\sqrt{n}}.

Degrees of freedom:

df=n−1.df = n-1.

Interpretation: “We are ___% confident that the true population mean ___ is between ___ and ___.”


Use a one-sample t-test for a claim about one population mean:

H0:μ=μ0.H_0:\mu=\mu_0.

The test statistic is

t=xˉ−μ0s/n,t = \frac{\bar{x}-\mu_0}{s/\sqrt{n}},

with

df=n−1.df=n-1.

The alternative may be μ>μ0\mu>\mu_0, μ<μ0\mu<\mu_0, or μ≠μ0\mu\ne\mu_0. The p-value is found from the t-distribution with the correct degrees of freedom.


Two-Sample t-Interval For The Difference In Means

Section titled “Two-Sample t-Interval For The Difference In Means”

Use a two-sample t-interval to estimate μ1−μ2\mu_1-\mu_2 for two independent groups:

(xˉ1−xˉ2)±t∗s12n1+s22n2.(\bar{x}_1-\bar{x}_2) \pm t^* \sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}.

Degrees of freedom can be found with technology. If doing by hand, use the conservative choice:

df=min⁡(n1−1, n2−1).df = \min(n_1-1,\ n_2-1).

Two-Sample t-Test For The Difference In Means

Section titled “Two-Sample t-Test For The Difference In Means”

For independent samples, test

H0:μ1−μ2=0H_0:\mu_1-\mu_2=0

with

t=(xˉ1−xˉ2)−0s12/n1+s22/n2.t = \frac{(\bar{x}_1-\bar{x}_2)-0} {\sqrt{s_1^2/n_1+s_2^2/n_2}}.

Use technology for degrees of freedom unless told otherwise. AP problems often care more about setup, conditions, and conclusion than hand-calculating df.


A matched pairs design compares paired observations: before/after measurements on the same subject, twins, matched individuals, or two treatments applied to each unit in random order.

For matched pairs, convert the data to differences:

di=value1,i−value2,i.d_i = \text{value}_{1,i} - \text{value}_{2,i}.

Then run a one-sample t procedure on the differences.

Interval:

dˉ±t∗sdn.\bar{d} \pm t^*\frac{s_d}{\sqrt{n}}.

Test statistic:

t=dˉ−μd,0sd/n.t = \frac{\bar{d}-\mu_{d,0}}{s_d/\sqrt{n}}.

Degrees of freedom:

df=n−1.df=n-1.
samesubjectormatchedpairbefore/treatment1after/treatment2di®erenceanalyzethedi®erences,nottwoindependentsamples

SituationProcedure
One quantitative sample, σ\sigma unknownOne-sample t
One quantitative sample, σ\sigma knownOne-sample z
Two independent quantitative samplesTwo-sample t
Paired quantitative measurementsMatched pairs t

If the data are categorical counts or proportions, use Unit 6 or Unit 8 instead.


A two-sided hypothesis test at significance level α\alpha corresponds to a (1−α)100%(1-\alpha)100\% confidence interval. If the null value is outside the interval, reject H0H_0. If the null value is inside the interval, fail to reject H0H_0.

For one-sided tests, this direct interval comparison requires more care, but the logic is still connected: values far from the interval’s plausible range are less compatible with the data.


Common calculator tools:

  • TInterval: one-sample t confidence interval.
  • T-Test: one-sample t test.
  • 2-SampTInt: two-sample t confidence interval.
  • 2-SampTTest: two-sample t test.
  • For matched pairs, enter the list of differences and use TInterval or T-Test.

Calculator output should be translated into statistical language: parameter, conditions, statistic, interval or p-value, and conclusion in context.