38 Correlation

So far, you have learnt about the research process, including analysing data using confidence intervals and hypothesis tests. In the last chapter, you were introduced to plots for displaying the relationship between two quantitative variables. In this chapter, you will learn to:

  • conduct hypothesis tests for correlation coefficients.

38.1 Introduction: red deer

So far, RQs about single variables (descriptive RQs) and RQs for comparisons (relational and repeated-measures RQs) have been studied. In this chapter (and the next), the relationship between two quantitative variables is studied when that relationship is approximately linear (correlational RQs).

Consider the age and the weight of the molars of \(n = 78\) male red-deer (Holgate 1965), as seen in Chap. 17 (and the data in that section). The data comprises two quantitative variables, and the scatter plot is repeated in Fig. 38.1.

Molar weight verses age for the red deer data

FIGURE 38.1: Molar weight verses age for the red deer data

A relationship between the variables seems evident. That is, knowing the age of the deer seems to provide some information about the weight of the molars. Furthermore, the relationship seems somewhat linear, and in Sect. 17.4.1 the correlation coefficient was found to be \(r = -0.584\).

However, only one of the countless possible samples of deer have been studied, so potentially that relationship may not actually be present in the population. That is, perhaps the population correlation coefficient \(\rho\) is actually 0, and the sample correlation coefficient is non-zero simply due to sampling variation.

38.2 Statistical hypotheses and the hypothesis test

A correlational RQ can be asked about the relationship between the variables in the population, as measured by the unknown population correlation coefficient:

In the population, is there a linear relationship between the value of \(y\) and the value of \(x\)?

In the context of the red-deer data, the RQ is:

In male red deer, is there a linear relationship between molar weight and age?

More specifically, we could ask a one-tailed research question, since it seems reasonable that teeth get lighter (worn down) as deer age:

In male red deer, does molar weight decrease linearly as age increases?

This is a one-tailed RQ, about the population parameter \(\rho\). Clearly, the sample correlation coefficient \(r\) for the red-deer data is not zero, and the RQ is effectively asking if sampling variation is the reason for this. The null hypotheses is:

  • \(H_0\): \(\rho = 0\).

The parameter is \(\rho\), the population correlation coefficient. This null hypothesis is the 'no relationship' position, which proposes that the population correlation coefficient is zero, and the sample correlation coefficient is not zero due to sampling variation. The alternative hypothesis is:

  • \(H_1\): \(\rho < 0\) (one-tailed test, based on the RQ).

As usual, initially assume that \(\rho = 0\) (from \(H_0\)), then describe what values of \(r\) could be expected using the sampling distribution, under that assumption, across all possible samples (sampling variation). Then the observed value of \(r\) is compared to the expected values to determine if the value of \(r\) supports or contradicts the assumption.

For a correlation coefficient, the sampling distribution of \(r\) does not have a normal distribution12, and the software output does not even provide a standard error, so we will not discuss CIs for the correlation coefficient.

The output (Fig. 38.2) contains the relevant \(P\)-value for the \(t\)-test. The two-tailed \(P\)-value for the test is less than \(0.001\), so the one-tailed \(P\) value will be less than \(0.001/2 = 0.0005\). Very strong evidence exists to support \(H_1\) (that the correlation in the population is less than zero). We write:

The sample presents very strong evidence (one-tailed \(P < 0.0005\)) that the molar weight decreases as the age of the male red deer increases (\(r = -0.584\); \(n = 78\)) in the population.

Notice the three features of writing conclusions again: An answer to the RQ; evidence to support the conclusion ('one-tailed \(P < 0.0005\)'; here no value for the test statistic is given in the output); and some sample summary information ('\(r = -0.584\); \(n = 78\)').

jamovi output for the red-deer data

FIGURE 38.2: jamovi output for the red-deer data

