Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›AP Statistics
  3. ›4 Inference for Quantitative Data: Means
  4. ›4.5 Carrying out a test for a mean or mean difference

AP Statistics · Unit 4 · Inference for Quantitative Data: Means

4.5 Carrying out a test for a mean or mean difference

Calculate a t statistic and p-value for a one-sample or paired mean test, decide using the significance level, and state the conclusion in context.

  • 5 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A t statistic counts standard errors from the claimed mean
  1. 1A t statistic counts standard errors from the claimed mean
  2. 2A t test is trustworthy only when three conditions hold
  3. 3The p-value comes from a t distribution
  4. 4Comparing the p-value with the significance level decides the test
  5. 5A conclusion must name the parameter and the context
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: A t statistic counts standard errors from the claimed mean

Suppose a bakery claims its loaves average 500 grams. A random sample of loaves averages 497 grams. That gap matters only when compared with how much sample means normally vary.

The test statistic converts the gap into a standard score. For a mean, it is t=xˉ−μ0s/nt=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}t=s/n​xˉ−μ0​​. Here xˉ\bar{x}xˉ is the sample mean and μ0\mu_0μ0​ is the mean claimed by the null hypothesis. The symbol sss is the sample standard deviation, and nnn is the sample size.

The denominator is the standard error of the sample mean. It estimates how far sample means typically fall from the population mean. A value of t=2t=2t=2 places the sample mean 2 standard errors above μ0\mu_0μ0​.

Key terms · tap one for its definition

test statistic

A test statistic is a number computed from sample data that measures how far the sample result falls from the null hypothesis value.

standard error

The standard error of a sample mean is s/ns/\sqrt{n}s/n​, the estimated standard deviation of the sampling distribution of xˉ\bar{x}xˉ.

Part 1 done

2

Part 2 of 5: A t test is trustworthy only when three conditions hold

The formula always produces a number, but that number is meaningful only when the data meet certain conditions. Check them before calculating anything.

  • Random: the data come from a random sample or a randomized experiment.
  • Independent: when sampling without replacement, the sample is less than 10% of the population.
  • Normal: the population is approximately normal, n≥30n\geq30n≥30, or the sample has no strong skewness or outliers.

Sometimes each subject gives two measurements, such as a before score and an after score. These are paired data. Find each difference first, then treat the differences as one sample. The null value is usually μ0=0\mu_0=0μ0​=0.

Exam tip

For a small sample, name the graph you checked, such as a dotplot or boxplot. Say what it shows about skewness and outliers.

Key term

paired data

Paired data are two measurements taken on the same individual or on naturally matched individuals, analyzed through the differences between them.

Part 2 done

Quick check

One question on the part you just read

Easy

Identify the correct formula for the one-sample t statistic.
Show answer and explanation

Answer: A · Worked explanation

The t statistic divides the distance from the null value by the standard error, s/ns/\sqrt{n}s/n​. Dividing by sss alone measures distance in units of individual spread, not sample-mean spread. Multiplying by n\sqrt{n}n​ or dividing by nnn distorts the standard error and gives the wrong size.
3

Part 3 of 5: The p-value comes from a t distribution

With the conditions checked, the next step is to judge how unusual the t statistic is. Assuming the null hypothesis is true, it follows a t distribution. Its degrees of freedom are df=n−1\mathrm{df}=n-1df=n−1.

A t distribution is centered at 0 and looks like a normal curve with heavier tails. The heavier tails allow for the extra uncertainty from estimating with sss.

The p-value measures how surprising the data are. It is the probability, if the null hypothesis is true, of a t statistic at least as extreme as ours. For a two-sided alternative, double the area in one tail. A calculator function such as tcdf gives that area.

Figure 1. The p-value for a two-sided test is the combined shaded area in both tails.

Worked example

Finding a t statistic and p-value

