Statistics · Calculator companion · By K Imports
Linear regression & correlation: practical guide
This guide explains how to use the Count.ie linear regression & correlation. Fit paired values, report slope and R², and calculate a specified prediction. Follow the inputs, method and worked example below, then compare your own scenario.
Guide written .
Open the Linear regression & correlation calculatorWhat to prepare
- Collect the underlying observations and state how they were sampled.
- Identify the population, sample size and relevant assumptions.
- Check whether observations, probabilities or measurements are independent where the method requires it.
Understand the inputs
- Paired x values
- Equal-length lists, 2–1,000 finite observations.
The calculation method
Ordinary least squares: slope = covariance sum / x deviation sum; intercept = mean y − slope × mean x; R² = squared Pearson correlation.
Worked example
Illustrative inputs and their result.
Example inputs
- Paired x values
- 1, 2, 3, 4, 5
- Paired y values
- 3, 5, 7, 9, 11
- X value to predict
- 6
Calculated example result
- Predicted Y
- 13
- R Squared
- 1
How to interpret the result
A statistic summarises the supplied data; it does not repair biased sampling or establish causation. Uncertainty depends on the method's assumptions, not just the number of decimal places shown.
Compare equivalent datasets and report the sample size with the result. Where appropriate, test how an outlier or a different uncertainty assumption affects the conclusion.
Common mistakes to avoid
- Do not substitute population and sample definitions without checking the formula.
- Outliers, missing observations and selection bias can change the interpretation.
- A correlation or significance result is not proof of a causal relationship.
Assumptions and sources
Editable inputs are planning assumptions; check the method and result notes for scope.
If your case falls outside this scope, use a more suitable calculator or contact us about an unclear method.