Scatterplots, Association, and Correlation Study Guide

Foundations of Scatterplots

  • Definition of Scatterplots: A scatterplot is a two-dimensional graph designed to exhibit the relationship between two quantitative variables measured on the same set of individual cases.

  • Primary Analytical Applications: Scatterplots serve as the primary visual tool for:

    • Identifying visual patterns, overall trajectories, and long-term trends in bivariate data.
    • Discovering structural, empirical, or functional relationships between variables.
    • Detecting extraordinary values, individual outliers, unexpected clusters, or sub-population groupings.

Scatterplot of Hurricane Location Prediction Error vs Year

Visual Characteristics of Scatterplots

When systematically describing or interpreting any scatterplot, four fundamental features must be thoroughly examined and documented:

  • 1. Direction of Association:

    • Positive Direction: An association is positive if an increase in the predictor variable xx is accompanied by a systematic increase in the response variable yy. In a scatterplot, the cloud of points trends upwards from left to right.
    • Negative Direction: An association is negative if an increase in the predictor variable xx is accompanied by a systematic decrease in the response variable yy. In a scatterplot, the cloud of points trends downwards from left to right.
  • 2. Form of the Relationship:

    • Linear Form: Observations cluster tightly or moderately around a single, straight line path. Linear forms are simple to model and summarize.
    • Gently Curved Form: The scatterplot exhibits a continuous, monotonic curve bending in a single direction. Gently curved forms can frequently be converted into linear forms using standard numerical transformations (re-expressions).
    • Complex Curved Form: The data curves sharply up and down, oscillates, or changes direction multiple times. Non-monotonic patterns are difficult or impossible to straighten using standard simple power transformations.
  • 3. Strength of the Relationship:

    • Strong Linear Relationship: Observations align very tightly along a straight trajectory with minimal vertical scatter or dispersion around the trend line.
    • Moderate Linear Relationship: Observations display a clear linear orientation but exhibit moderate scatter around the central linear path.
    • Weak or No Linear Relationship: Observations show broad dispersion with little to no discernable linear alignment, appearing as a diffuse cloud of points.
  • 4. Outliers and Unexpected Features:

    • Definition: An outlier in a scatterplot is any individual observation that stands significantly apart from the overall pattern, structural path, or trend of the scatterplot.
    • Analytical Importance: Outliers carry substantial contextual information and can dramatically influence statistical models; they must never be ignored and always warrant individual investigation.

Case Studies in Bivariate Data Analysis

  • Case Study: Hurricane Prediction Accuracy Over Time:
    • Context: Historical tracking by the National Hurricane Center (NHC) measuring hurricane location prediction errors (in nautical miles or distance units) plotted across consecutive years.
    • Observed Pattern: NHC location prediction errors have systematically decreased over time as forecasting technology and models have improved.
    • Form and Dispersion: The dataset displays an underlying linear structure with moderate scatter surrounding the straight trend line.
    • Outlier Investigation: The year 19721972 represents a prominent high-error outlier despite being a generally quiet hurricane season, driven by the highly erratic and unusual tracking path of Hurricane Agnes.

Scatterplot of Hurricane Location Prediction Error vs Year

  • Case Study: UBS Worldwide Economic Comparisons:
    • Dataset Overview: Global price, wage, and economic indicator data compiled by UBS comparing major international metropolitan cities.
    • Variables Recorded: Cost of Living, Food Costs, Average Hourly Wage, Average Number of Working Hours per Year, Average Number of Vacation Days, Hours of Work at Average Wage to Buy an iPhone 4S, Minutes of Work Needed to Buy a Big Mac, and Women's Clothing Costs.
    • Women's Clothing Costs vs. Food Costs:
    • Direction: Positive association (cities with higher clothing costs also display higher food costs).
    • Form: Straight and linear.
    • Strength: Moderately strong.
    • Unique Features: Displays a few high outliers corresponding to extraordinarily expensive global cities.

Scatterplot of Food Costs vs Cost of Women's Clothes

  • Average Hourly Wage vs. Hours to Earn an iPhone 4S:
    • Direction: Negative association (higher hourly wages correspond to significantly fewer labor hours needed to acquire an iPhone 4S).
    • Form: Strongly non-linear, exhibiting a steep initial drop that flattens out horizontal as wages grow high.
    • Strength: Strong association.
    • Practical Note: Summarizing this relationship with a simple linear correlation coefficient is inappropriate without prior transformation due to curvature.

Scatterplot of Hours to Earn an iPhone 4S vs Average Hourly Wage

  • Working Hours per Year vs. Clothes Index:
    • Direction: Negative association.
    • Form: Generally straight.
    • Strength: Weak association.
    • Analytical Interpretation: Knowing a city's average annual working hours per worker provides very little predictive information regarding its clothing index. Contains one or two potential high outliers.

