Correlation, Regression, and Statistical Inference

Foundations of Association: Correlation and Regression

  • Linear vs. Curvilinear Trends:

    • Linear Relationship: Best fit by a straight line.

    • Curvilinear Relationship: Best fit by a curved line (non-linear).

  • Monotonicity:

    • Monotonic Trend: As XX increases, YY strictly increases or decreases without direction reversal (can be linear or non-linear).

    • Non-Monotonic Trend: As XX increases, YY reverses direction at least once.

  • Core Analytical Roles:

    • Correlation: Assesses the strength and direction of association between variables.

    • Linear Regression: Estimates the best-fitting line relating a predictor variable (XX) to a criterion variable (YY) to describe how YY changes when XX varies.

Covariance and the Pearson Correlation Coefficient

  • Covariance (covXY\text{cov}_{XY}): Measures the degree to which two variables vary together around their respective means:   covXY=∑i=1N(Xi−Xˉ)(Yi−Yˉ)N−1\text{cov}_{XY} = \frac{\sum_{i=1}^{N} (X_i - \bar{X})(Y_i - \bar{Y})}{N - 1}

    • Positive Covariance: Deviation scores predominantly share the same sign ((+)(+)(+)(+) or (−)(−)(-)(-)).

    • Negative Covariance: Deviation scores predominantly have opposite signs ((+)(−)(+)(-)).

    • Zero Covariance: Cross-products of deviation scores cancel out equally across quadrants.

  • Pearson Product-Moment Correlation Coefficient (rr): Standardizes covariance to allow comparison across variables with different scales:   r=covXYsXsYr = \frac{\text{cov}_{XY}}{s_X s_Y}

    • Divides covariance by the product of the sample standard deviations (sXs_X and sYs_Y).

    • Dimensionless: rr is unitless and strictly bounded: −1.0≤r≤1.0-1.0 \le r \le 1.0.

    • Scale Invariance: Changing units of measurement alters covariance (e.g., metric vs. imperial height/weight yielding covariances of 92.0392.03 vs. 79.8879.88), but leaves Pearson rr invariant (r=0.77r = 0.77).

  • Fit vs. Slope:

    • Correlation depends entirely on the fit (tightness of data points around the line), not the magnitude of the slope.

    • A horizontal best-fitting line implies no linear association (r≈0r \approx 0).

    • Correlation is mathematically undefined when either XX or YY is a constant value, as the standard deviation is zero.

