Bivariate Data Analysis: Scatterplots, Pearson Correlation, and Significance Testing

Foundations of Bivariate Data and the Statistical Workflow

  • Univariate Versus Bivariate Data:

    • Univariate Data: Consists of observations gathered on a single quantitative or qualitative characteristic per individual. Summarization focuses on center, shape, and spread.

    • Bivariate Data: Involves measurements collected on two separate variables for each individual or observational unit simultaneously. The primary investigative goal is to discover whether a mathematical or statistical relationship exists between the two variables, characterize that relationship, or conclude that the variables operate independently.

  • Analytical Toolkit for Bivariate Analysis:

    • Scatterplots: Two-dimensional graphical displays utilized to visually identify patterns, trends, clusters, and potential relationship shapes.

    • Correlation: A standardized quantitative metric measuring the direction and linear strength between two paired quantitative variables, assessing how closely plotted points cluster along a straight line.

    • Regression: Mathematical modeling used to determine the best-fit line or curve, allowing researchers to predict values of one variable based on known values of another when a linear trend is supported.

  • Placement Within the Four-Stage Statistical Process:

    • Stage 1: Identify the question and population.

    • Stage 2: Collect the data.

    • Stage 3: Organize and summarize the information (the focus of bivariate correlation and exploratory data analysis).

    • Stage 4: Make an inference if appropriate.

The Statistical Process Flowchart

Bivariate Variables: Explanatory and Response Definitions

  • Association:

    • Two variables are considered associated when specific values of one variable tend to occur concurrently with specific values of the other. Knowing the value of one variable provides meaningful predictive or explanatory insight into the other.

    • Associations can occur between two qualitative variables, one qualitative and one quantitative variable, or two quantitative variables.

  • Correlation:

    • Defined specifically as an association between paired quantitative (numerical) variables.

  • Formal Variable Roles in Paired Data:

    • Paired Data Representation: Bivariate observations are expressed mathematically as ordered pairs: (x,y)(x, y).

    • Explanatory Variable (xx): Also known as the independent or predictor variable; plotted on the horizontal axis. It serves as the input used to explain, model, or predict changes in the second variable.

    • Response Variable (yy): Also known as the dependent or outcome variable; plotted on the vertical axis. It represents the outcome or measurement of interest whose variation is being studied.

Constructing and Interpreting Scatterplots

  • Definition and Purpose:

    • A scatterplot (or scatter diagram) is a Cartesian coordinate plot displaying bivariate data as individual coordinate points (x,y)(x, y). It serves as the primary visual diagnostic tool for examining bivariate relationships before computing summary statistics.

  • Manual Construction Procedure:

    1. Designate the explanatory variable as the horizontal axis (xx) and the response variable as the vertical axis (yy).

    2. Establish uniform numerical scales along both axes covering the full data range.

    3. Plot each individual observation as a discrete point at its respective (x,y)(x, y) coordinates.

  • Case Demonstration: Student Exam Scores (Example 1):

    • An instructor tracked performance across two exams to evaluate whether Exam 1 scores (xx, explanatory) could predict Exam 2 scores (yy, response).

Student Name

Exam 1 Score (xx)

Exam 2 Score (yy)

Ordered Pair (x,y)(x, y)

Derek

7070

8181

(70,81)(70, 81)

Marshawn

9595

8787

(95,87)(95, 87)

Isabel

8080

8282

(80,82)(80, 82)

Sophia

8383

7979

(83,79)(83, 79)

Juan

8282

9090

(82,90)(82, 90)

Jackson

1010

7676

(10,76)(10, 76)

Carol

00

7373

(0,73)(0, 73)

Scatterplot of Student Exam Scores
  • Interpretation: The scatterplot demonstrates an upward trend: students achieving higher scores on Exam 1 generally attained higher scores on Exam 2, while students with lower Exam 1 scores tended to register lower Exam 2 scores. This visual trend indicates a positive association.

  • StatCrunch Software Workflow for Scatterplots:

    1. Enter or import the bivariate data into two designated adjacent columns.

    2. Navigate the top menu: click Graph →\rightarrow Scatter Plot.

    3. Assign the respective column headers to the X variable and Y variable drop-down menus.

    4. Click Compute! to render the scatterplot.

Classifying Types, Direction, and Strength of Correlation