Scatterplot of Clothes Index vs Working Hours

  • Vacation Days per Year vs. Food Costs:
    • Association: Complete absence of linear or non-linear relationship (r=−0.040r = -0.040).
    • Analytical Interpretation: Knowing the annual vacation days per worker provides zero predictive insight into local food costs.

Scatterplot of Food Costs vs Vacation Days

Roles of Variables: Explanatory and Response Variables

  • Response Variable (yy):

    • The principal outcome variable of interest that researchers seek to model, understand, or predict.
    • Conventionally assigned to the vertical axis (yy-axis).
  • Explanatory or Predictor Variable (xx):

    • The independent variable utilized to explain, account for, or predict variation in the response variable.
    • Conventionally assigned to the horizontal axis (xx-axis).
  • Contextual Assignment Logic:

    • The assignment of variables to xx and yy depends entirely on the analytical objective:
    • Do baseball teams that score more runs sell more tickets?
      • Explanatory (xx): Runs Scored
      • Response (yy): Tickets Sold
    • Do students who score higher on SAT tests achieve higher GPAs in college?
      • Explanatory (xx): SAT Score
      • Response (yy): College Grade Point Average (GPA)
    • Can we estimate a person's BMI accurately by measuring wrist size?
      • Explanatory (xx): Wrist Size
      • Response (yy): Body Mass Index (BMI)
    • How has hurricane location prediction error changed over calendar years?
      • Explanatory (xx): Year
      • Response (yy): Prediction Error
  • Scatterplot Smoothing Techniques:

    • When scatterplot data exhibits excessive local noise or random variability, computer-based smoothing algorithms (such as LOWESS - Locally Weighted Scatterplot Smoothing) can be applied.
    • Smoothers assist the eye in tracing underlying central trends, highlighting long-term structural trajectories, and isolating point anomalies that depart from the overall pattern.
    • Frequently used on time-series plots (timeplots) where gradual evolution over time is expected.

LOWESS Smoothed Scatterplot

Quantitative Measurement of Association: Correlation

  • Scale and Measurement Unit Invariance:
    • An effective quantitative measure of association must be independent of the physical measurement units chosen for xx and yy.
    • Changing measurement scale (e.g., measuring height in inches vs. centimeters, or weight in pounds vs. kilograms) changes the numeric grid values but preserves the underlying geometric structure and yield the exact same statistical association measure.

Standardized Height vs Standardized Weight

  • Mathematical Derivation of the Correlation Coefficient (rr):

    • Raw observations (xi,yi)(x_i, y_i) are standardized into zz--scores relative to their sample means (xˉ,yˉ\bar{x}, \bar{y}) and sample standard deviations (sx,sys_x, s_y):     zx,i=xi−xˉsxz_{x,i} = \frac{x_i - \bar{x}}{s_x}zy,i=yi−yˉsyz_{y,i} = \frac{y_i - \bar{y}}{s_y}
    • The sample correlation coefficient rr is defined as the scaled average cross-product of these standardized scores:     r=∑zxzyn−1r = \frac{\sum z_x z_y}{n - 1}
    • Quadrant Product Sign Logic:
    • Quadrants I and III: zxz_x and zyz_y share the same sign (both positive or both negative), generating positive product terms (zxzy>0z_x z_y > 0).
    • Quadrants II and IV: zxz_x and zyz_y have opposite signs, generating negative product terms (zxzy<0z_x z_y < 0).
    • Summing these terms reflects whether the data points predominantly align positively or negatively.
  • Software Computation via StatCrunch:

    • Procedure: Enter paired data into two columns, navigate to Stat →\rightarrow Regression →\rightarrow Simple Linear, select the respective xx and yy variables, and click Compute!.
    • Sample Output Summary for Height (xx) vs Weight (yy) (n=80n = 80):
    • Regression Equation: Weight=−195.74368+4.9940261×Height\text{Weight} = -195.74368 + 4.9940261 \times \text{Height}
    • Intercept: −195.74368-195.74368 (Std. Err = 45.04514545.045145, tt--stat = −4.34550-4.34550, DF = 7878)
    • Slope: 4.99402614.9940261 (Std. Err = 0.671672750.67167275, tt--stat = 7.435207.43520, DF = 7878)
    • Coefficient of Determination: R2=0.41477603R^2 = 0.41477603
    • Error Standard Deviation Estimate: 21.47958521.479585
    • Analysis of Variance Model F-stat: 55.28230655.282306 (PP--value = <0.0001< 0.0001)
    • Correlation Coefficient: r=0.64403108r = 0.64403108