A company claims its batteries last 50 hours on average. A random sample of 25 batteries has xˉ=52.4\bar{x}=52.4xˉ=52.4 hours and s=6.0s=6.0s=6.0 hours. A dotplot shows no strong skewness or outliers. Test H0:μ=50H_0:\mu=50H0​:μ=50 against Ha:μ≠50H_a:\mu\neq 50Ha​:μ=50.
  1. 1
    Standard error: sn=6.025=1.2 hours\frac{s}{\sqrt{n}}=\frac{6.0}{\sqrt{25}}=1.2\,\mathrm{hours}n​s​=25​6.0​=1.2hours.
  2. 2
    Test statistic: t=xˉ−μ0s/n=52.4−501.2=2.00t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}=\frac{52.4-50}{1.2}=2.00t=s/n​xˉ−μ0​​=1.252.4−50​=2.00.
  3. 3
    Degrees of freedom: df=25−1=24\mathrm{df}=25-1=24df=25−1=24.
  4. 4
    Area above t=2.00t=2.00t=2.00 is about 0.0285. Double it for a two-sided test: 2(0.0285)≈0.0572(0.0285)\approx 0.0572(0.0285)≈0.057.

Answer: t=2.00t=2.00t=2.00 with df=24\mathrm{df}=24df=24, and the p-value is about 0.057.

Key terms · tap one for its definition

degrees of freedom

The degrees of freedom of a one-sample t statistic are df=n−1\mathrm{df}=n-1df=n−1, which determine the exact shape of its t distribution.

p-value

The p-value is the probability, assuming the null hypothesis is true, of getting a test statistic at least as extreme as the one observed.

Part 3 done

4

Part 4 of 5: Comparing the p-value with the significance level decides the test

A p-value of 0.057 is fairly small. Whether it counts as convincing depends on a cutoff chosen before the data are collected.

That cutoff is the significance level, written α\alphaα. Common choices are 0.10, 0.05 and 0.01. The decision rule has two outcomes.

  • If p≤αp\leq\alphap≤α, reject H0H_0H0​. The data give convincing evidence for the alternative hypothesis.
  • If p>αp>\alphap>α, fail to reject H0H_0H0​. The data do not give convincing evidence for the alternative hypothesis.

In the battery example, 0.057>0.050.057>0.050.057>0.05, so the decision is to fail to reject H0H_0H0​. With α=0.10\alpha=0.10α=0.10, the decision would reverse.

Common mistake

Failing to reject H0H_0H0​ does not prove it true. It means only that the evidence was not strong enough.

Key term

significance level

The significance level α\alphaα is the probability cutoff, chosen before collecting data, at or below which a p-value leads to rejecting H0H_0H0​.

Part 4 done

Quick check

One question on the part you just read

Easy

Determine the degrees of freedom for a one-sample t test with a sample of 18 observations.
Show answer and explanation

Answer: A · Worked explanation

The degrees of freedom are n−1=18−1=17n-1=18-1=17n−1=18−1=17. The value 18 is the sample size itself, which forgets to subtract 1. The value 16 subtracts 2, and 19 adds 1. Neither matches the formula df=n−1\mathrm{df}=n-1df=n−1, so each gives the wrong t distribution.
5

Part 5 of 5: A conclusion must name the parameter and the context

A decision on its own is not a finished answer. The last step puts the decision into words about the real situation.

Start with the p-value. Assuming H0H_0H0​ is true, a p-value of 0.057 means about a 5.7% chance of a result this extreme. Here that is a sample mean at least 2.4 hours from 50, in either direction. This is a probability about the data, not about the hypothesis.

  • Compare the p-value with α\alphaα.
  • State the decision about H0H_0H0​.
  • Describe what that means for the parameter, in context.

For the batteries: because 0.057>0.050.057>0.050.057>0.05, we fail to reject H0H_0H0​. We do not have convincing evidence that the true mean battery life differs from 50 hours.

Exam tip

Use the words convincing evidence, name the parameter, and include the context. Never state that the null hypothesis is true or false as a fact.

Note read

Check your recall[12 marks]

