Educerie

Educerie · AP · Statistics

AP Statistics 4.5

Carrying Out a Test for a Population Mean or Population Mean Difference

How can a sample of numerical measurements tell us about the mean of a whole population, and how sure can we be?

What you will learn

  • Know that t equals x-bar minus mu0 over s over root n, with n minus 1 degrees of freedom, and that pairs use the differences.
  • Understand that the p-value is a tail area set by Ha, from technology or Table B.
  • Know how to interpret the p-value, including that it assumes the null is true.
  • Understand how to decide by comparing the p-value with alpha and write a conclusion in context, in terms of Ha, in non-definitive language.

You must be able to

  1. Calculate the t statistic and its degrees of freedom.
  2. Find the p-value for the correct tail or tails.
  3. Interpret the p-value in context, assuming the null mean.
  4. Compare the p-value with alpha using both numbers and decide.
  5. Write the conclusion in terms of Ha, with the population and non-definitive language.
  6. Explain why a large p-value does not show that H0 is true.

In the exam. Section I multiple choice: a tt statistic from summary numbers, the right tail or tails for a p-value, the correct reading of a p-value, or the right decision and conclusion. In Section II (Q3 and part of Q4) it is the calculation and conclusion half of a full test: tt with its degrees of freedom, the p-value, a comparison with α\alpha, and a conclusion in context. Common slips are comparing tt with α\alpha, doubling the wrong p-value, and concluding about H0H_0 instead of HaH_a.

1The test statistic

For a one-sample t-test for a mean, or for a mean difference, the formula sheet gives