StatCrunch Simple Linear Regression Results Output Window

Necessary Assumptions and Conditions for Correlation

To ensure that the correlation coefficient rr is a valid and meaningful statistical summary, three mandatory conditions must be verified:

  • 1. Quantitative Variables Condition:

    • Both variables under analysis must be strictly quantitative variables measured on a continuous or discrete numeric scale. Categorical variables cannot be correlated.
  • 2. Straight Enough Condition:

    • The scatterplot trajectory must be reasonably linear. If a scatterplot displays strong curvature, correlation is completely misleading and inappropriate as a summary measure.
  • 3. Outlier Condition:

    • The scatterplot must be inspected for extreme outliers. A single severe outlier can artificially inflate a near-zero correlation or severely diminish a strong linear association.

Comprehensive Analytical Process: Blood Pressure Case Study

When evaluating real-world bivariate relationships, adhere to the structured Think, Plot, Show, and Tell framework:

  • Think (Plan):

    • Objective: Examine the relationship between Systolic Blood Pressure (SBP) and Diastolic Blood Pressure (DBP).
    • Dataset: Measurement records for n=1406n = 1406 participants in the Framingham Heart Study located in Framingham, MA.
  • Plot (Check Conditions):

    • Both SBP and DBP are continuous quantitative variables measured in mm Hg\text{mm\,Hg}.
    • The scatterplot displays a straight, linear path.
    • No extreme, isolated outliers are present.
    • Conclusion: Correlation is a suitable summary metric.

Scatterplot of Systolic BP vs Diastolic BP

  • Show (Mechanics):

    • Computing the correlation coefficient in StatCrunch yields r=0.792r = 0.792
  • Tell (Conclusion):

    • The scatterplot exhibits a positive directional relationship, where higher DBP is associated with higher SBP. The path is generally linear with moderate scatter. The computed correlation coefficient r=0.792r = 0.792 accurately reflects this strong linear association.

Fundamental Mathematical Properties of Correlation

  • Directional Sign:

    • r>0r > 0 indicates a positive linear association.
    • r<0r < 0 indicates a negative linear association.
  • Strict Numeric Boundaries:

    • −1≤r≤1-1 \le r \le 1
    • r=1r = 1 occurs strictly when all observations lie perfectly on a line with a positive slope.
    • r=−1r = -1 occurs strictly when all observations lie perfectly on a line with a negative slope.
  • Variable Symmetry:

    • Interchanging xx and yy leaves the correlation coefficient completely unchanged (Corr(x,y)=Corr(y,x)\text{Corr}(x,y) = \text{Corr}(y,x)).
  • Dimensionless Scale:

    • rr is completely unitless because it is calculated via standardized zz--scores.
  • Invariance to Linear Transformations:

    • Shifting location (adding/subtracting constants) or altering scale (multiplying/dividing by positive constants, such as converting units from dollars to Euros or cents) does not change rr
  • Sensitivity to Non-Linearity and Outliers:

    • rr strictly measures the strength of linear relationships.
    • Extreme outliers can cause dramatic fluctuations in rr.
    • Quantitative descriptors like weak, moderate, and strong describe rr, though exact numerical boundary definitions vary by application domain.

Sampling Variability of Correlation Coefficients

  • Sample-to-Sample Variation:

    • Just as sample means vary across repeated sampling, correlation coefficients calculated from finite samples vary around the true population correlation parameter.
  • Simulation Experiment (1998 US Live Births Dataset):

    • Population Target: Pairwise recorded ages of mothers (Momage) and fathers (Fage) across all live births in the United States in 19981998.
    • Population Parameters: Total live births = 39451923945192; complete paired birth records with father's age recorded = 33777213377721
    • Experimental Method: Repeatedly drawing random samples of size n=50n = 50 from the population of 33777213377721 pairs and calculating rr

Histogram of Sampling Distribution of Correlation in Samples of Size 50

  • Empirical Simulation Insights:
    • In samples of size n=50n = 50, sample correlations ranged from as low as 0.400.40 to as high as 0.900.90, with the vast majority falling between 0.700.70 and 0.800.80
    • Skewness Towards Zero: Unless the true population correlation is exactly zero, the sampling distribution of sample correlations is skewed toward zero.
    • Practical Implications: When correlations vary across samples, it is systematically more likely to observe a sample correlation that is somewhat smaller than the true population value rather than larger. This protects analysts from over-interpreting sample correlations.

Causation, Correlation, and Lurking Variables

  • Fundamental Axiom: Correlation does not demonstrate causation (Correlation≠Causation\text{Correlation} \neq \text{Causation}).

  • Reverse Causation Case Study (Storks and Human Population):

    • Observation: A strong positive correlation (r=0.97r = 0.97) exists between stork populations and human population across European regions.
    • Fallacy: Asserting that more storks increase human birth rates.
    • Reality: Reverse causation is at work. Storks nest on house chimneys; larger human populations build more houses and chimneys, creating additional nesting habitats for storks.