5 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Calculate[3 marks]

    Calculate the t statistic and the degrees of freedom for a random sample with n=16n=16n=16, xˉ=18.5\bar{x}=18.5xˉ=18.5 and s=4.0s=4.0s=4.0, testing H0:μ=20H_0:\mu=20H0​:μ=20.

    Show mark schemeHide mark scheme

    Model answer

    Standard error is 4.016=1.0\frac{4.0}{\sqrt{16}}=1.016​4.0​=1.0. So t=18.5−201.0=−1.50t=\frac{18.5-20}{1.0}=-1.50t=1.018.5−20​=−1.50, with df=16−1=15\mathrm{df}=16-1=15df=16−1=15.

    • 1 mark for calculating the standard error as 1.0
    • 1 mark for obtaining t=−1.50t=-1.50t=−1.50 with the correct sign
    • 1 mark for stating df=15\mathrm{df}=15df=15
  2. 2.Describe[3 marks]

    Describe the three conditions to check before carrying out a one-sample t test.

    Show mark schemeHide mark scheme

    Model answer

    The data must come from a random sample or randomized experiment. When sampling without replacement, the sample must be less than 10% of the population. The population should be approximately normal, or the sample size at least 30, or the sample should show no strong skewness or outliers.

    • 1 mark for stating the random condition
    • 1 mark for stating the 10% independence condition
    • 1 mark for stating the normality condition with its alternatives
  3. 3.Determine[2 marks]

    A test gives a p-value of 0.032. Determine the decision about H0H_0H0​ at α=0.05\alpha=0.05α=0.05 and at α=0.01\alpha=0.01α=0.01.

    Show mark schemeHide mark scheme

    Model answer

    At α=0.05\alpha=0.05α=0.05, 0.032≤0.050.032\leq0.050.032≤0.05, so reject H0H_0H0​. At α=0.01\alpha=0.01α=0.01, 0.032>0.010.032>0.010.032>0.01, so fail to reject H0H_0H0​.

    • 1 mark for rejecting H0H_0H0​ at α=0.05\alpha=0.05α=0.05
    • 1 mark for failing to reject H0H_0H0​ at α=0.01\alpha=0.01α=0.01
  4. 4.Interpret[2 marks]

    Interpret a p-value of 0.032 in a test of H0:μ=30H_0:\mu=30H0​:μ=30 minutes for a mean commute time.

    Show mark schemeHide mark scheme

    Model answer

    If the true mean commute time is 30 minutes, there is about a 3.2% chance of getting a sample mean at least as far from 30 minutes as the one observed.

    • 1 mark for assuming the true mean is 30 minutes
    • 1 mark for giving about a 3.2% chance of a sample result at least as extreme
  5. 5.Justify[2 marks]

    Justify why failing to reject H0H_0H0​ is not the same as showing that H0H_0H0​ is true.

    Show mark schemeHide mark scheme

    Model answer

    Failing to reject means the p-value was above the significance level, so the evidence against the claim was not strong enough. Other values of the mean could also be consistent with the data.

    • 1 mark for stating that the evidence was not strong enough, not that the claim was shown
    • 1 mark for noting that other parameter values could also fit the data

Practice this topic

10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)

0 right0 of 10 answered

Includes the 2 quick checks in the note above.

3.

Easy·Determine[1 mark]

A test of a mean gives a p-value of 0.03. Determine the decision at α=0.05\alpha=0.05α=0.05.
Show answer and explanation

Answer: A · Worked explanation

A p-value at or below the significance level leads to rejecting H0H_0H0​, and 0.03≤0.050.03\leq0.050.03≤0.05. Failing to reject would apply only when p>αp>\alphap>α. A small p-value means strong evidence against the null, so being close to zero supports rejecting, not failing to reject.
4.

Medium·Calculate[2 marks]

A random sample of n=36n=36n=36 has xˉ=7.8\bar{x}=7.8xˉ=7.8 and s=3.0s=3.0s=3.0. Calculate the t statistic for H0:μ=7.2H_0:\mu=7.2H0​:μ=7.2.
Show answer and explanation

Answer: A · Worked explanation

The standard error is 3.036=0.5\frac{3.0}{\sqrt{36}}=0.536​3.0​=0.5, so t=7.8−7.20.5=1.2t=\frac{7.8-7.2}{0.5}=1.2t=0.57.8−7.2​=1.2. The value 0.2 comes from dividing 0.6 by sss instead of the standard error. The value 3.6 comes from multiplying 0.6 by n\sqrt{n}n​ and forgetting to divide by sss. The value 7.2 is the null mean, not a test statistic. Always find the standard error first, then divide the distance 7.8−7.2=0.67.8-7.2=0.67.8−7.2=0.6 by it.
5.

Medium·Identify[1 mark]

Identify the situation in which paired data should be analyzed with a one-sample t test on differences.
Show answer and explanation

Answer: A · Worked explanation

Paired data link two measurements on the same individual, so the before-and-after differences form one sample. Two unrelated samples have no natural pairing. Comparing one sample mean with a claimed value is already a one-sample test and involves no differences.
6.

