## Theories about \(\mu\)

### Connection between \(P\)-values and confidence intervals

We noted above that there are two broad approaches to statistical inference about an unknown parameter: confidence intervals and hypothesis tests. The module Inference for means covered the topic of a confidence interval for a population mean \(\mu\), and this module covers testing a null hypothesis regarding \(\mu\). Surely the two must be somehow connected?

They are indeed. A 95% confidence interval for \(\mu\) can be expressed as an interval containing all values of \(\mu\), which, if tested as null hypotheses, would give a \(P\)-value \(\geq 0.05\). Put more simply, and without the precise details: the 95% confidence interval consists of the values of \(\mu\) with which the data are consistent.

There are some unstated conditions here: we need to be testing against a two-sided alternative hypothesis, and using a two-sided confidence interval (one-sided confidence intervals exist but have not been considered). Further, there is an important connection between the threshold of "0.05" in the statement above, and the confidence coefficient for the confidence interval, 95%: \(0.05= 1 - 0.95\).

Exercise 3

For a random sample from a Normal population with mean \(\mu\) and known standard deviation \(\sigma\), show that if a test of the null hypothesis \(\mu = \mu_0\) gives a \(P\)-value that is \(\geq 0.05\), then \(\mu_0\) must be in the 95% confidence interval.

It is also true that if \(P< 0.05\), \(\mu_0\) is not in the 95% confidence interval.

In the canned tuna example with \(n = 25\), \(\sigma = 1.2\), Normality assumed, and an observed mean of \(\bar{x}= 95.6\) g, we found that a test of \(\mu = 95\) g gave a \(P\)-value of \(0.012\); hence \(P < 0.05\). The 95% confidence interval for the true mean weight, based on the data, is from 95.1 g to 96.1 g, which does not include 95; the mean weight we have observed is not consistent with the true mean weight of 95 g.

Next page - Errors in hypothesis testing - An error in inference