33 More about hypothesis testing
So far, you have learnt to ask a RQ, design a study, classify and summarise the data, understand the decision-making 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 about hypothesis tests. You will learn to:
- communicate the results of hypothesis tests.
- interpret \(P\)-values.
33.1 Introduction
In Chaps. 31 and 32, hypothesis tests for one proportion and one mean were studied. Later chapters discuss hypothesis tests in other contexts, too.
However, the general approach to hypothesis testing is the same for any hypothesis test. This chapter discusses some general ideas in testing:
- the assumptions and forming hypotheses (Sect. 33.2).
- the expectations described by the sampling distribution (Sect. 33.3).
- the observations and the test statistic (Sect. 33.4).
- quantifying the consistency between the statistic and parameter values: computing \(P\)-values (Sect. 33.5).
- interpreting \(P\)-values (Sect. 33.6).
- making mistakes when making conclusions (Sect. 33.7).
- wording conclusions (Sect. 33.8).
- practical importance and statistical significance (Sect. 33.9).
- statistical validity in hypothesis testing (Sect. 33.10).
Hypothesis testing starts by assuming the null hypothesis is true. The onus is on the data to provide evidence to refute this default position.
33.2 About hypotheses and assumptions
Two statistical hypotheses are made about the population parameter: the null hypothesis \(H_0\), and the alternative hypothesis \(H_1\).
33.2.1 Null hypotheses
Statistical hypotheses are always about a population parameter (which can take different forms, depending on the context). Hypothesising, for example, that the sample mean body temperature is equal to \(37.0^\circ\text{C}\) is silly, because it clearly isn't: the sample mean is \(36.8052^\circ\text{C}\) (Chap. 32). Besides, the RQ is about the unknown population: the P in POCI stands for Population.
The null hypothesis \(H_0\) offers one possible reason why the value of the sample statistic (such as the sample mean) is not the same as the value of the proposed population parameter (such as the population mean): sampling variation. Every sample is different, and we have data from just one of many possible samples. The sample statistic will vary from sample to sample; the statistic may not be equal to the population parameter, just because of the sample obtained
Null hypotheses always contain an 'equals', because (as part of the decision making process) a specific value must be assumed for the population parameter, so we can describe what we might expect from the sample. For example: the population mean equals \(100\), is less than or equal to \(100\), or is more than or equal to \(100\).
Defining the parameter carefully is important!
For example, if a parameter is about the difference between two means (say, in Group A and Group B), then the parameter description must clarify if the parameter is the 'Group A mean minus the Group B mean', or the 'Group B mean minus the Group A mean'. Either is fine (though one may be easier to understand), but the direction used must be clearly stated.
The null hypothesis always assumes the difference between the statistic and the assumed value of the parameter is due to sampling variation. This may mean:
- there is no difference between the parameter value in two (or more) groups;
- there is no change in the parameter value (i.e., compared to an established or accepted value); or
- there is no relationship as measured by a parameter value.
The null hypothesis always has the form 'no difference, no change, no relationship' regarding the population parameter.
Definition 33.1 (Null hypothesis) The null hypothesis proposes that sampling variation explains the difference between the proposed value of the parameter, and the observed value of the statistic.
33.2.2 Alternative hypotheses
The other statistical hypothesis is called the alternative hypothesis \(H_1\). The alternative hypothesis offers another possible reason why the value of the sample statistic (such as the sample proportion) is not the same as the value of the proposed population parameter (such as the population proportion): the value of the population parameter really is not the value claimed in the null hypothesis (but does not explain why).
Definition 33.2 (Alternative hypothesis) The alternative hypothesis proposes that the difference between the proposed value of the parameter and the observed value of the statistic cannot be explained by sampling variation: It proposes that the value of the parameter is not the value claimed in the null hypothesis.
Alternative hypotheses can be one-tailed or two-tailed. A two-tailed alternative hypothesis means, for example, that the population mean could be either smaller or larger than what is claimed. A one-tailed alternative hypothesis admits only one of those two possibilities. Most (but certainly not all) hypothesis tests are two-tailed.
The decision about whether the alternative hypothesis is one- or two-tailed is made by reading the RQ (not by looking at the data). The RQ and hypotheses should (in principle) be formed before the data are obtained, or at least before looking at the data if the data are already collected.
The idea of hypothesis testing is the same whether the alternative hypothesis is one- or two-tailed: based on the data and the sample statistic, a decision is to be made about whether the alternative hypotheses is supported by the data.
Example 33.1 (Alternative hypotheses) For the body-temperature study, the alternative hypothesis is two-tailed: The RQ asks if the population mean is \(37.0^\circ\text{C}\) or not. Two possibilities are considered: that \(\mu\) could be either larger or smaller than \(37.0^\circ\text{C}\).
A one-tailed alternative hypothesis would be appropriate if the RQ asked: 'Is the population mean internal body temperature greater than \(37.0^\circ\text{C}\)?', or 'Is the population mean internal body temperature smaller than \(37.0^\circ\text{C}\)?'.
Important points about forming hypotheses:
- Hypotheses always concern a population parameter.
- Null hypothesis always have the form 'no difference, no change, no relationship'.
- Alternative hypothesis are one- or two-tailed, depending on the RQ.
- Null hypotheses always contain an 'equals'.
- Hypotheses emerge from the RQ (not the data): The RQ and the hypotheses could be written down before collecting the data.
33.3 About sampling distributions and expectations
The sampling distribution describes, approximately, how all possible values of the sample statistic (such as \(\hat{p}\) or \(\bar{x}\)) vary across all possible samples, when \(H_0\) is true: it describes the sampling variation. Under certain circumstances, many sampling distributions have an approximate normal distribution.
When the sampling distribution is described by a normal distribution, the mean of the normal distribution is the parameter value given in the assumption (\(H_0\)), and the standard deviation of the normal distribution is called the standard error. In some cases, the sample statistic does not have a normal distribution, but a quantity easily derived from the sample statistic does have a normal distribution (for example, in the case of odds ratios^{11} in Chap. 36).
33.4 About observations and the test statistic
The sampling distribution describes what values the statistic can take over all possible samples of given size.
Since the sampling distribution often has an approximate normal distribution, the observed value of the sample statistic can be expressed as \(z\)-score or a \(t\)-score:
\[
\text{test statistic} =
\frac{\text{sample statistic} - \text{centre of the sampling distribution}}
{\text{standard deviation of the sampling distribution}}.
\]
The \(z\)-scores and \(t\)-scores are called test statistics, since their values are based on sample data ('a statistic') and used in a hypothesis test.
Other test statistics are used too (as in Chap. 36).
A \(t\)-score and \(z\)-scores both measure the number of standard deviations an observation is from the mean: \[ \frac{\text{a specific value of something that varies} - \text{the mean of the distribution}} {\text{the standard deviation of the distribution}}. \] Then:
- If the 'quantity that varies' is an individual observation \(x\), the measure of variation is the standard deviation of the individual observations.
- If the 'quantity that varies' is a sample statistic, the measure of variation is a standard error, which measures the variation in the sample statistic.
In both cases, the test statistic is a \(t\)-score if the measure of variation uses sample estimates.
33.5 About finding \(P\)-values
As demonstrated in Sect. 31.5, \(P\)-values can be approximated using Tables or the \(68\)--\(95\)--\(99.7\) rule when the sampling distribution has a normal distribution. The \(P\)-value is the area more extreme than the calculated \(z\)- or \(t\)-score; the \(68\)--\(95\)--\(99.7\) rule can be used to approximate this tail area.
For two-tailed tests, the \(P\)-value is the combined area in the left and right tails. For one-tailed tests, the \(P\)-value is the area in just the left or right tail (as appropriate, according to the alternative hypothesis; see Sect. 32.9).
When software reports two-tailed \(P\)-values, a one-tailed \(P\) is found by halving the two-tailed \(P\)-value.
More accurate estimates of the \(P\)-value can be found using tables. For precise \(P\)-values, use the \(P\)-values from software output.
When using software to obtain \(P\)-values, if the software reports one- or two-tailed \(P\)-values. Some software (such as SPSS) always reports two-tailed \(P\)-values.
33.6 About interpreting \(P\)-values
A \(P\)-value is the probability of observing the value of the sample statistic (or something even more extreme) over repeated sampling, under the assumption that the null hypothesis is true. Since the null hypothesis is initially assumed true, the onus is on the data to present evidence to the contrary.
Conclusion are always about the population parameters. \(P\)-values are needed to determine what we learn about the unknown population parameters, based on what we observed from one of the many possible values of the sample statistic.
Commonly, a \(P\)-value smaller than \(5\)% is considered 'small', but this is arbitrary and sometimes the threshold is discipline-dependent. More reasonably, \(P\)-values should be interpreted as giving varying degrees of evidence in support of the alternative hypothesis (Table 33.1), but these are only guidelines.
If the \(P\)-value is... | Write the conclusion as... |
---|---|
Larger than 0.10 | Insufficient evidence to support \(H_1\) |
Between 0.05 and 0.10 | Slight evidence to support \(H_1\) |
Between 0.01 and 0.05 | Moderate evidence to support \(H_1\) |
Between 0.001 and 0.01 | Strong evidence to support \(H_1\) |
Smaller than 0.001 | Very strong evidence to support \(H_1\) |
Definition 33.3 ($P$-value) A \(P\)-value is the likelihood of observing the sample statistic (or something more extreme) over repeated sampling, under the assumption that the null hypothesis about the population parameter is true.
\(P\)-values are never exactly zero. jamovi reports very small \(P\)-values as '\(P < 0.001\)' (i.e., the \(P\)-value is smaller than \(0.001\)).
\(P\)-values are commonly used in research, but must be used and interpreted correctly (Greenland et al. 2016). Specifically:
- A \(P\)-value is not the probability that the null hypothesis is true.
- A \(P\)-value does not prove anything (only one possible samples was studied).
- A big \(P\)-value does not mean the null hypothesis \(H_0\) is true, or that \(H_1\) is false.
- A small \(P\)-value does not mean the null hypothesis \(H_0\) is false, or that \(H_0\) is true.
- A small \(P\)-value does not mean the results are practically important (Sect. 33.9).
- A small \(P\)-value does not mean a large difference between the statistic and parameter; it means that the difference (whether large or small) could not reasonably be attributed to sampling variation (chance).
When the results of a study are reported as being statistically significant, this usually means that the \(P\)-value is less than \(0.05\)... though a different \(P\)-value is sometimes used as the 'threshold', so check! To avoid confusion, the word 'significant' should be avoided in writing about research unless 'statistical significance' is what is actually what is meant. In other situations, consider using words like 'substantial'.
33.7 About making mistakes in conclusions
Hypothesis testing is about making a decision about a population using a sample. Since the sample is just one of countless possible samples that could have been observed, making an incorrect conclusion is always a possibility.
Two ways exist to make a mistake:
- Incorrectly concluding that that evidence supports the alternative hypothesis. Of course, the researchers do not know they are incorrect... but the possible of making this mistake is always present when concluding that the evidence supports the alternative hypothesis. This is called a false positive, or a Type I error.
- Incorrectly concluding that there is no evidence to support the alternative hypothesis. Of course, the researchers do not know they are incorrect... but the possible of making this mistake is always present when concluding that there is no evidence to support the alternative hypothesis. This is called a false negative, or a Type II error.
Ideally, neither of these errors would be made; however, sampling means that neither error can ever be completely eliminated. In practice, hypothesis testing begins by assuming the null hypothesis is true, and hence places the onus on the data to provide compelling evidence in favour of the alternative hypothesis. This means researchers usually aim to minimising the chance of a Type I error.
A Type I error is like declaring an innocent person guilty (recall innocence is presumed). Similarly, a Type II error is like declaring a guilty person innocent. The law generally sees a Type I error as more grievous that a Type II error, just as in research.
33.8 About writing conclusions
In general, communicating the results of any hypothesis test requires:
- the answer to the RQ;
- the evidence used to reach that conclusion (such as the \(t\)-score and \(P\)-value, clarifying if the \(P\)-value is one-tailed or two-tailed); and
- sample summary statistics (such as sample means and sample sizes), including a CI (indicating the precision with which the parameter has been estimated).
Since we assume the null hypothesis is true, conclusions are worded (in context) in terms of how strongly the evidence supports the alternative hypothesis. The onus is on the data to disprove the null hypothesis.
Since the null hypothesis is initially assumed to be true, the onus is on the data to provide evidence in support of the alternative hypothesis. Hence, conclusions are always worded in terms of how much evidence supports the alternative hypothesis.
'No evidence of a difference' is not the same as 'evidence of no difference'.
That is, suppose we conclude that 'there is no evidence that the mean IQ is greater than \(100\) in race-car drivers'. This does not mean there is evidence that evidence that the mean IQ for race-car drivers is \(100\) (or is lower than \(100\)).
33.9 About practical importance and statistical significance
Hypothesis tests assess statistical significance, which answers the question: 'Can sampling variation explain the difference between the value of the statistic and the value of the assumed parameter?' Even very small differences between the sample statistic and the population parameter can be statistically different if the sample size is sufficiently large.
In contrast, practical importance answers the question: 'Is the conclusion of any importance in practice?' Whether a results is of practical importance depends upon the context: what the data are being used for, and for what purpose. 'Practical importance' and 'statistical significance' are two separate issues.
Example 33.2 (Practical importance) In the body-temperature study (Sect. 32.1), very strong evidence exists that the mean body temperature had changed ('statistical significance'). But the change was so small that, for most purposes, it has no practical importance. (In other (e.g., medical) situations, it may have practical importance however.)
Example 33.3 (Practical importance) A study of some herbal medicines (Maunder et al. 2020) for weight loss found that the intervention:
... resulted in a statistically significant weight loss compared to placebo, although this was not considered clinically significant.
This means that the difference in weight loss between placebo and intervention was unlikely to be explained by chance (\(P < 0.001\), which is 'statistical significant'), but the difference was so small in size (a mean weight loss of \(1.61\) kg) that it was unlikely to be of any use in practice ('practical importance'). In this context, the researchers decided that a weight loss of at least \(2.5\) kg was of practical importance.
33.10 About statistical validity
When performing hypothesis tests, certain statistical validity conditions must be true to ensure that the mathematics behind computing the \(P\)-value is sound. For instance, if the sampling distribution has an approximate normal distribution, the statistical validity conditions ensure that the approximation is sufficiently accurate for the \(68\)--\(95\)--\(99.7\) rule rule to apply^{12}. If these conditions are not met, the sampling distribution may not be sufficiently close to an exact normal distribution, so the \(P\)-values (and hence conclusions) maybe inappropriate. These statistical validity conditions are usually the same as, or similar to, those for the corresponding CIs (Sect. 26.4).
In addition to the statistical validity condition, the internal validity and external validity of the study should be discussed (Fig. 26.1).
33.11 Chapter summary
Hypothesis testing formalises the decision-making process. Starting with an assumption about a population parameter of interest, a description of what values the sample statistic might take (based on this assumption) is produced: this describes what values the statistic is expected to take over all possible samples. This sampling distribution is often a normal distribution, or related to a normal distribution.
The sample statistic (the estimate) is then observed, and a test statistic, which often is a \(z\)- or \(t\)-score, is computed to describe this sample statistic. Using a \(P\)-value, a decision is made about whether the sample evidence supports or contradicts the initial assumption, and hence a conclusion is made. Since \(t\)-scores are like \(z\)-scores, \(P\)-values can often be approximated using the \(68\)--\(95\)--\(99.7\) rule.
33.12 Quick review questions
- True or false?
When a \(P\)-value is very small, a very large difference exists between the statistic and parameter.
- True or false?
The alternative hypothesis is one-tailed if the sample statistic is larger than the hypothesised population mean.
- What is wrong (if anything) with this null hypothesis: \(H_0 = 37\)?
- True or false: When the sampling distribution is a normal distribution, the standard deviation of this normal distribution is called the standard error.
- True or false?
Both \(z\)-scores and \(t\)-scores can be test statistics.
- True or false? \(P\)-values can never be exactly zero.
- True or false? A \(P\)-value is the probability
that the null hypothesis is true.
33.13 Exercises
Selected answers are available in App. E.
Exercise 33.1 Assuming the tests are statistically valid, use the \(68\)--\(95\)--\(99.7\) rule to approximate the two-tailed \(P\)-value if:
- the \(t\)-score is \(3.4\).
- the \(t\)-score is \(-2.9\).
- the \(t\)-score is \(-2.1\).
- the \(t\)-score is \(-6.7\).
Exercise 33.2 Assuming the tests are statistically valid, use the \(68\)--\(95\)--\(99.7\) rule to approximate the two-tailed \(P\)-value if:
- the \(t\)-score is \(1.05\).
- the \(t\)-score is \(-1.3\).
- the \(t\)-score is \(6.7\).
- the \(t\)-score is \(0.1\).
Exercise 33.3 Consider the \(t\)-scores in Exercise 33.1. Use the \(68\)--\(95\)--\(99.7\) rule to approximate the one-tailed \(P\)-values in each case.
Exercise 33.4 Consider the \(t\)-scores in Exercise 33.2. Use the \(68\)--\(95\)--\(99.7\) rule to approximate the one-tailed \(P\)-values in each case.
Exercise 33.5 Suppose a hypothesis test results in a \(P\)-value of \(0.0501\). What would we conclude? What if the \(P\)-value was \(0.0499\)?
Exercise 33.6 Suppose a hypothesis test results in a \(P\)-value of \(0.011\). What would we conclude? What if the \(P\)-value was \(0.009\)?
Exercise 33.7 Consider the study to determine the mean body temperature (Chap. 32), where \(\bar{x} = 36.8052^{\circ}\text{C}\). What, if anything, is wrong with these hypotheses? Explain.
- \(H_0\): \(\bar{x} = 37\); \(H_1\): \(\bar{x} \ne 37\).
- \(H_0\): \(\mu = 37\); \(H_1\): \(\mu > 37\).
- \(H_0\): \(\mu = 37\); \(H_1\): \(\mu = 36.8052\).
Exercise 33.8 Consider the study to determine the mean body temperature (Chap. 32), where \(\bar{x} = 36.8052^{\circ}\text{C}\). What, if anything, is wrong with these hypotheses? Explain.
- \(H_0\): \(\bar{x} = 36.8052\); \(H_1\): \(\bar{x} > 36.8052\).
- \(H_0\): \(\mu = 36.8052\); \(H_1\): \(\mu \ne 36.8052\).
- \(H_0\): \(\mu > 37\); \(H_1\): \(\bar{x} > 37\).
Exercise 33.9 The recommended daily energy intake for women is \(7725\) kJ (for a particular cohort, in a particular country; Altman (1991)). The daily energy intake for 11 women was measured to see if this is being adhered to. The RQ was 'Is the population mean daily energy intake \(7725\) kJ?'
The test produced \(P = 0.018\). What, if anything, is wrong with these conclusions after completing the hypothesis test?
- There is moderate evidence (\(P = 0.018\)) that the energy intake is not meeting the recommended daily energy intake.
- There is moderate evidence (\(P = 0.018\)) that the sample mean energy intake is not meeting the recommended daily energy intake.
- There is moderate evidence (\(P = 0.018\)) that the population energy intake is not meeting the recommended daily energy intake.
- The study proves that the population energy intake is not meeting the recommended daily energy intake (\(P = 0.018\)).
Exercise 33.10 A study compared ALDI batteries to another brand of battery. In one test comparing the length of time it takes for \(1.5\) volt AA batteries to reach \(1.1\) volts, the ALDI brand battery took \(5.73\) hours, and the other brand (Energizer) took \(5.44\) hours (P. K. Dunn 2013).
- What is the null hypothesis for the test?
- The \(P\)-value for comparing these two means is about \(P = 0.70\). What does this mean?
- Is this difference likely to be of any practical importance? Explain.
- What would be a correct conclusion for ALDI to report from the study? Explain.
- What else would be useful to know in comparing the two brands of batteries?