t=xˉ−μ0s/ndf = n - 1; for pairs, x-bar is the mean difference and mu0 is 0t=\frac{\bar x-\mu_0}{s/\sqrt n} \qquad \textcolor{#838c91}{\text{df = n - 1; for pairs, x-bar is the mean difference and mu0 is 0}}

It is the general pattern, "statistic minus parameter, over standard error", with the standard error SE=s/nSE=s/\sqrt n. When H0H_0 is true, tt has a t-distribution with n−1n-1 degrees of freedom.

For matched pairs, use the mean xˉd\bar x_d and standard deviation sds_d of the differences, and nn is the number of pairs. The null value is 0.

Read the number: t=2.0t=2.0 says the sample mean is 2 standard errors above μ0\mu_0. A tt near 0 means the sample mean is close to the claim.

2The p-value

The p-value uses the t-distribution with the right df, and its tail or tails depend on HaH_a.

  • Ha:μ>μ0H_a:\mu>\mu_0: the area to the right of tt.
  • Ha:μ<μ0H_a:\mu<\mu_0: the area to the left of tt.
  • Ha:μ≠μ0H_a:\mu\ne\mu_0: the area in both tails beyond ±∣t∣\pm|t|, which is twice the one-tail area.

Find it with technology, such as a t-distribution cumulative function with the df, or estimate it from Table B. In Table B, find your df, and see which two critical values tt falls between. The tail probabilities at the top give a range for the p-value.

Figure 1. A t-distribution with 24 degrees of freedom: the p-value 0.028 is the shaded area to the right of the observed t = 2.0, found assuming the null hypothesis is true −4 −2 0 2 4 density t t = 2.0 p-value = 0.028 centered at 0: the null value of the mean
Figure 1 · A t-distribution with 24 degrees of freedom: the p-value 0.028 is the shaded area to the right of the observed t = 2.0, found assuming the null hypothesis is true

Read Figure 1 in this order:

  • The curve is centered at 0. That is the world where H0H_0 is true.
  • The amber line marks the observed t=2.0t=2.0.
  • The shaded area to its right is the p-value, about 0.028. It is the chance of a result this large or larger when H0H_0 is true.

If a calculator is used, write what you entered, for example "t-distribution, df = 24, area to the right of t=2.0t=2.0". A bare number from a calculator, or syntax alone, may not earn the mark.

3Interpreting the p-value

The wording is fixed by the course. A correct interpretation includes three things:

  1. a probability of a test statistic (or sample mean) at least as extreme, in the direction of HaH_a;
  2. the phrase that it is computed assuming H0H_0 is true, written as the null in context;
  3. the context.

Example: "Assuming the true mean waiting time is 4.0 minutes, the probability of getting a sample mean of 4.6 minutes or more in a random sample of 25 customers is 0.028."

What the p-value is not:

  • It is not the probability that H0H_0 is true. H0H_0 is either true or not; the p-value assumes it is.
  • It is not the probability that the result happened by chance alone.
  • It is not the probability of the sample mean being exactly what it was.

4The decision

The formal decision explicitly compares the p-value with α\alpha.

  • If p-value ≤α\le\alpha: reject H0H_0.
  • If p-value >α>\alpha: fail to reject H0H_0.

Write the numbers: "Because the p-value 0.028 is less than α=0.05\alpha=0.05, we reject H0H_0." A decision with no comparison of the two numbers loses the mark.

Do not say "accept H0H_0". A large p-value means the data are not strong enough to rule out H0H_0. It does not show that H0H_0 is true.

5The conclusion

A conclusion has to be stated three ways at once:

  • In context, with the variable and the population.
  • In terms of HaH_a: you say whether there is convincing evidence for the alternative.
  • In non-definitive language: "convincing evidence", never "proves".

When you reject: "There is convincing evidence that the mean waiting time of all customers at this café is greater than 4.0 minutes."

When you fail to reject: "There is not convincing evidence that the mean waiting time of all customers at this café is greater than 4.0 minutes."

Never write the conclusion about the null ("we conclude the mean is 4.0"). And do not use a causal claim for an observational sample. A random sample supports a conclusion about the population; a randomized experiment supports a conclusion about the effect of the treatment.

6Worked example: one sample

The café from Topic 4.4 claims a mean wait of 4.0 minutes, and the manager suspects it is longer. A random sample of 25 customers has xˉ=4.6\bar x=4.6 minutes and s=1.5s=1.5 minutes.

Set-up (from Topic 4.4). One-sample t-test for a population mean. μ\mu = the mean waiting time of all customers at this café. H0:μ=4.0H_0:\mu=4.0 and Ha:μ>4.0H_a:\mu>4.0, with α=0.05\alpha=0.05. The conditions were verified: random sample, 25≤6025\le 60, and no outliers or strong skew.

Statistic.

t=4.6−4.01.5/25=0.60.3=2.0df=24t=\frac{4.6-4.0}{1.5/\sqrt{25}}=\frac{0.6}{0.3}=2.0 \qquad df=24

p-value. The alternative is >>, so the area to the right of t=2.0t=2.0 with df =24=24 is

p-value=0.0285p\text{-value}=0.0285

Table B check: with df =24=24, the table has t=1.711t=1.711 for a tail probability of 0.05 and t=2.064t=2.064 for 0.025. Our t=2.0t=2.0 is between them, so the p-value is between 0.025 and 0.05. That agrees.

Decision. The p-value 0.0285 is less than α=0.05\alpha=0.05, so we reject H0H_0.

Conclusion. There is convincing evidence that the mean waiting time of all customers at this café is greater than 4.0 minutes.

Now watch the effect of the alternative. Suppose the manager had only asked whether the mean is different from 4.0. Then the p-value is two-tailed: 2(0.0285)=0.05692(0.0285)=0.0569, and since 0.0569>0.050.0569>0.05 we would fail to reject. The same data, a different question, a different decision. This is why HaH_a must come from the question and not the data.

7Worked example: matched pairs

The 12 patients from Topic 4.4 had blood pressure measured before and after a month of meditation, in mmHg.

Patient123456789101112
Before142135150128160147138155131146152139
After136133141130151144139146129140147133
Before minus after629-293-192656

Set-up. One-sample t-test for a population mean difference. μd\mu_d = the mean difference in systolic blood pressure, before minus after, for all patients of the clinic. H0:μd=0H_0:\mu_d=0 and Ha:μd>0H_a:\mu_d>0, with α=0.05\alpha=0.05. The conditions are met (random sample, more than 120 patients, no outliers in the differences).

Statistic. The 12 differences give xˉd=4.5\bar x_d=4.5 and sd=3.75s_d=3.75.

t=4.5−03.75/12=4.51.084=4.15df=11t=\frac{4.5-0}{3.75/\sqrt{12}}=\frac{4.5}{1.084}=4.15 \qquad df=11

p-value. The area to the right of t=4.15t=4.15 with df =11=11 is 0.00080.0008. In Table B, df =11=11 has t=3.497t=3.497 for 0.0025 and t=4.437t=4.437 for 0.0005, so the p-value is between 0.0005 and 0.0025.

Decision. The p-value, 0.0008, is less than α=0.05\alpha=0.05, so we reject H0H_0.

Conclusion. There is convincing evidence that the mean systolic blood pressure of all patients of the clinic is lower after a month of meditation than before. The mean decrease is estimated at 4.5 mmHg.

Notice what the study cannot show. It had no comparison group, so a fall in blood pressure could have other causes. The test supports the claim about the difference, not the cause.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.