Scatterplots and correlations

Table of contents

  1. Bivariate Relationships
  2. Ice Cream and Murder Rates
  3. Example: Movie Budgets
  4. During Class Notes

1. Bivariate Relationships

1.1 Correlation

Correlation quantifies the strength and direction of a linear relationship between two numerical variables. The Pearson correlation coefficient, denoted by rr, is a single numerical statistic used for this purpose 1.

To use Pearson correlation, several conditions must be met:

  • Random sample and independent observations: Data should be collected randomly, and each observation should not influence others.
  • Normality of x and y: Both variables should follow a normal distribution.
  • Linear trend: The relationship between the variables should be approximately linear.
  • No extreme outliers: Outliers can disproportionately influence the correlation coefficient 1.

1.2 Properties of correlation (r)

The correlation coefficient (rr) is a unitless measure that describes the strength of the linear relationship between two numerical variables. It ranges from -1 to +1 2.

  • A value of -1 or +1 indicates a perfectly linear relationship.
  • A value of 0 indicates no linear relationship.
  • The absolute value of rr indicates the strength of the linear relationship; a larger absolute value means a stronger relationship.
  • The sign of rr indicates the direction of the relationship: positive for an increasing trend, negative for a decreasing trend 2.

📝 A correlation coefficient of r=0.78r = 0.78 suggests a strong, positive linear relationship between the two variables 2.

1.3 Factors that do not affect r's value

Certain transformations of the data do not change the correlation coefficient:

  • Changing the order of variables: Swapping the positions of the two variables does not alter rr.
  • Adding or multiplying by a constant: Adding a constant to or multiplying a variable by a positive constant does not affect rr 3.

1.4 Outliers

Extreme outliers can sometimes significantly affect the value of the correlation coefficient, potentially strengthening or weakening the perceived linear relationship 3.

2. Ice Cream and Murder Rates

2.1 Correlation does not equal causation

A correlation between two variables indicates that they tend to change together, but it does not explain why. It is crucial to understand that correlation does not imply causation, meaning that one variable does not necessarily cause the other to change 4.

  • Variable relationship: The relationship between two variables, x and y, can be the same even if their roles are reversed.
  • Lurking variables: These are unobserved factors that can influence both variables being studied, creating an apparent correlation where none exists directly. For example, ice cream sales and crime rates might both increase in warmer weather, with temperature being the lurking variable.
  • Spurious correlations: These are accidental statistical relationships that occur by chance, often due to analyzing large datasets or specific time periods. Websites like tylervigen.com showcase many examples of these coincidental correlations 4.

📝 Ice cream sales and murder rates often show a positive correlation, meaning both tend to increase during the same periods. However, this does not mean eating ice cream causes murders or vice versa. A lurking variable, such as warmer weather, likely influences both: people buy more ice cream when it's hot, and more people are outdoors, potentially leading to more opportunities for crime 4.

3. Example: Movie Budgets

3.1 Calculate r

This section demonstrates calculating the correlation coefficient (rr) using movie budget and domestic gross income data. The calculation involves converting raw data into z-scores and then averaging the product of these z-scores.

  • Z-scores are calculated for each variable (budget XX and domestic gross YY) using the formula z=value−meanstandard deviationz = \frac{\text{value} - \text{mean}}{\text{standard deviation}} 8.
  • The correlation coefficient (rr) is the average of the products of the z-scores for each data point 10.

The formula for rr is: r=∑(zx⋅zy)n−1r = \frac{\sum (z_x \cdot z_y)}{n-1} where zxz_x is the z-score for the budget, zyz_y is the z-score for the domestic gross, and nn is the number of data points 8.

The z-score for the budget of "The Meg" is calculated as zx=1.78−2.550.88≈−0.88z_x = \frac{1.78 - 2.55}{0.88} \approx -0.88 9.

The calculation proceeds by finding the product of the z-scores for each movie and then averaging these products. For the given data, the sum of the zx⋅zyz_x \cdot z_y products is 4.06, and with 6 data points (n=6n=6), the correlation coefficient is r=4.066−1=0.81r = \frac{4.06}{6-1} = 0.81 11.

3.2 How would you describe the strength of this relationship?

The strength and direction of a linear relationship between two variables are described by the correlation coefficient (rr).

  • A positive rr value indicates a positive linear relationship, meaning as one variable increases, the other tends to increase.
  • A negative rr value indicates a negative linear relationship, meaning as one variable increases, the other tends to decrease.
  • The magnitude of rr indicates the strength of the linear relationship:
  • rr close to 1 or -1 indicates a strong linear relationship.
  • rr close to 0 indicates a weak or no linear relationship.

With a correlation coefficient (rr) of 0.81, there is a strong positive linear relationship. This suggests that as a movie's budget increases, its domestic gross income generally also increases.

"Captain Marvel" might be an outlier, as its domestic gross was higher than expected for its budget 11 12.

3.3 Correlation interpretation rules