Types of Correlation and Scatterplots Chart
  • Directional Classifications:

    • Positive Correlation: Occurs when the points follow a general linear trajectory with a positive slope (rising from lower-left to upper-right). As the explanatory variable (xx) increases, the response variable (yy) tends to increase.

    • Negative Correlation: Occurs when the points follow a linear path with a negative slope (falling from upper-left to lower-right). As the explanatory variable (xx) increases, the response variable (yy) tends to decrease.

  • Structural Classifications:

    • Linear Correlation: Points cluster along a straight line path.

    • Non-linear (Curvilinear) Correlation: Data display a systematic relationship that is not straight (e.g., an inverted U-shaped parabolic curve resembling y=−x2y = -x^2).

    • No Correlation: Points are dispersed uniformly or randomly across the Cartesian space, exhibiting neither an upward, downward, nor curved pattern.

  • Qualitative Descriptors of Strength:

    • Relationships are qualitatively characterized as weak, moderate, or strong based on how tightly the points cluster along the trend trajectory.

    • Subjectivity Warning: Qualitative verbal descriptions of scatterplots without numerical statistics are subjective and prone to differing interpretations.

  • Visual Case Studies:

    • Fast Food Nutrition (Example 3): Comparing Total Fat (xx, in grams) to Protein (yy, in grams) across restaurant chain meals reveals a strong positive linear pattern rising from left to right.

    • Automotive Specifications (Example 4): Comparing Vehicle Curb Weight (xx, in pounds) to Fuel Economy (yy, in Miles Per Gallon [MPG]) demonstrates a strong negative linear trend where heavier vehicles systematically exhibit poorer fuel economy.

MPG versus Weight Scatterplot
  • Cardiovascular Clinical Metrics (Example 5): Plotting Resting Heart Rate (xx, in beats per minute [BPM]) against HDL Cholesterol Level (yy, in milligrams per deciliter [mg/dL]) produces a diffuse, unstructured cloud of points, indicating no correlation.

HDL Cholesterol versus Heart Rate Scatterplot
  • Common Real-World Directional Examples:

    • Hours of Study versus Exam Score: Positive correlation.

    • Hours of Television Watched per Week versus GPA: Negative correlation.

    • Human Height versus Body Weight: Positive correlation.

    • Amount of Aerobic Exercise versus Body Fat Percentage: Negative correlation.

    • Cell Phone Brand versus Resting Blood Pressure: No correlation.

The Pearson Linear Correlation Coefficient

  • Origin and Purpose:

    • Developed by Karl Pearson to eliminate subjective assessments of scatterplots by providing an objective numerical index measuring how closely data points adhere to a straight line.

  • Notation:

    • Sample linear correlation coefficient: denoted by rr.

    • Population linear correlation coefficient parameter: denoted by ρ\rho (Greek letter rho).

  • Mathematical Formula:

    • The sample linear correlation coefficient evaluates the mean product of standardized paired zz-scores:

r=∑zx⋅zyn−1r = \frac{\sum z_x \cdot z_y}{n - 1}

  • Where standardized scores for each observation are defined as:

zx=xi−xˉsxz_x = \frac{x_i - \bar{x}}{s_x}

zy=yi−yˉsyz_y = \frac{y_i - \bar{y}}{s_y}

  • Expanded algebraic form:

r=∑(xi−xˉsx)(yi−yˉsy)n−1r = \frac{\sum \left(\frac{x_i - \bar{x}}{s_x}\right)\left(\frac{y_i - \bar{y}}{s_y}\right)}{n - 1}

*   Where:
    *   nn = total number of paired data coordinates.
    *   xˉ\bar{x} and yˉ\bar{y} = sample means of variables xx and yy.
    *   sxs_x and sys_y = sample standard deviations of variables xx and yy.
  • Mathematical Properties of the Correlation Coefficient (rr):

    • Bounded Range: The coefficient is strictly bounded within the closed interval −1≤r≤+1-1 \le r \le +1.

    • Perfect Negative Linearity (r=−1r = -1): All coordinate pairs lie precisely on a downward-sloping straight line.

    • Perfect Positive Linearity (r=+1r = +1): All coordinate pairs lie precisely on an upward-sloping straight line.

    • Magnitude Interpretation: The closer ∣r∣|r| approaches 11, the stronger the linear relationship and the tighter points align to a line. As rr approaches 00, linear correlation weakens toward total dispersion.

    • Crucial Diagnostic Caveat (r=0r = 0): An outcome of r=0r = 0 denotes the total absence of a linear association. It does not prove the absence of a relationship, as strong non-linear or curvilinear patterns (such as parabolas) can produce r=0r = 0.