The evidence suggests that the correlation coefficient is not zero (in the population). However, a non-zero correlation doesn't necessarily mean a strong correlation exists. The correlation may be weak in the population (as estimated by the value of \(r\)), but evidence exists that the correlation is not zero in the population.

That is, the test is about statistical significance, not practical importance.

38.3 Statistical validity conditions

As usual, these results hold under certain conditions. The conditions for which the test is statistically valid are:

  1. The relationship is approximately linear.
  2. The variation in the response variable is approximately constant for all values of the explanatory variable.
  3. The sample size is at least \(25\).

The sample size of \(25\) is a rough figure; some books give other values.

Example 38.1 (Statistical validity) For the red-deer data, the scatterplot (Fig. 17.2) shows that the relationship is approximately linear, so using a correlation coefficient is appropriate. For the hypothesis test, the variation in molar weights doesn't seem to be obviously getting larger or smaller for older deer, and the sample size is also greater than \(25\). The test in Sect. 38.2 is statistically valid.

38.4 Example: removal efficiency

In wastewater treatment facilities, air from biofiltration is passed through a membrane and dissolved in water, and is transformed into harmless byproducts. The removal efficiency \(y\) (in %) may depend on the inlet temperature (in \(^\circ\)C; \(x\)). A RQ is

In treating biofiltation wastewater, is the removal efficiency linearly associated with the inlet temperature?

The population parameter is \(\rho\), the correlation between the removal efficiency and inlet temperature. A scatterplot of \(n = 32\) observations (Fig. 38.3, left panel) suggests an approximately linear relationship (Chitwood and Devinny 2001; Devore and Berk 2007).

The output (Fig. 38.3, right panel) shows that the sample correlation coefficient is \(r = 0.891\), and so \(R^2 = (0.891)^2 = 79.4\)%. This means that about \(79.4\)% of the variation in removal efficiency can be explained by knowing the inlet temperature.

The relationship between removal efficiency and inlet temperature. Left: scatterplot. Right: jamovi output.The relationship between removal efficiency and inlet temperature. Left: scatterplot. Right: jamovi output.The relationship between removal efficiency and inlet temperature. Left: scatterplot. Right: jamovi output.

FIGURE 38.3: The relationship between removal efficiency and inlet temperature. Left: scatterplot. Right: jamovi output.

To test if a relationship exists in the population, write:
\[ \text{$H_0$: } \rho = 0;\quad\text{and}\quad \text{$H_1$: } \rho \ne 0, \] where \(\rho\) is the population correlation coefficient. The alternative hypothesis is two-tailed (as implied by the RQ). The software output (Fig. 38.3, right panel) shows that \(P < 0.001\). We conclude:

The sample presents very strong evidence (two-tailed \(P < 0.001\)) that removal efficiency depends on the inlet temperature (\(r = 0.891\); \(n = 32\)) in the population.

The relationship is approximately linear, there is no obvious non-constant variation in the removal efficiency, and the sample size is larger than \(25\), so the hypothesis test results is statistically valid.

38.5 Chapter summary

To test a hypothesis about a correlation between two variables, \(\rho\):

  • Write the null hypothesis (\(H_0\)) and the alternative hypothesis (\(H_1\)).
  • Initially assume the value of \(\rho\) in the null hypothesis to be true (usually zero).
  • Software output provides the \(P\)-value for the test, but no test statistic or confidence interval.

The following short video may help explain some of these concepts:

38.6 Quick review questions

A study of Chinese paediatric patients (Wong et al. 2018) studied the relationship between the \(6\)-minute walk distance (\(6\)MWD) and maximum oxygen uptake (VO\(2\)max) for \(n = 29\) patients. The correlation coefficient is reported as \(r = 0.457\), and the corresponding \(P\)-value as \(P = 0.013\).

  1. What is the \(x\)-variable?
  2. True or false: Since the \(P\)-value is small, the correlation is quite strong.
  3. Is the relationship a positive or negative relationship?
  4. What is the value of \(R^2\) (to one decimal place, expressed as a percentage)?
  5. For statistical validity, what do we need to assume to be true?
  6. True or false? Since \(P\) is small, the relationship must be very strong.

