Pearson's Correlation Analysis

Pearson's correlation measures the strength and direction of a linear relationship between two continuous variables. Example: testing whether study hours correlate with exam scores.


Step 1 — Choose the analysis type

Two large cards:

Card What it does
Single Correlation Analyse the correlation between two variables (one pair) — full results with statistical inference and scatter plot
Matrix Correlation Compute a correlation matrix for multiple variables at once (many pairs simultaneously) — colour-coded heatmap

Step 2 — Choose the input method

Method When to use
Manual entry Paste or type the values into the relevant columns
Excel upload Import an Excel file with your variables as columns

Step 3 — Provide your data

For Single Correlation

Enter two columns of values. The Sample Data Generator offers five built-in scenarios:

  • Height vs Weight (Height_Weight, Height_BMI)
  • Age vs Blood Pressure (Age_SBP, Age_DBP)
  • Study Hours vs Exam Score
  • Exercise vs Cholesterol
  • Screen Time vs Sleep Quality

For Matrix Correlation

Add as many variables as you need with Add Variable / Remove Variable (minimum 2). Each variable needs at least 3 observations. The Matrix Sample Data Generator offers five scenarios:

  • Metabolic Panel (Glucose, HbA1c, Insulin, BMI)
  • Cardiovascular Risk (SBP, LDL, HDL, TG, CRP)
  • Academic Performance (GPA, Study Hours, Sleep Hours, Stress Level)
  • Pulmonary Function
  • Soil & Crop Analysis

Step 4 — Calculate

Click the calculate button.


Step 5 — Results (Single Correlation)

A Results panel appears with:

  • Correlation coefficient (r) — from −1 to +1

  • Sample size (n) and degrees of freedom (df = n − 2)

  • t-statistic — from t = r × √(df / (1 − r²))

  • p-value — two-tailed

  • Coefficient of Determination (R²)

  • Interpretation of strength and direction:

    | |r| | Strength | |---|---| | < 0.30 | Weak | | 0.30 – 0.50 | Moderate | | 0.50 – 0.70 | Strong | | ≥ 0.70 | Very strong |

A Scatter Plot is rendered below with a Download as JPG button for publication-ready export.


Step 6 — Results (Matrix Correlation)

A correlation matrix where each cell displays the r value between two variables. Cells are colour-coded by |r|:

| |r| value | Tier | |---|---| | ≥ 0.70 | Very strong | | 0.50 – 0.70 | Strong | | 0.30 – 0.50 | Moderate | | < 0.30 | Weak |

A Download as Image button exports the matrix. Excel export is also available.

A UniversalChatBot appears after both result types.


Statistical methods used

Correlation coefficient (r)

r = Σ ((xᵢ − x̄)(yᵢ − ȳ)) / ((n − 1) × s_x × s_y)

Hypothesis statement

  • H₀: ρ = 0 (no linear correlation)
  • H₁: ρ ≠ 0 (two-tailed)
  • Significance level: α = 0.05

t-statistic

t = r × √((n − 2) / (1 − r²))

Matrix Correlation

Every pair computed independently using the same Pearson formula. Output is a k × k symmetric matrix.

Minimum sample size: 3 observations per variable for matrix mode.