Home / Statistical Tools / Analysis Tools / Correlation and Covariance / How-To
How-To¶
Quick Start: Pearson Correlation¶
Create your first correlation matrix in less than two minutes.
This example shows the simplest way to measure the linear relationship between two numeric variables using Pearson Correlation.
Goal¶
Measure the linear correlation between height and weight and assess whether the relationship is statistically significant.
Sample Data¶
Press Copy for Excel, then paste the table into a blank worksheet.
| Height | Weight |
|---|---|
| 62 | 115 |
| 64 | 125 |
| 66 | 140 |
| 68 | 155 |
| 70 | 165 |
| 65 | 130 |
| 67 | 148 |
| 69 | 160 |
| 71 | 170 |
| 63 | 120 |
Each row represents one person's height (in inches) and weight (in pounds). The data should show a clear positive linear relationship: taller people tend to weigh more.
Steps¶
-
Put the data in Excel
Press Copy for Excel above the table, click cell A1 in a blank worksheet, and press Ctrl+V. The header row lands in row 1 and the 10 data rows in rows 2 through 11.
-
Launch the analysis
From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Correlation and Covariance → Pearson Correlation.
-
Select your data
Select cells A1:B11 (the header row plus all 10 data rows).
-
Configure the analysis
In the Correlation dialog:
- Data Columns: "Height" and "Weight" should both be checked
Click Finish to generate the correlation matrix.
Result¶
Quantum XL creates a compact two-dataset correlation output showing:
- Coefficient: A value close to 1 indicates a strong positive linear relationship (weight increases as height increases). A value close to -1 would indicate a strong negative relationship. Values near 0 indicate little to no linear relationship.
- p-Value: If the p-value is less than 0.05, the relationship is statistically significant (highlighted in red).
For this sample data, the coefficient should be very close to 1 with a tiny p-value, confirming a strong significant positive linear relationship between height and weight.
More Examples¶
Ready for more? See these variations:
- Spearman Correlation: Rank-based correlation for non-linear or ordinal data
- Covariance: Unstandardized measure showing variance on the diagonal
- GroupBy: A separate matrix per group, where the grouped and ungrouped answers come out with opposite signs