Scatterplot of Human Population vs Number of Storks

  • Lurking Variables:

    • A lurking variable is an unobserved variable that simultaneously drives changes in both xx and yy, creating a false impression of a direct cause-and-effect relationship between them.
    • Metaphorical Example: Count of gray hairs and count of wrinkles are strongly correlated. Dyeing hair black does not eliminate wrinkles, because both variables are driven by the common lurking variable of Age.
  • Reporting Standards and Terminology:

    • Incorrect: "Raising salaries increases productivity."
    • Correct: "Employees with higher salaries tend to be more productive."
    • Incorrect: "r=−0.99r = -0.99 proves that drinking more red wine lowers cholesterol."
    • Correct: "There is a strong negative association between red wine consumption and cholesterol level."
    • Incorrect: "A child that has two educated parents will graduate from college."
    • Correct: "Children whose parents are educated are more likely to graduate from college."

Correlation Matrices and Tables

  • Definition: When datasets contain multiple quantitative variables, a correlation table or matrix summarizes the pairwise correlation coefficients for every combination of variables.

  • Diagonal Feature: All diagonal cells in a correlation matrix equal 1.0001.000 because any variable correlates perfectly with itself (Corr(x,x)=1.000\text{Corr}(x,x) = 1.000).

  • Corporate Performance Metric Matrix Example:

    • Variables Analyzed: Assets, Sales, Market Value, Profits, Cash Flow, Employees.
    • Sales vs. Assets: r=0.746r = 0.746
    • Market Value vs. Sales: r=0.879r = 0.879
    • Profits vs. Market Value: r=0.968r = 0.968
    • Cash Flow vs. Profits: r=0.989r = 0.989
    • Employees vs. Sales: r=0.924r = 0.924

Correlation Table for Economic Variables

  • Critical Cautions for Table Interpretation:
    • Never interpret numerical values in a correlation table without first inspecting the individual scatterplots for every variable pair to verify linearity and check for distorting outliers.

Straightening Non-Linear Scatterplots and the Ladder of Powers

  • The Objective of Re-Expression: Non-linear relationships invalidate standard correlation coefficients and regression models. Applying power transformations to one or both variables can re-express curved data into a linear form.

  • The Ladder of Powers:

    • Power 22 (y2y^2): Used when scatterplots bend downwards.
    • Power 11 (yy): Unmodified raw data (linear baseline).
    • Power 12\frac{1}{2} (y\sqrt{y}): Used for count data.
    • Power 00 (log⁡(y)\log(y)): Used for strictly positive continuous data spanning multiple orders of magnitude.
    • Power −12-\frac{1}{2} (−1y-\frac{1}{\sqrt{y}}): Used when weaker powers fail to achieve linearity.
    • Power −1-1 (−1y-\frac{1}{y}): Used for ratios and rates (e.g., miles per gallon).
  • Case Study: Camera Shutter Speed vs. Lens f/stop:

    • Initial Assessment: Shutter speed vs. f/stop displays clear non-linear curvature despite a high raw correlation coefficient (r=0.979r = 0.979).
    • Ineffective Transformation: Applying a logarithmic transformation log⁡(f/stop)\log(\text{f/stop}) worsens the curvature and makes the relationship even less linear.

Log Transformed Scatterplot

  • Effective Transformation: Squaring the f/stop variable to (f/stop)2(\text{f/stop})^2 produces a linear scatterplot path with an extraordinary linear correlation coefficient of r=0.998r = 0.998

Scatterplot of (f/stop)^2 vs Shutter Speed

Common Pitfalls and Statistical Errors

  • Conflating "Correlation" and "Association": Association is a broad term encompassing any relationship between variables; correlation specifically measures the strength and direction of a linear relationship.

  • Correlating Categorical Variables: Computing correlation on non-numeric or nominal categorical variables (such as car model or personality type) is mathematically meaningless.

  • Assuming Linearity from High Correlation: A high correlation coefficient rr can occur in strongly non-linear data. Visual verification via scatterplots is mandatory.

Non-Linear Curved Scatterplot

  • Outlier Distortion:
    • A single influential outlier can distort correlation metrics dramatically.
    • Example: "Bozo the Genius Clown" (Shoe Size ≈22.5\approx 22.5, IQ ≈175\approx 175) artificially inflates the correlation between shoe size and IQ to r=0.50r = 0.50, even though zero correlation exists within the main cluster.

Scatterplot of IQ vs Shoe Size with Outlier Bozo