38.7 Exercises

Answers to odd-numbered exercises are available in App. E.

Exercise 38.1 LeBlanc et al. (2005) studied \(n = 30\) paramedicine students, and examined the relationship between the amount of stress experienced while performing drug-dose calculations (measured using the State–Trait Anxiety Inventory (STAI)), and length of work experience.

  1. Write the hypotheses for testing for a relationship between the STAI score and the length of work experience.
  2. The article gives the correlation coefficient as \(r = 0.346\) and \(P = 0.18\). What do you conclude?
  3. What must be assumed for the test to be statistically valid?

Exercise 38.2 Einsiedel et al. (2024) studied the relationship between amount of pesticide residue reported on a variety of fresh fruits and vegetables, and various weather measurements. One pesticide studied was the herbicide perchlorate.

  1. Write the hypotheses for testing for a relationship between the perchlorate residue and maximum temperature at the growing location.
  2. The article gives the correlation coefficient as \(r = -0.059\) and \(P = 0.035\). What do you conclude?
  3. Write the hypotheses for testing for a relationship between the perchlorate residue and minimum temperature at the growing location.
  4. The article gives the correlation coefficient as \(r = -0.025\) and \(P = 0.365\). What do you conclude?
  5. What must be assumed for the tests to be statistically valid?

Exercise 38.3 [Dataset: SDrink] A study examined the time taken to deliver soft drinks to vending machines (Montgomery and Peck 1992) using a sample of size \(n = 25\) (Fig. 38.4, left panel). To perform a test of the correlation coefficient, are the statistical validity conditions met?

Exercise 38.4 [Dataset: Mandible] Royston and Altman (1994) examined the mandible length and gestational age for \(n = 167\) foetuses from the \(12\)th week of gestation onward (Fig. 38.4, right panel). To perform a test of the correlation coefficient, are the statistical validity conditions met?

Two scatterplots. Left: the time taken to deliver soft drinks to vending machines. Right: the relationship between gestational age and mandible length. In both plots, the solid line displays the linear relationship.

FIGURE 38.4: Two scatterplots. Left: the time taken to deliver soft drinks to vending machines. Right: the relationship between gestational age and mandible length. In both plots, the solid line displays the linear relationship.

Exercise 38.5 [Dataset: Dogs] Quan, Tran, and Chung (2017) studied Phu Quoc Ridgeback dogs (Canis familiaris), and recorded many measurements of the dogs, including body length and body height. The scatterplot displaying the relationship and the jamovi output are shown in Fig. 38.5. In this example, it does not matter which variable is used as \(x\) or \(y\).

  1. Describe the relationship.
  2. Taller dogs might be expected to be longer. To test this, write the hypotheses.
  3. Perform the test, using the output. Write a conclusion.
  4. Is the test statistically valid?
Phu Quoc ridgeback dogs. Left: a scatterplot of the body height vs body length. Right: jamovi outputPhu Quoc ridgeback dogs. Left: a scatterplot of the body height vs body length. Right: jamovi outputPhu Quoc ridgeback dogs. Left: a scatterplot of the body height vs body length. Right: jamovi output

FIGURE 38.5: Phu Quoc ridgeback dogs. Left: a scatterplot of the body height vs body length. Right: jamovi output

Exercise 38.6 [Dataset: Bitumen] Panda, Das, and Sahoo (2018) made \(n = 42\) observations of studied hot mix asphalt, and measured the volume of air voids and the bitumen content by weight. The scatterplot displaying the relationship and the jamovi output are shown in Fig. 38.6.

  1. Using the plot, estimate the value of \(r\).
  2. The value of \(R^2\) is \(99.29\)%. What is the value of \(r\)? (Hint: Be careful!)
  3. Would you expect the \(P\)-value testing \(H_0\): \(\rho=0\) to be small or large? Explain.
  4. Would the test be statistically valid?