Factors Affecting Correlation

  • Non-Linearity: Severe non-linear patterns can result in r≈0r \approx 0 despite strong, deterministic associations (e.g., seasonal air temperature cycles over time yielding r=0.05r = 0.05).

  • Extreme Scores (Outliers): Pearson rr lacks robustness to outliers; displacing as few as 22 points out of 100100 can shift an observed correlation from r=−0.05r = -0.05 to r=0.38r = 0.38.

  • Restricted Range: Truncating or examining a restricted range of XX or YY can severely underestimate, overestimate, or reverse the true correlation observed across the full domain.

  • Heterogeneous Subgroups (Simpson's Paradox): A pattern seen within distinct subgroups disappears or completely reverses when groups are aggregated.

Simpson's Paradox illustrating negative aggregated correlation alongside positive subgroup correlations
  • Subgroups differing in their means (Xˉ\bar{X} and Yˉ\bar{Y}) can exhibit positive internal relationships (r=0.8r = 0.8 or r≈0.75r \approx 0.75), yet yield a negative aggregate correlation (r=−0.81r = -0.81 or r=−0.72r = -0.72).

Varieties of Correlation Coefficients

  • Pearson Product-Moment Correlation (rr): Evaluates linear associations between two continuous variables.

  • Spearman Rank-Order Correlation (rsr_s or ρ\rho):

    • Pearson rr computed on ranked (ordinal) data.

    • Measures monotonic association rather than strict linearity (a perfectly monotonic, non-linear curve yields rs=1.0r_s = 1.0 whereas r<1.0r < 1.0).

    • More robust to certain outliers than Pearson rr (e.g., shifting two extreme points alters rr from −0.05-0.05 to 0.380.38, while rsr_s shifts only from −0.05-0.05 to −0.01-0.01).

  • Point-Biserial Correlation (rpbr_{pb}):

    • Evaluates the association between one dichotomous variable (e.g., item response coded 00 or 11) and one continuous variable (e.g., total test score).

    • Calculated using the Pearson formula; recoding the binary values preserves the magnitude (∣rpb∣=0.46|r_{pb}| = 0.46), though reversing the code flips the sign.

  • Phi Correlation (rϕr_{\phi}):

    • Evaluates the association between two binary/dichotomous variables (e.g., correctness on question 1 vs. correctness on question 2, yielding rϕ=0.51r_\phi = 0.51).

    • Computed using the standard Pearson formula.

Correlation Versus Causation

  • A non-zero correlation does not establish a causal relationship between XX and YY. Observed associations may arise from:

    • Direct causation (X→YX \rightarrow Y).

    • Reverse causation (Y→XY \rightarrow X).

    • Bidirectional or partial causation.

    • Common secular trends over time (spurious correlations, e.g., US oil imports vs. per capita chicken consumption from 2000–2009 yielding r=0.9r = 0.9, or US highway fatalities vs. Mexican lemon imports yielding r=−0.98r = -0.98).

    • Confounding third variables.

    • Chance or sampling coincidence.

Population Inference and Confidence Intervals

  • Sampling Variability: Sample correlation (rr) serves as a point estimate of the true, invariant population parameter (ρ\rho or rpopr_{pop}). Across random samples of size n=20n = 20, sample rr can fluctuate substantially (e.g., ranging between −0.7-0.7 and +0.7+0.7 when ρ=0\rho = 0).

  • Confidence Interval (CI): An interval estimate bounded by lower and upper limits expected to cover ρ\rho across 95%95\% of repeated samplings.

  • Percentile Bootstrap (Resampling) Method:

    • Derives an empirical sampling distribution from a single sample by repeatedly drawing new samples of size nn with replacement.

    • Calculates the bootstrap statistic r∗r^* for each resample.

    • The 95%95\% confidence interval is determined directly by the values cutting off the lowest 2.5%2.5\% and highest 2.5%2.5\% of the r∗r^* distribution (e.g., CI95%=[0.21,0.80]CI_{95\%} = [0.21, 0.80]).

    • A 95%95\% CI that excludes zero provides empirical support that ρ>0\rho > 0.

    • Interval width scales with the confidence level (99%99\% CI is wider, 90%90\% CI is narrower).

Null Hypothesis Significance Testing and Permutation Tests

  • Hypothesis Formulation:

    • Null Hypothesis (H0H_0): rpop=0r_{pop} = 0 (observed association arose strictly by sampling error).

    • Alternative Hypothesis (H1H_1): rpop≠0r_{pop} \neq 0.

  • Permutation Test Procedure:

    • Generates a true null sampling distribution (rpop=0r_{pop} = 0) by randomly scrambling the pairings between XX and YY.

    • Scrambling preserves the individual sample means and variances of both variables while forcing the true association to zero.

    • Evaluates where the observed sample rr falls relative to the scrambled distribution.

Permutation null distribution of r under H0 showing the critical cutoff lines and extreme observed sample correlation
  • Decision Rule and Significance:

    • For a two-tailed test with α=0.05\alpha = 0.05, the central 95%95\% of scrambled correlations fall within a critical boundary (e.g., [−0.39,+0.37][-0.39, +0.37] for n=20n = 20).

    • If an observed sample correlation (e.g., r=0.59r = 0.59) falls outside this range, the probability of obtaining such an extreme result by chance under H0H_0 is p<0.05p < 0.05.

    • In this case, H0H_0 is rejected in favor of H1H_1, establishing statistical significance.

    • Setting the significance threshold at α=0.05\alpha = 0.05 limits the Type I error rate (falsely rejecting a true null hypothesis) to 5%5\%.