Range of Linear Correlation from -1 to +1
  • Numerical Spectrum Guidelines:

    • r=−1.0r = -1.0: Perfect Negative Linear Correlation

    • −1.0<r<−0.5-1.0 < r < -0.5: Strong Negative Linear Correlation

    • r≈−0.5r \approx -0.5: Moderate Negative Linear Correlation

    • −0.5<r<0.0-0.5 < r < 0.0: Weak Negative Linear Correlation

    • r=0.0r = 0.0: No Linear Correlation

    • 0.0<r<0.50.0 < r < 0.5: Weak Positive Linear Correlation

    • r≈0.5r \approx 0.5: Moderate Positive Linear Correlation

    • 0.5<r<1.00.5 < r < 1.0: Strong Positive Linear Correlation

    • r=1.0r = 1.0: Perfect Positive Linear Correlation

  • Worked Manual Calculation:

    • Given the five bivariate observations (n=5n = 5): (4,3)(4, 3), (2,2)(2, 2), (1,8)(1, 8), (3,5)(3, 5), (8,4)(8, 4).

    • Summary statistics:

      • xˉ=3.6\bar{x} = 3.6

      • sx=2.7018512≈2.7019s_x = 2.7018512 \approx 2.7019

      • yˉ=4.4\bar{y} = 4.4

      • sy=2.3021729≈2.3022s_y = 2.3021729 \approx 2.3022

Index (ii)

xix_i

zx=xi−3.62.7019z_x = \frac{x_i - 3.6}{2.7019}

yiy_i

zy=yi−4.42.3022z_y = \frac{y_i - 4.4}{2.3022}

Product (zx⋅zyz_x \cdot z_y)

1

44

0.14800.1480

33

−0.6081-0.6081

−0.0900-0.0900

2

22

−0.5922-0.5922

22

−1.0425-1.0425

0.61740.6174

3

11

−0.9623-0.9623

88

1.56371.5637

−1.5047-1.5047

4

33

−0.2221-0.2221

55

0.26060.2606

−0.0579-0.0579

5

88

1.62851.6285

44

−0.1737-0.1737

−0.2829-0.2829

  • Sum of products of standardized scores:

∑zx⋅zy=−1.319\sum z_x \cdot z_y = -1.319

  • Compute Pearson correlation coefficient (rr):

r=−1.3195−1=−1.3194=−0.32975≈−0.3297r = \frac{-1.319}{5 - 1} = \frac{-1.319}{4} = -0.32975 \approx -0.3297

  • StatCrunch computational verification yields r=−0.3296r = -0.3296.

  • Interpretation: Weak negative linear correlation.

Technology-Based Computation of Correlation

  • StatCrunch Software Workflow for Linear Correlation:

    1. Organize bivariate data into two designated columns within the spreadsheet.

    2. Navigate the top menu: click Stat →\rightarrow Summary Stats →\rightarrow Correlation.

    3. Hold down the Shift key (Windows) or Command key (macOS) and click both variable names to highlight them simultaneously.

    4. Click Compute! to open the numerical summary window.

  • Empirical Application Outputs:

    • Exam Scores (Example 6):

      • Data: Table 1 student grades (n=7n = 7).

      • StatCrunch result: r=0.81457979≈0.815r = 0.81457979 \approx 0.815.

      • Conclusion: Strong positive linear correlation.

    • Fast Food Nutrition: Fat vs. Protein (Example 7):

      • Data: Table 2 nutritional profiles (n=16n = 16 meals):

Metric

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

Total Fat (g)

88

1111

2727

2626

4040

4343

1515

2222

99

1212

1111

88

1212

3838

4949

5454

Protein (g)

1212

1515

2424

3030

3939

4848

1111

2424

2828

99

22

1111

1313

2626

3333

4343

*   StatCrunch result: r=0.84807168≈0.848r = 0.84807168 \approx 0.848.
*   *Conclusion:* Strong positive linear correlation.
  • Vehicle Weight vs. Fuel Economy (Example 8):

    • Data: Table 3 automotive measurements (n=15n = 15 vehicles):

Vehicle Model

Curb Weight (lbs)

Fuel Economy (MPG)

'69 Chevy truck

52005200

99

Chevy Camaro

33393339

1919

Dodge Charger

39643964

1919

Dodge Neon

25802580

2727

Ford Escape

32983298

2727

Ford F-150

47054705

1717

Ford Mustang

35263526

2222

Honda CR-V

33373337

2828

Honda Civic

28772877

3030

Honda Pilot

40304030

2020

Hyundai Tucson

33293329

2626

Mazda 6

31793179

2626

Subaru Outback

36413641

2626

Toyota Rav4

33703370

2727