Bitumen content by weight. Left: a scatterplot. Right: jamovi outputBitumen content by weight. Left: a scatterplot. Right: jamovi outputBitumen content by weight. Left: a scatterplot. Right: jamovi output

FIGURE 38.6: Bitumen content by weight. Left: a scatterplot. Right: jamovi output

Exercise 38.7 [Dataset: Punting] A study (Myers (1990), p. 75) of American footballers measured the right-leg strengths \(x\) of 13 players (using a weight lifting test), and the distance \(y\) they punted a football with their right leg (Fig. 38.7). Use the jamovi output (Fig. 38.7) to answer these questions.

  1. Compute the value of \(R^2\), and explain what this means.
  2. Perform a hypothesis test to determine if a positive correlation exists between punting distance and right-leg strength.
The punting data. Left: a scatterplot. Right: jamovi outputThe punting data. Left: a scatterplot. Right: jamovi outputThe punting data. Left: a scatterplot. Right: jamovi output

FIGURE 38.7: The punting data. Left: a scatterplot. Right: jamovi output

Exercise 38.8 [Dataset: Gorillas] (These data were also seen in Exercise 17.8.) Wright et al. (2021) examined \(25\) gorillas and recorded information about their chest beating and their size (measured by the breadth of the gorillas' backs). The relationship is shown in a scatterplot in Fig. 38.8. Using the output (Fig. 38.8), determine the value of \(r\) and \(R^2\). Perform a hypothesis tests, and make a conclusion about the relationship between the chest beating and size of gorillas.

The punting data. Left: a scatterplot. Right: jamovi outputThe punting data. Left: a scatterplot. Right: jamovi outputThe punting data. Left: a scatterplot. Right: jamovi output

FIGURE 38.8: The punting data. Left: a scatterplot. Right: jamovi output

Exercise 38.9 [Dataset: Possums] J. L. Williams et al. (2022) studied Leadbeater's possums in the Victorian Central Highlands. They recorded, among other information, the body weight of the possums and their location, including the elevation of the location. A scatterplot of the data and the jamovi output are shown in Fig. 38.9. Using the output (Fig. 38.9), determine the value of \(r\) and \(R^2\). Perform a hypothesis tests, and make a conclusion about the relationship between the chest beating and size of gorillas.

The relationship between weight of possums and the elevation of their location. Left: scatterplot. Right: jamovi outputThe relationship between weight of possums and the elevation of their location. Left: scatterplot. Right: jamovi output

FIGURE 38.9: The relationship between weight of possums and the elevation of their location. Left: scatterplot. Right: jamovi output

Exercise 38.10 [Dataset: Soils] The California Bearing Ratio (CBR) value is used to describe soil sub-grade for flexible pavements (such as in the design of air field runways). Talukdar (2014) examined the relationship between CBR and other properties of soil, including the plasticity index (PI, a measure of the plasticity of the soil). The scatterplot from 16 different soil samples from Assam, India, is shown in Fig. 38.10.

  1. Using the plot, take a guess at the value of \(r\).
  2. The value of \(R^2\) is \(67.07\)%. What is the value of \(r\)? (Hint: Be careful!)
  3. Would you expect the \(P\)-value testing \(H_0\): \(\rho = 0\) to be small or large? Explain.
  4. Would the test be statistically valid?
The relationship between CBR and PI in sixteen soil samples

FIGURE 38.10: The relationship between CBR and PI in sixteen soil samples

Exercise 38.11 [Dataset: Typing] The Typing dataset contains four variables: typing speed (mTS), typing accuracy (mAcc), age (Age). and sex (Sex) for \(1301\) students (Pinet et al. 2022). Is there evidence of a linear relationship between the mean typing speed and mean accuracy? Explain.