Medium·Determine[1 mark]

A random sample of 15 observations is strongly skewed and contains a clear outlier. Determine whether the normal condition for a t test is met.
Show answer and explanation

Answer: A · Worked explanation

With fewer than 30 observations, the sample must show no strong skewness or outliers, and this one does. Random selection satisfies a different condition and does not fix shape. The cutoff of 100 is invented, and 10 observations is not a rule for normality.
7.

Medium·Interpret[1 mark]

A test of H0:μ=12.0H_0:\mu=12.0H0​:μ=12.0 minutes gives p=0.04p=0.04p=0.04. Identify the correct interpretation of the p-value.
Show answer and explanation

Answer: A · Worked explanation

The p-value is a probability about sample results, calculated assuming H0H_0H0​ is true. It is not the probability that H0H_0H0​ is true, which is the idea behind the 4% claim about the true mean. The 96% figure makes the same error in reverse, and the claim about individuals confuses data with sample means.
8.

Hard·Determine[2 marks]

A one-sided test with Ha:μ>50H_a:\mu>50Ha​:μ>50 gives a t statistic whose upper tail area is 0.03. A student changes to Ha:μ≠50H_a:\mu\neq50Ha​:μ=50 with the same data. Determine the new p-value.
Show answer and explanation

Answer: A · Worked explanation

A two-sided test counts both tails, so double the one-tail area: 2(0.03)=0.062(0.03)=0.062(0.03)=0.06. The value 0.015 halves the area instead. Keeping 0.03 ignores the second tail, and 0.97 is the area on the other side of the statistic, not a p-value.
9.

Hard·Calculate[2 marks]

A random sample of n=16n=16n=16 has xˉ=47.0\bar{x}=47.0xˉ=47.0 and s=6.0s=6.0s=6.0. Test H0:μ=50H_0:\mu=50H0​:μ=50 against Ha:μ<50H_a:\mu<50Ha​:μ<50 at α=0.05\alpha=0.05α=0.05. The lower tail area below the t statistic is about 0.032. Determine the t statistic and the decision.
Show answer and explanation

Answer: A · Worked explanation

The standard error is 6.016=1.5\frac{6.0}{\sqrt{16}}=1.516​6.0​=1.5, so t=47.0−501.5=−2.00t=\frac{47.0-50}{1.5}=-2.00t=1.547.0−50​=−2.00. The alternative is one-sided, so the p-value is 0.032 and rejecting is correct. Doubling to 0.064 wrongly treats the test as two-sided. Statistics of -0.50 and -8.00 come from dividing by sss or by a mistaken standard error.
10.

Hard·Identify[2 marks]

A test of H0:μ=50H_0:\mu=50H0​:μ=50 hours gives p=0.20p=0.20p=0.20 at α=0.05\alpha=0.05α=0.05. Identify the best conclusion.
Show answer and explanation

Answer: A · Worked explanation

Because 0.20>0.050.20>0.050.20>0.05, we fail to reject H0H_0H0​, which means the evidence for a difference is not convincing. The claim that the mean equals 50 treats the failure to reject as proof, which is a common error. The 20% statement misreads the p-value as a probability about the hypothesis.

Keep going

Next topic4.6 Differences in sample meansPrevious topic4.4 Setting up a test for a mean or mean difference

More in Unit 4 · Inference for Quantitative Data: Means

  1. 4.1Sample meansNotes · 10 questions
  2. 4.2Interval for a mean or mean differenceNotes · 10 questions
  3. 4.3Claims from a mean intervalNotes · 10 questions
  4. 4.4Setting up a test for a mean or mean differenceNotes · 10 questions
  5. 4.5Carrying out a test for a mean or mean differenceNotes · 10 questions
  6. 4.6Differences in sample meansNotes · 10 questions
  7. 4.7Interval for a difference of two meansNotes · 10 questions
  8. 4.8Claims about a difference of meansNotes · 10 questions
  9. 4.9Setting up a two-mean testNotes · 10 questions

All AP Statistics topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by College Board or any exam board.

On this page

0/5 read

  1. 1A t statistic counts standard errors from the claimed mean
  2. 2A t test is trustworthy only when three conditions hold
  3. 3The p-value comes from a t distribution
  4. 4Comparing the p-value with the significance level decides the test
  5. 5A conclusion must name the parameter and the context
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe