Skip to main content

Section 9.2 Computing Correlation Using the USArrests Dataset

We will use the data that we used in the first chapter to estimate correlation. As reviewed in Chapter 1, the built-in USArrests dataset includes information on the number of arrests per 100,000 residents for assault, murder, and rape in each of the 50 states in the United States in 1973 and the percentage of the population residing in urban areas. Each row in the dataset represents a US state. Specifically, we will be evaluating if the number of arrests per 100,000 residents for murder correlates with the number of arrests per 100,000 residents for assault.
Correlation can be obtained through the following functions:
# Load the dataset
data("USArrests")
library(tidyverse)
USArrests %>%
  summarize(cor.murder.assault = cor(x = Murder, y = Assault, use = "complete"))
The Pearson’s product-moment correlation coefficient obtained is 0.8018733. The number of arrests per 100,000 residents for murder was positively correlated with the number of arrests per 100,000 residents for assault. This means that, in the US in 1973, as the number of arrests per 100,000 residents for murder went up, so did the number of arrests per 100,000 residents for assault. According to Cohen’s (1988) guideline, this value indicates a very strong correlation between the variables of interest.
However, a crucial aspect is missing: the assessment of statistical significance. Inferential statistics play a vital role here, enabling us to draw conclusions from sample data by inferring insights about a population. Thus, determining whether the observed correlation is statistically significant is essential for meaningful interpretation in inferential statistics. Technically speaking, in our dataset, we do not need to conduct inferential statistics because the data sampled all 50 states instead of only 25 states out of 50 states. But, for demonstration purposes, I will show how we can conduct a statistical test for correlation coefficients, following the steps for hypothesis testing.

Subsection 9.2.1 NHST Steps for Pearson’s R Correlation Coefficient

Subsubsection 9.2.1.1 Step 1: Formulate the Null and Alternative Hypotheses

  • \(H_0\text{:}\) There is no relationship between the number of arrests per 100,000 residents for murder and the number of arrests per 100,000 residents for assault.
  • \(H_A\text{:}\) There is a relationship between the number of arrests per 100,000 residents for murder and the number of arrests per 100,000 residents for assault.

Subsubsection 9.2.1.2 Step 2: Calculate the Test Statistic

When testing the null hypothesis for the correlation coefficient, we employ a t-statistic to compare the observed correlation coefficient (\(r\)) to a hypothesized value of 0. This t-statistic helps us determine whether the observed correlation is statistically significant or if it could have occurred by chance. We will use R code to perform this task.
cor.test(x = USArrests$Murder,
         y = USArrests$Assault)
You will see that the correlation coefficient is 0.8018733.

Subsubsection 9.2.1.3 Step 3: Determine the Probability (P-Value) of Obtaining a Test Statistic at Least as Extreme as the Observed Value, Assuming No Relationship Exists

The p-value, the probability that the t-statistic (of 9.2981 in this case) would occur by sampling error, was 2.596e-12, which was essentially much smaller than 0.05.

Subsubsection 9.2.1.4 Steps 4 and 5: Reject or Retain the Null Hypothesis

The very small p-value (much smaller than 0.05) indicates that a very strong positive relationship between the number of arrests per 100,000 residents for assault and murder is very unlikely if the null hypothesis were true.

Subsection 9.2.2 Reporting the Results for Pearson’s Product-Moment Correlation Coefficient

The number of arrests per 100,000 residents for murder is statistically significant and very strongly positively correlated with the number of arrests per 100,000 residents for assault in 50 US states in 1973 [\(r = .80\text{;}\) \(t(48) = 9.30\text{;}\) \(p < .05\)]. As the number of arrests per 100,000 residents for murder goes up, the number of arrests per 100,000 residents for assault goes up. While the correlation is .80 in this sample, the correlation is probable between .68 and .88 in the population (95% CI: .68–.88).