Toyota Tacoma

39153915

2020

*   StatCrunch result: r=−0.88435876≈−0.884r = -0.88435876 \approx -0.884.
*   *Conclusion:* Strong negative linear correlation.
  • Resting Heart Rate vs. HDL Cholesterol (Example 9):

    • Data: Table 4 clinic observations (n=20n = 20 patients):

Heart Rate (BPM)

HDL (mg/dL)

Heart Rate (BPM)

HDL (mg/dL)

8080

5252

7878

6161

7070

4848

8282

6969

8080

3535

6767

6060

7171

5555

6666

6262

7272

5353

6464

6363

7878

5454

7171

6666

7878

4646

7272

4343

7474

5656

7070

3030

6767

5353

6868

4040

6464

4646

7676

6262

  • StatCrunch result: r=0.040196208≈0.040r = 0.040196208 \approx 0.040.

  • Conclusion: No linear correlation (rr is near zero).

Testing Statistical Significance of Correlation

  • Formal Definition:

    • A linear correlation coefficient is defined as statistically significant when sufficient sample evidence exists to conclude that the true population correlation reflects a linear trend, confirming the data points follow a genuine linear pattern rather than random sampling fluctuations.

  • Dependence on Sample Size (nn):

    • The evaluation of correlation depends heavily on sample size. A moderate correlation value (e.g., r=0.72r = 0.72) provides strong evidence of linearity in large samples (n=45n = 45), but weak evidence in very small samples (n=7n = 7), where large random deviations occur more frequently.

  • Analogy to Diagnostic Medical Testing:

    • Statistical significance indicates only the presence of a detectable linear relationship, not its strength. This functions like a COVID antigen test: a positive result confirms that viral antigen is present, but provides no measurement of disease severity. Significance proves a linear trend exists, but does not dictate whether that trend is weak, moderate, or strong.

  • Five-Step Significance Testing Procedure:

    1. Calculate or obtain the sample linear correlation coefficient (rr).

    2. Determine the sample size (nn), defined as the total number of paired observations.

    3. Reference the Critical Values Table for Correlation to locate the critical threshold value (CVCV) corresponding to row nn.

    4. Compute the absolute value of the correlation coefficient: ∣r∣|r|.

    5. Execute the decision rule:

      • If ∣r∣>CV|r| > CV, the correlation is statistically significant (sufficient evidence of a linear pattern).

      • If ∣r∣≤CV|r| \le CV, the correlation is not statistically significant (insufficient evidence of a linear pattern).

  • Critical Values Reference Table for Linear Correlation:

Sample Size (nn)

Critical Value (CVCV)

Sample Size (nn)

Critical Value (CVCV)

33

0.9970.997

2727

0.3810.381

44

0.9500.950

2828

0.3740.374

55

0.8780.878

2929

0.3670.367

66

0.8110.811

3030

0.3610.361

77

0.7540.754

3131

0.3550.355

88

0.7070.707

3232

0.3490.349

99

0.6660.666

3333

0.3440.344

1010

0.6320.632

3434

0.3390.339

1111

0.6020.602

3535

0.3340.334

1212

0.5760.576

3636

0.3290.329

1313

0.5530.553

3737

0.3250.325

1414

0.5320.532

3838

0.3200.320

1515

0.5140.514

3939

0.3160.316

1616

0.4970.497

4040

0.3120.312

1717

0.4820.482

4141

0.3080.308

1818

0.4680.468

4242

0.3040.304

1919

0.4560.456

4343

0.3010.301

2020

0.4440.444

4444

0.2970.297

2121

0.4330.433

4545

0.2940.294

2222

0.4230.423

4646

0.2910.291

2323

0.4130.413

4747

0.2880.288

2424

0.4040.404

4848

0.2850.285

2525

0.3960.396

4949

0.2820.282

2626

0.3880.388

5050

