Academic managers online nowFree quote in 3 minutes. Assignments from $19.Submit assignment →
Free, no account, nothing storedThe arithmetic runs in your browser. Nothing you type is sent to us.All 100 calculators →

Statistics & Data Science · pattern F, Dataset

Simple linear regression, end to end.

Paste your paired data for the regression equation, correlation, coefficient of determination and the intermediate sums — everything a lab report or a stats assignment asks you to present.

Inputs

Sample or population

Divide by n − 1 for a sample drawn from a wider population; by n only when the data is the entire population.

The formula used

ŷ = a + bx, fitted by least squares

Predictions from the fitted line are valid only within the range of x in your data, and only if the residuals look structureless.

Regression equation

y = 1.1357x + 32.7857

n = 8 pairs · r = 0.9965 · r² = 0.9930 — strong linear association

Slope, b
1.13571
Intercept, a
32.78571
r
0.99650
0.99301
Mean of x
37.500
Mean of y
75.375
Σ(x−x̄)(y−ȳ)
1,192.500
Σ(x−x̄)²
1,050.000

Your data — accent bars sit beyond one deviation

55.0096.00

Worked steps

  1. 1b = Σ(x−x̄)(y−ȳ) ÷ Σ(x−x̄)² = 1,192.500 ÷ 1,050.000 = 1.13571

    the slope is the covariance of x and y over the variance of x

  2. 2a = ȳ − b·x̄ = 75.375 − 1.13571·37.500 = 32.78571

    the line passes through the point of means

  3. 3r = 0.99650, r² = 0.99301

    r² is the share of variation in y explained by x

r² is a share of variance, not a measure of correctness.

A high r² means the line accounts for most of the variation in y, and says nothing about whether a line was the right model, whether the relationship is causal, or whether the residuals are well behaved. A fitted curve on the wrong functional form can produce an impressive r² and useless predictions. Report the equation, r², n, and the range of x over which it holds.

Questions about linear regression

How many points do I need?
Arithmetically two; meaningfully many more. With fewer than about eight the slope estimate is unstable and a single point can dominate the fit.
What if my data is not linear?
Transform it or fit the right model. Taking logs of one or both variables linearises power and exponential relationships, and the regression then applies to the transformed data.
Should the intercept always be fitted?
Usually yes. Forcing it through the origin is only appropriate when theory requires y = 0 at x = 0, and it changes the slope estimate.

A calculator handles the arithmetic. It cannot teach you the method.

If the number is not the part you are stuck on, that is what the service is for — a specialist who explains the working, not just the answer.

Statistical output here is for coursework and learning. Reported p-values and intervals assume the conditions stated on the page; nothing here checks whether those conditions hold for your data.