When interpreting correlation, several key aspects must be considered to provide a complete and contextually relevant conclusion.

  • Direction: The sign of the correlation coefficient indicates whether the relationship is positive or negative.
  • Strength: The absolute value of the correlation coefficient indicates how closely the data points cluster around a linear pattern.
  • Shape: The relationship should be approximately linear. If the scatterplot shows a curved pattern, a linear correlation coefficient may not accurately describe the relationship.
  • Contextual Interpretation: The correlation must be explained in terms of the specific variables being studied.
  • Causation: Correlation does not imply causation. A strong correlation between two variables does not mean that one variable causes the other; there may be other underlying factors involved.
  • Plausible Theory: A sound and plausible theory must exist to explain why the variables are related.
  • Data Consistency: The data used for the analysis must be consistent and specific.

The scatterplot indicates a positive and approximately linear relationship between movie budget and domestic gross income. With a correlation of 0.81, there is a strong positive linear relationship between the two variables, suggesting that as a movie's budget increases, its domestic gross generally goes up as well.

"Captain Marvel" may be an outlier, as its domestic growth was higher than expected for its budget 12.

4. During Class Notes

4.1 Class Activities and Concepts

This section covers in-class activities, including attendance checks and practice problems, focusing on the statistical concept of correlation. It also touches upon real-world applications of reporting correlation results 13 14 15 16.

  • Attendance Check-in: Students are instructed to use a Google Form, accessed via an announcement link, and enter a code displayed in the classroom to confirm their in-person attendance 16.
  • Pre-class Video Topics: The pre-class material covered correlation, including scatterplots, positive/negative relationships, spurious correlations, and the properties of correlation coefficients 14.
  • Correlation Properties:
  • Unitless: Correlation coefficients do not have units.
  • Range: They can only fall between -1 and +1.
  • Perfect Linear Data: A value of -1 or 1 indicates perfectly linear data.
  • Strength: The absolute value of the correlation coefficient indicates the strength of the linear relationship.
  • Direction: The sign of the coefficient indicates the direction of the relationship between variables 15.
  • No Relationship: A value of 0 means there is no linear relationship between the variables 17.

4.2 Correlation vs. Regression

Correlation and regression are distinct statistical techniques used to analyze relationships between variables. Correlation measures the co-relationship, while regression estimates changes in a dependent variable based on independent variables 17.

  • Correlation: A statistical measure that determines the co-relationship of two variables.
  • Regression: A statistical technique for estimating the change in a dependent variable due to changes in one or more independent variables 17.

4.3 Correlation Practice: Weight and Waist Size

This section details a practice problem involving calculating the correlation coefficient between weight and waist size, identifying outliers, and describing the relationship 18 19 20 21.

  • Data Calculation: The process involves calculating z-scores for each variable and then the product of these z-scores for each data point 18 19.
  • Correlation Coefficient Calculation: The sum of the products of z-scores is divided by (n-1), where n is the number of data points, to find the correlation coefficient (r).
  • Outlier Identification: A specific data point, identified by its x-value (waist size), might be considered an outlier if it deviates significantly from the general trend 20.
  • Scatterplot Interpretation: A scatterplot visually represents the relationship between weight and waist size, indicating direction, shape, strength, and meaning in context 21.

📝 The calculated correlation coefficient for weight and waist size was 0.83. The scatterplot for weight and waist size indicated a positive and approximately linear relationship. An outlier was identified at (87, 75), suggesting a lower waist size than expected based on the trend. Despite the outlier, the correlation of 0.83 indicated a strong, positive, linear relationship, suggesting that as weight increases, waist size is also expected to increase on average. It was noted that if the outlier were removed, the correlation would increase to 0.99 20 21.

4.4 Strength of Correlation

The strength of a correlation is evaluated based on the absolute value of the correlation coefficient (r), with specific ranges indicating different levels of linear association 22.

StrengthCorrelation Coefficient (r)
No correlation (unrelated)0
Moderately weak.2 to.4
Moderate.4 to.6
Moderately strong.6 to.8
Strong>.8
Perfect correlation1
  • Context Dependency: These cutoffs can vary among scholars and depend on the context of the study.
  • Linearity: Correlation can only evaluate linear relationships between two numerical variables 22.

4.5 Practice #2: Monopoly Property Prices and Rent

This practice problem explores the relationship between the price of a property and the rent charged in the game of Monopoly, calculating the correlation coefficient and describing the relationship 23 24 25.

  • Data Analysis: The process involves calculating z-scores for both property price (X) and rent (Y), then calculating the product of these z-scores for each property.
  • Correlation Calculation: The sum of the Zx*Zy products is divided by (n-1) to determine the correlation coefficient (r) 25.
  • Relationship Description: The relationship is described in terms of direction, shape, strength, and its meaning in the context of Monopoly properties 23 24.

📝 The correlation coefficient (r) for this data was calculated as 0.99 The scatterplot indicated a positive and approximately linear relationship between property price and rent in Monopoly, with no apparent outliers. The strong positive linear relationship (r = 0.99) suggests that as the price of a property increases, the rent also increases 23 24 25.

4.6 Practice at Home: Hours Slept and Socializing

This practice problem requires writing a full description of a correlation and scatterplot based on given data for hours slept and hours socializing 26.

  • Scatterplot Interpretation: The scatterplot is analyzed to identify any linear trend between the two variables.
  • Correlation Description: The correlation coefficient (r =.037) is used to further describe the evidence of a linear relationship 26.

📝 Looking at the scatterplot, there appears to be no linear trend for hours slept and hours socializing. The correlation of r =.037 indicates further that there is no evidence of a linear relationship between these variables 26.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also