0.2790.279

  • Convention for Samples Exceeding Table Limits: For sample sizes where n>50n > 50, the standard convention utilizes the critical value for n=50n = 50 (CV=0.279CV = 0.279) as a conservative decision threshold.

  • Evaluating Significance Across Sample Sizes (Example 10):

    • (a) Given r=0.647r = 0.647, n=35n = 35:

      • CV=0.334CV = 0.334

      • Condition: ∣0.647∣=0.647>0.334|0.647| = 0.647 > 0.334

      • Decision: The correlation is statistically significant.

    • (b) Given r=−0.412r = -0.412, n=16n = 16:

      • CV=0.497CV = 0.497

      • Condition: ∣−0.412∣=0.412<0.497|-0.412| = 0.412 < 0.497

      • Decision: The correlation is not statistically significant.

    • (c) Given r=−0.581r = -0.581, n=28n = 28:

      • CV=0.374CV = 0.374

      • Condition: ∣−0.581∣=0.581>0.374|-0.581| = 0.581 > 0.374

      • Decision: The correlation is statistically significant.

    • (d) Given r=0.871r = 0.871, n=5n = 5:

      • CV=0.878CV = 0.878

      • Condition: ∣0.871∣=0.871<0.878|0.871| = 0.871 < 0.878

      • Decision: The correlation is not statistically significant. Despite an apparently large correlation (r=0.871r = 0.871), the sample size of five is too small to provide sufficient statistical certainty.

    • (e) Given r=0.512r = 0.512, n=51n = 51:

      • Because n>50n > 50, use the conservative threshold CV=0.279CV = 0.279.

      • Condition: ∣0.512∣=0.512>0.279|0.512| = 0.512 > 0.279

      • Decision: The correlation is statistically significant.

  • Synthesized Bivariate Analysis Evaluations:

    • Total Fat vs. Protein in Fast Food (Example 12):

      • Sample size: n=16n = 16

      • Observed correlation: r≈0.848r \approx 0.848

      • Table threshold: CV=0.497CV = 0.497

      • Test: ∣r∣=0.848>0.497|r| = 0.848 > 0.497

      • Conclusion: Statistically significant. The data exhibit a moderate-to-strong positive linear relationship.

    • Curb Weight vs. Gas Mileage (Example 13):

      • Sample size: n=15n = 15

      • Observed correlation: r≈−0.884r \approx -0.884

      • Table threshold: CV=0.514CV = 0.514

      • Test: ∣r∣=0.884>0.514|r| = 0.884 > 0.514

      • Conclusion: Statistically significant. The data exhibit a strong negative linear relationship.

    • Heart Rate vs. HDL Cholesterol (Example 14):

      • Sample size: n=20n = 20

      • Observed correlation: r≈0.040r \approx 0.040

      • Table threshold: CV=0.444CV = 0.444

      • Test: ∣r∣=0.040<0.444|r| = 0.040 < 0.444

      • Conclusion: Not statistically significant. There is no evidence of a linear relationship.

Correlation Versus Causation and Spurious Relationships

  • The Non-Causality Principle:

    • Correlation demonstrates co-variation and predictive association, but does not prove cause-and-effect. A strong statistical correlation between variable xx and variable yy does not establish that changes in xx directly cause changes in yy.

  • Lurking and Confounding Variables:

    • An unmeasured underlying factor—known as a lurking variable—can influence both variables simultaneously, creating a strong statistical correlation between them even though no direct causal mechanism connects the two.

  • Case Demonstration: Macroeconomic Trends (1990–2020):

    • A bivariate analysis of historical unemployment rates for Black and White Americans between 1990 and 2020 reveals a strong positive linear correlation (r≈0.919r \approx 0.919).

    • Causal Fallacy: Changes in one group's unemployment rate do not directly cause changes in the other's.

    • Lurking Variable Explanation: Broader economic forces—such as business cycle recessions, inflation shocks, monetary policy shifts, and global financial crises—simultaneously drive unemployment up or down across both demographic groups.

Scatterplot and Time Series of Unemployment Rates
  • Spurious Correlations:

    • A spurious correlation is a high mathematical correlation between two fundamentally unrelated variables, arising entirely through coincidence, shared temporal trends, or unlinked lurking variables.

    • Empirical Example: Cheese Consumption vs. Bedsheet Tangling Deaths:

      • Data tracked by Tyler Vigen using records from the U.S. Department of Agriculture (USDA) and the Centers for Disease Control and Prevention (CDC) across 2000–2009.

      • Variables: Per capita cheese consumption versus deaths caused by becoming tangled in bedsheets.

      • Observed correlation: r≈0.947r \approx 0.947

      • Interpretation: High per capita cheese consumption does not cause bedsheet strangulation, nor do bedsheet accidents promote cheese consumption. Both variables drifted upward concurrently over the decade due to population growth, changes in reporting standards, or pure mathematical coincidence.

Spurious Correlation: Cheese Consumption vs Bedsheet Tangling Deaths
  • Additional Documented Spurious Trajectory:

    • A parallel study tracked by the National Vital Statistics Reports and the CDC demonstrates an empirical correlation of r≈0.952r \approx 0.952 between unrelated societal indicators, reinforcing that strong statistical metrics alone never establish physical causality.