32 Tests for one mean
You have learnt to ask a RQ, design a study, classify and summarise the data, understand the decisionmaking process and to work with probabilities. You have been introduced to the construction of confidence intervals, and began to study hypothesis testing. In this chapter, you will learn to:
 conduct hypothesis tests for one sample mean, using a \(t\)test.
 determine whether the conditions for using these methods apply in a given situation.
32.1 Introduction: body temperatures
The average internal body temperature is commonly believed to be \(37.0^\circ\text{C}\) (\(98.6^\circ\)F). This is based on data around 150 years old (Wunderlich 1868). Researchers wanted to reexamine this claim (Mackowiak, Wasserman, and Levine 1992) to determine if these values are still appropriate. That is, a decision is sought about the value of the population mean body temperature. This value will never be known: the internal body temperature of every person alive would need to be measured... and even those not yet born.
The parameter is \(\mu\), the population mean internal body temperature (in \({}^\circ\text{C}\)). However, a sample of people can be taken to determine whether or not there is evidence that the population mean internal body temperature is still \(37.0^\circ\text{C}\).
To make this decision, the decisionmaking process (Sect. 20.3) is used. Begin by assuming that \(\mu = 37.0\) (as there is no evidence that this accepted standard is wrong), and then determine if the evidence supports this claim or not. The RQ is:
Is the population mean internal body temperature \(37.0^\circ\text{C}\)?
32.2 Statistical hypotheses and notation
The decision making process begins by assuming that the population mean internal body temperature is \(37.0^\circ\text{C}\). Since the sample mean \(\bar{x}\) is likely to be different for every sample even if \(\mu = 37\) (sampling variation), the sampling distribution of \(\bar{x}\) across all possible samples needs to be described. Because every sample is different, \(\bar{x}\) will vary, and the sample mean \(\bar{x}\) probably won't be exactly \(37.0^\circ\text{C}\), even if the population mean \(\mu\) is \(37.0^\circ\text{C}\). Two broad reasons could explain why:
 The population mean body temperature is \(37.0^\circ\text{C}\), but \(\bar{x}\) isn't exactly \(37.0\) due to sampling variation; or
 The population mean body temperature is not \(37.0\), and the sample mean body temperature reflects this.
Defining \(\mu\) as the population mean body temperature (in \(^\circ\)C), then the hypotheses above are:
 The null hypothesis (\(H_0\)): \(\mu = 37.0^\circ\text{C}\); and
 The alternative hypothesis (\(H_1\)): \(\mu \ne 37.0^\circ\text{C}\).
The alternative hypothesis asks if \(\mu\) is \(37.0\) or some other value: the value of \(\mu\) may be smaller or larger than \(37.0\). Two possibilities are considered: for this reason, this alternative hypothesis is called a twotailed alternative hypothesis.
32.3 Describing the sampling distribution
Data to answer this RQ are available from an American study (Shoemaker 1996) (Fig. 32.1). Since the data are available, summarising the data is important (Fig. 32.2). A numerical summary, using jamovi (Fig. 32.3), shows that:
 the sample mean is \(\bar{x} = 36.8052^\circ\)C,
 the sample standard deviation is \(s = 0.4073^\circ\)C, and
 the sample size is \(n = 130\).
The sample mean \(\bar{x}\) is less than the assumed value of \(\mu = 37\)... but why? Can the difference reasonably be explained by sampling variation? The approximate \(95\)% CI for \(\mu\) is from \(36.73\) to \(36.88\). This CI is narrow, implying \(\mu\) has been estimated with precision, so detecting even small deviations of \(\mu\) from \(37.0^\circ\) should be possible.
The sampling distribution of \(\bar{x}\) was given in Sect. 25.2.
Definition 32.1 (Sampling distribution of a sample mean) The sampling distribution of the sample mean is (when certain conditions are met; Sect. 32.8) described by
 an approximate normal distribution,
 centred around the sampling mean, whose value is \(\mu\) (from \(H_0\)),
 with a standard deviation (called the standard error of \(\bar{x}\)) of
