How to use Pearson Correlation & Linear Regression
About Pearson Correlation & Linear Regression
Estimate Pearson correlation and a simple ordinary-least-squares regression line from paired X/Y values.
Linear association does not establish causation. Check scatterplots, influential points, residuals and independence before inference.
- Prepare the complete dataset and confirm the measurement design. Enter matched X and Y observations in the same row order.
- Enter values in the labeled fields and calculate locally.
- Inspect the statistic, degrees of freedom and p-value when applicable; compare the example and assess assumptions before reporting.
Formula & calculation method
Enter at least three matched X and Y observations. The fitted model is Y = intercept + slope × X; the p-value is two-sided for zero linear correlation.
Input reference · 1 fields
These labels describe the calculation’s base units. Supported measurements can switch through the header’s region settings; follow the current workspace labels. Prefilled values are examples.
- Research observations
- Enter matched X and Y observations in the same row order.
A quick example
X 1, 2, 3, 4, 5 and Y 2, 1, 4, 3, 6 give Pearson r about 0.822 and slope 1.
Assumptions, edge cases & limits
- Constant X or Y values prevent a valid correlation; inspect nonlinearity and influential points.
- Linear association does not establish causation. Check scatterplots, influential points, residuals and independence before inference.
- Missing entries are rejected rather than silently imputed. These educational calculations are not a substitute for a research methodology review.
Questions about Pearson Correlation & Linear Regression
How do I calculate Pearson correlation and a linear regression line?
Enter matching X and Y observations in the same order. Inspect correlation and fitted coefficients, check the scatter and avoid treating association as causation.
Does a high Pearson r prove one variable causes another?
No. Pearson r measures linear association. Confounding, reverse causality and influential observations can explain a relationship.
Can I paste a spreadsheet with blank cells?
Not directly. Supply complete comma-separated numeric observations. Decide how to handle missing data before using the calculator.
For processing, privacy and service availability, see our privacy details and methodology. Tool-specific questions and limitations are explained above.
A result or explanation needs correcting? Tell us the tool name and an example.