Calculation basis, sources and review
Ordinary least squares: slope = covariance sum / x deviation sum; intercept = mean y − slope × mean x; R² = squared Pearson correlation.
- Publisher
- Count.ie, operated by K Imports
- Page last updated
- — explanatory content and transparency information, not a new rules verification.
- Documented source check
- No dated source check recorded.
- Professional review
- No named independent professional review is recorded for this tool.
Any dated method notes below apply only to their stated scope. A formula or user-entered rate is not evidence that statutory rules are current.
Uses the stated formula and the assumptions you enter. No external source review is claimed.
Estimates, not financial, tax, legal or accounting advice. How our dates and checks work. Report a correction.
What straight-line prediction follows from my paired x and y observations?
Fit paired values, report slope and R², and calculate a specified prediction. Regression needs paired observations rather than two unrelated lists. The supported fitted slope, intercept and correlation describe the entered data, while predictions outside its range can be unreliable. A strong fit does not establish causation, and residual patterns or influential observations can make a simple straight-line model inappropriate.
How the calculation works
Linear regression & correlation applies one fixed set of rules to the inputs described below, so the same entries always give the same answer. The exact formula is published once, in the Sources, formula and methodology section further down this page.
Paired x values: Equal-length lists, 2–1,000 finite observations. Paired y values is entered as 3; 5; 7; 9; 11 in the illustration. Keep the unit shown on the field when substituting your own measurement or amount. X value to predict is entered as 6 in the illustration. Keep the unit shown on the field when substituting your own measurement or amount.
Worked example
A fixed illustration uses Paired x values: 1; 2; 3; 4; 5; Paired y values: 3; 5; 7; 9; 11; X value to predict: 6. Predicted Y: 13; R Squared: 1. All remaining illustrated settings are listed in the example-input disclosure below. These are reproducible sample figures, not saved visitor inputs; this text does not change when you edit the interactive form.
Read the numerical result alongside the sampling or independence assumptions in the method. More decimal places do not mean better evidence. Check outliers and the observation period before generalising from the entered data to a wider population.
What moves the answer
Each comparison changes one input of the fixed example and re-runs this calculator’s engine. Other assumptions stay unchanged.
- Raising x value to predict from 6 to 6.6, with everything else unchanged, predicted y moves from 13 to 14.2.
Frequently asked questions
What happens if I increase x value to predict in this example?
Changing x value to predict from 6 to 6.6, with the other example settings unchanged, changes predicted y from 13 to 14.2. This isolates one input using the form's actual calculation. Compare changes separately rather than attributing a difference to several assumptions at once.
What assumptions should I check for Linear regression & correlation?
Editable inputs are planning assumptions; check the method and result notes for scope. This is a formula-based planning tool, not a feed of live quotations or an independent assessment. Its editable amounts, prices and rates are your assumptions, so check them against the records or specifications relevant to your case.
Quick answer
The Linear regression & correlation model returns predicted y and r squared. Regression needs paired observations rather than two unrelated lists.
Outputs and units: Predicted Y (unitless number); R Squared (unitless number).
Fixed worked example results
Linear regression & correlation example — Paired x values: 1; 2; 3; 4; 5; Paired y values: 3; 5; 7; 9; 11; X value to predict: 6. Predicted Y: 13; R Squared: 1.
Illustration only, not your entered figures. Use the complete example inputs below, selected options and stated limitations when quoting these results.
| Result | Example value |
|---|---|
| Predicted Y | 13 |
| R Squared | 1 |
Exact inputs used in the worked example
- Paired x values
- 1; 2; 3; 4; 5
- Paired y values
- 3; 5; 7; 9; 11
- X value to predict
- 6
Cite this calculation example
Count.ie. Linear regression & correlation: fixed worked example. Page updated 2026-10-16. https://count.ie/statistics/linear-regression/#worked-example
This citation describes the fixed example above, not your entered figures. Include the complete assumptions and relevant year when quoting a result. Official sources remain the authority on the underlying rules.
Link to the worked exampleFixed example, assumptions and sources (JSON)AI discovery index
Sources, formula and methodology
| Step | Formula or calculation | When it applies |
|---|---|---|
| Published calculation method | Ordinary least squares: slope = covariance sum / x deviation sum; intercept = mean y − slope × mean x; R² = squared Pearson correlation. | Use the stated input units, supported modes and limitations below. |
Assumptions and limits
Editable inputs are planning assumptions; check the method and result notes for scope.
Explanation of the implemented calculator, not independent professional review, enactment verification or a promise of AI citation. See the source links and review scope above.