\[\begin{equation} \text{s.e.}(\bar{x}) = \frac{s}{\sqrt{n}}, \tag{32.1} \end{equation}\] where \(n\) is the size of the sample, and \(s\) is the standard deviation of the data. In general, the approximation gets better as the sample size gets larger.
Hence, if \(\mu\) really was \(37.0\), the possible values of the sample means across all possible samples can be described (if certain conditions are true; Sect. 32.8) using:
 an approximate normal distribution,
 with a sampling mean whose value is \(\mu = 37.0\) (from \(H_0\)),
 with a standard deviation of \(\text{s.e.}(\bar{x}) = s/\sqrt{n} = 0.4073/\sqrt{130} = 0.0357\).
A picture of this sampling distribution (Fig. 32.4) shows how the sample mean varies when \(n = 130\) across all possible samples, simply due to sampling variation, when \(\mu = 37\). This enables questions to be asked about the likely values of \(\bar{x}\) that would be found in the sample, when the population mean is \(\mu = 37.0\).
Given the sampling distribution (Fig. 32.4), use the \(68\)\(95\)\(99.7\) rule to determine how often will \(\bar{x}\) be larger than \(37.0357^\circ\)C, if \(\mu\) really is \(37.0\).
About \(16\)% of the time.
32.4 Computing the value of the test statistic and \(t\)scores
The sampling distribution describes how the sample means varies; that is, what to expect from the sample means, assuming \(\mu = 37.0\). The value of \(\bar{x}\) that is observed, however, is \(\bar{x} = 36.8052^\circ\)C. How likely is it that such a value could occur in our sample by chance (by sampling variation)?
The value of the observed sample mean can be located on the picture of the sampling distribution (Fig. 32.5). The value \(\bar{x} = 36.8052^\circ\text{C}\) is unusually small: a sample mean this low is very unlikely from a sample of \(n = 130\) if \(\mu\) really was \(37\). How many standard deviations is \(\bar{x}\) away from \(\mu = 37\)? A lot...
Relatively speaking, the distance that the observed sample mean (of \(\bar{x} = 36.8052\)) is from the mean of the sampling distribution (Fig. 32.5) is found by computing how many standard deviations the value of \(\bar{x}\) is from the mean of the distribution:
\[
\frac{36.8052  37.0}{0.035724} = 5.453.
\]
This value is like a \(z\)score, but is actually called a \(t\)score, since the population standard deviation \(\sigma\) is unknown and we used the sample standard deviation to compute \(\text{s.e.}(\bar{x})\).
Both \(t\) and \(z\) scores measure the number of standard deviations that an observation is from the mean.
Like \(z\)scores, \(t\)scores measure the number of standard deviations that a value is from the mean. When the value of interest is a sample statistic, both measure the number of standard errors that a sample statistic is from the mean. The difference between \(t\) and \(z\)scores is that:
 \(t\)scores use a standard error involving sample estimates (as in this chapter, where \(s\) is used).
 \(z\)scores use a standard error not involving any sample estimates (as with a test for proportions (Chap. 31).
The calculation is therefore:
\[
t = \frac{36.8052  37.0}{0.035724} = 5.453;
\]
the observed sample mean is more than five standard deviation below the population mean, which is highly unusual based on the \(68\)\(95\)\(99.7\) rule (Fig. 32.5).
In general, a \(t\)score in hypothesis testing is
\[\begin{equation}
t
=
\frac{\text{sample statistic}  \text{mean of the sample statistic}}
{\text{standard error of the sample statistic}}
=
\frac{\bar{x}  \mu}{\text{s.e.}(\bar{x})}.
\tag{32.2}
\end{equation}\]
32.5 Determining \(P\)values
As seen in Sect. 31.5, a \(P\)value quantifies how unusual the observed sample statistic is, after assuming the null hypothesis is true. The \(P\)value can be approximated (Sect. 32.5.1) using the \(68\)\(95\)\(99.7\) rule and a diagram, or using tables (Appendix B.1.). Commonly, software is used to compute the \(P\)value (Sect. 32.5.2).
32.5.1 Approximate \(P\)values
Since \(t\)scores are similar to \(z\)scores (when the sample size is not small), the ideas in Sect. 31.5 can be used to approximate a \(P\)value for \(t\)scores. In addition, tables of \(z\)scores (Appendix B.1.) can be used to approximate the \(P\)values for \(t\)scores also (Sect. 31.5.2).
Both methods produce approximate \(P\)values (since they are based on using \(z\)scores, not \(t\)scores); usually, software is used to determine \(P\)values for \(t\)scores.
What do you think the twotailed \(P\)value will be when \(t = 5.45\) (Fig. 32.5)?
Based on the \(68\)\(95\)\(99.7\) rule, the twotailed \(P\)value will be extremely small.
32.5.2 Exact \(P\)values using software
Software computes the \(t\)score and a precise \(P\)value (Fig. 32.6).
The output (in jamovi, under the heading p
) shows that the \(P\)value is indeed very small: less than \(0.001\) (written as \(P < 0.001\)).
Some software reports a \(P\)value of 0.000
, which really means (and we should write) \(P < 0.001\): that is, the \(P\)value is smaller than \(0.001\).
This \(P\)value means that, assuming \(\mu = 37.0\), observing a sample mean as low as \(36.8052\) just through sampling variation (from a sample size of \(n = 130\)) is almost impossible. And yet... we did. Using the decisionmaking process, this implies that the initial assumption (the null hypothesis) is contradicted by the data: the evidence suggests that the population mean body temperature is not \(37.0^\circ\text{C}\).
For onetailed tests, the \(P\)value is half the value of the twotailed \(P\)value.
32.5.3 Making decisions with \(P\)values
As seen in Sect. 31.6, \(P\)values measure the probability of observing the sample statistic (or something more extreme), based on the assumption about the population parameter being true. In this context, the \(P\)value tells us the probability of observing the value of \(\bar{x}\) (or something more extreme), just through sampling variation if \(\mu = 37.0\). For the bodytemperature data then, where \(P < 0.001\), the \(P\)value is very small, so very strong evidence exists that the population mean body temperature is not \(37.0^\circ\text{C}\).
32.6 Writing conclusions
Communicating the results of any hypothesis test requires an answer to the RQ, a summary of the evidence used to reach that conclusion (such as the \(t\)score and \(P\)value, stating if it is a one or twotailed \(P\)value), and some sample summary information (including a CI).
So for the bodytemperature example, write:
The sample provides very strong evidence (\(t = 5.45\); twotailed \(P<0.001\)) that the population mean body temperature is not \(37.0^\circ\text{C}\) (\(\bar{x} = 36.81\); \(n = 130\); \(95\)% CI from 36.73\(^\circ\)C to 36.88\(^\circ\)C).
The three components are:
 The answer to the RQ. The sample provides very strong evidence... that the population mean body temperature is not \(37.0^\circ\text{C}\). Since the alternative hypothesis was twotailed, the conclusion is worded in terms of the population mean body temperature not being \(37.0^\circ\text{C}\).
 The evidence used to reach the conclusion: \(t = 5.45\); twotailed \(P < 0.001\).
 Some sample summary information (including a CI, using details in Chap. 25): \(\bar{x} = 36.81\); \(n = 130\); \(95\)% CI from \(36.73^\circ\)C to \(36.88^\circ\)C.
Since the null hypothesis is initially assumed to be true, the onus is on the evidence to refute the null hypothesis. Hence, conclusions are worded in terms of how strongly the evidence (i.e., sample data) support the alternative hypothesis.
The alternative hypothesis may or may not be true... but the evidence (data) available here strongly supports the alternative hypothesis.
32.7 Process overview
Let's recap the decisionmaking process, in this context about body temperatures:
 Step 1: Assumption: Write the null hypothesis about the parameter (based on the RQ): \(H_0\): \(\mu = 37.0\). In addition, write the alternative hypothesis: \(H_1\): \(\mu \ne 37.0\). (This alternative hypothesis is twotailed.)
 Step 2: Expectation: The sampling distribution describes what to expect from the sample statistic if the null hypothesis is true: under certain circumstances, the sample means will vary with an approximate normal distribution around a mean of \(\mu = 37.0\) with a standard deviation of \(\text{s.e.}(\bar{x}) = 0.03572\) (Fig. 32.5).
 Step 3: Observation: Compute the \(t\)score: \(t = 5.45\). The \(t\)score can be computed by software, or using the general equation, Eq. (32.2).
 Step 4: Decision: Determine if the data are consistent with the assumption, by computing the \(P\)value. Here, the \(P\)value is much smaller than \(0.001\). The \(P\)value can be computed by software, or approximated using the \(68\)\(95\)\(99.7\) rule. The conclusion is that there is very strong evidence that \(\mu\) is not \(37.0\).
32.8 Statistical validity conditions
All hypothesis tests have underlying conditions to be met so that the results are statistically valid; that is, the \(P\)values can be found accurately because the sampling distribution is an approximate normal distribution. For a hypothesis test for one mean, these conditions are the same as for the CI for one mean (Sect. 25.4).
The test will be statistically valid if one of these is true:
 The sample size is at least \(25\), or
 The sample size is smaller than \(25\) and the population data has an approximate normal distribution.
The sample size of \(25\) is a rough figure; some books give other values (such as \(30\)).
This condition ensures that the distribution of the sample means has an approximate normal distribution (so that, for example, the \(68\)\(95\)\(99.7\) rule can be used). Provided the sample size is larger than about \(25\), this will be approximately true even if the distribution of the individuals in the population does not have a normal distribution. That is, when \(n > 25\) the sample means generally have an approximate normal distribution, even if the data themselves do not have a normal distribution.
Example 32.1 (Statistical validity) The hypothesis test regarding body temperature is statistically valid since the sample size is large (\(n = 130\)), and the data do not need come from a population with a normal distribution.
32.9 Example: student IQs
Standard IQ scores are designed to have a mean in the general population of \(100\). A study of \(n = 224\) students at Griffith University (Reilly, Neumann, and Andrews 2022) found the sample IQ scores were approximately normally distributed, with a mean of \(111.19\) and a standard deviation of \(14.21\). Is this evidence that students at Griffith University (GU) have a higher mean IQ than the general population?
The RQ is:
For students at Griffith University, is the mean IQ higher than \(100\)?
The parameter is \(\mu\), the population mean IQ for students at GU.
The statistical hypotheses are, from the RQ:
\[
\text{$H_0$: $\mu = 100 \qquad \text{and} \qquad H_1$: $\mu > 100$.}
\]
This test is onetailed, since the RQ asks if the IQ of GU students is greater than \(100\).
(Writing \(H_0\): \(\mu\le 100\) is also correct (and equivalent), though the test still proceeds as if \(\mu = 100\).)
We do not have the original data, but the summary data are sufficient: \(\bar{x} = 111.19\) with \(s = 14.21\) from a sample of size \(n = 224\).
The sample mean is higher than \(100\), but we know sample mean vary.
The sample means vary with a normal distribution, with mean \(100\) and a standard deviation of
\[
\text{s.e.}(\bar{x}) = \frac{s}{\sqrt{n}} = \frac{14.21}{\sqrt{224}} = 0.9494456.
\]
The \(t\)score is
\[
t = \frac{\bar{x}  \mu_{\bar{x}}}{\text{s.e.}(\bar{x})} = \frac{111.19  100}{0.9494456} = 11.78.
\]
This \(t\)score is huge: a sample mean as large as \(111.19\) would be highly unlikely to occur simply by sampling variation in a sample of size \(n = 224\) if the population mean really was \(100\). Since the alternative hypothesis is onetailed, and specifically asking if \(\mu > 100\), the \(P\)value is the area in the rightside tail of the distribution (Fig. 32.7); it will be extremely small.
To conclude (where the CI is found using the ideas in Sect. 25.3):
Very strong evidence exists in the sample (\(t = 11.78\); onetailed \(P < 0.001\)) that the population mean IQ in students at Griffith University is greater than \(100\) (mean \(111.19\); \(n = 224\); \(95\)% CI from \(109.29\) to \(113.09\)).
The test is about the mean IQ; many individual students may have IQs less than \(100\).
Since the sample size is much large than \(25\), this conclusion is statistically valid. The sample is not a true random sample from the population of all GU students (the students are mostly firstyear students, and most were enrolled in an undergraduate psychological science degree). However, these students may be somewhat representative of all GU student; that is, the sample may be externally valid.
The difference between the general population IQ of \(100\) and the sample mean IQ of GU students is only small: about \(11\) IQ units. Possibly, this difference has very little practical significance, even though the statistical evidence suggests that the difference cannot be explained by chance.
IQ scores are designed to have a standard deviation of \(\sigma = 15\) in the general population.
If we accept that this applies for university students too (we do know if it does), the standard error is \(\text{s.e.} = \sigma/\sqrt{n} = 15/\sqrt{130} = 1.0022\), and the teststatistic is
\[
z = \frac{\bar{x}  \mu}{\text{s.e.}(\bar{x})} = \frac{111.19  100}{1.0022} = 11.87;
\]
the conclusions do not change.
32.10 Chapter summary
To test a hypothesis about a population mean \(\mu\):
Initially assume the value of \(\mu\) in the null hypothesis to be true.

Then, describe the sampling distribution, which describes what to expect from the sample mean based on this assumption: under certain statistical validity conditions, the sample mean varies with:
 an approximate normal distribution,
 with sampling mean whose value is the value \(\mu\) (from \(H_0\)), and
 having a standard deviation of \(\displaystyle \text{s.e.}(\bar{x}) =\frac{s}{\sqrt{n}}\).
The observations are then summarised, and test statistic computed:
\[ t = \frac{ \bar{x}  \mu}{\text{s.e.}(\bar{x})}, \] where \(\mu\) is the hypothesised value given in the null hypothesis.The \(t\)value is like a \(z\)score, and so an approximate \(P\)value can be estimated using the \(68\)\(95\)\(99.7\) rule, or found using software.
The following short video may help explain some of these concepts:
32.11 Quick review questions
The usual engineering recommendation is that the safe gap between travelling vehicles in traffic (a 'headway') is at least \(1.9\) s (often conveniently rounded to \(2\) s). One study of \(28\) streams of traffic in Birmingham, Alabama (Majeed et al. 2014) found the mean headway was \(1.1915\) s, with a standard deviation of \(0.231\) s. The researchers wanted to test if the mean headway in Birmingham was at least \(1.9\) s.
 True or false? The test is onetailed.
 The standard error of the mean (to five decimal places) is
 The null hypothesis is:
 The test statistic (to two decimal places) is
 The onetailed \(P\)value is
 True or false? There is no evidence to accept the alternative hypothesis (that the mean headway is at least \(1.9\) s).
32.12 Exercises
Selected answers are available in App. E.
Exercise 32.1 A study of driving speeds in Malaysia (Azwari and Hamsa 2021) recorded the speeds of vehicles on various roads. One RQ is whether the mean speed of cars on one road was the posted speed limit of \(90\) km.h^{1}, or whether it was higher.
The researchers recorded the speed of \(n = 400\) vehicles on this road, and found the mean and standard deviation of the speeds of individual vehicles were \(\bar{x} = 96.56\) and \(s = 13.874\).
 Define the parameter of interest.
 Write the statistical hypotheses.
 Compute the standard error of the sample mean.
 Sketch the sampling distribution of the sample mean.
 Compute the test statistic, a \(t\)score.
 Determine the \(P\)value.
 Write a conclusion.
Exercise 32.2 Most dental associations^{10} recommend brushing teeth for at least two minutes. A study (I. D. M. Macgregor and RuggGunn 1979) of the brushing time for \(85\) uninstructed school children from England (\(11\) to \(13\) years old) found the mean brushing time was \(60.3\) s, with a standard deviation of \(23.8\) s.
 Define the parameter of interest.
 Write the statistical hypotheses.
 Compute the standard error of the sample mean.
 Sketch the sampling distribution of the sample mean.
 Compute the test statistic, a \(t\)score.
 Determine the \(P\)value.
 Write a conclusion.
Exercise 32.3 A study (Greenlee, DeLucia, and Newton 2018) of humanautomation interaction with automated vehicles aimed to (p. 465):
... determine whether monitoring the roadway for hazards during automated driving results in a vigilance decrement [i.e., a vigilance reduction].
That is, they were interested in whether the average mental demand of 'drivers' of automated vehicles was higher than the average mental demand for ordinary tasks.
In the study, the \(n = 22\) participants 'drove' (in a simulator) an automated vehicle for \(40\) mins. While driving, the drivers monitored the road for hazards. The researchers assessed the 'mental demand' placed on these drivers, where scores of \(50\) over 'typically indicate substantial levels of workload' (p. 471). For the sample, the mean score was \(84.00\) with a standard deviation of \(22.05\).
Is there evidence of a 'substantial workload' associated with monitoring roadways while 'driving' automated vehicles?
Exercise 32.4 A study explored the quality of life of patients receiving cavopulmonary shunts (M. Steele et al. 2016). 'Quality of life' was assessed using a \(36\)question health survey, where the scale is standardised so that the mean of the general population is \(50\).
For the \(14\) patients in the study, the sample mean for the 'Physical component' of the survey was \(47.2\) (with a standard deviation of \(8.2\)). The sample mean for the 'Mental component' of the survey was \(52.7\) (with a standard deviation of \(5.6\)).
Is there evidence that the patients are different, on average, to the general population on the basis of the results?
Exercise 32.5 A study of Taiwanese preschool children (Lin et al. 2021) compared their average sleep times to the recommendation (of at least \(10\) hours per night). The summary of the data for weekend sleeptimes is shown in Table 32.1, for both females and males.
On average, do female preschool children get at least \(10\) hours of sleep per night? Do male preschool children?
Sample size  Sample mean  Sample std. dev. 

\(47\)  \(8.50\)  \(0.48\) 
\(39\)  \(8.64\)  \(0.37\) 
Exercise 32.6 A Cherry Ripe is a popular chocolate bar in Australia. In 2017, 2018 and 2019, I sampled some Cherry Ripe Fun Size bars. The packaging claimed that the Fun Size bars weigh \(14\) g (on average). Use the jamovi summary of the data (Fig. 32.8) to perform a hypothesis test to determine if the mean weight really is \(14\) g or not.
Exercise 32.7 (This study was also seen in Exercise 25.6.) A study of paramedics (B. Williams and Boyle 2007) asked participants (\(n = 199\)) to estimate the amount of blood on four different surfaces. When the actual amount of blood spilt on concrete was \(1000\) ml, the mean guess was \(846.4\) ml (with a standard deviation of \(651.1\) ml).
Is there evidence that the mean guess really is \(1000\) ml (the true amount)? Is this test likely to be valid?
Exercise 32.8 [Dataset: BloodLoss
]
A qualitycontrol study (Feng, Huang, and Ma 2017) assessed the accuracy of two instruments from a clinical laboratory, by comparing the reported luteotropichormone (LH) concentrations to known predetermined values (Table 32.2).
Perform a series of tests to determine how well the two instruments perform, for both high and midlevel LH concentrations (from the data in below.
High level  Mid level  High level  Mid level  

Mean of data  \(64.310\)  \(19.240\)  \(64.970\)  \(19.400\) 
Std. dev. of data  \(\phantom{0}1.700\)  \(\phantom{0}0.588\)  \(\phantom{0}1.029\)  \(\phantom{0}0.413\) 
Predetermined target  \(64.220\)  \(19.010\)  \(65.050\)  \(19.450\) 