Linear regression calculator

This linear regression calculator uses the least squares method to find the line of best fit for a set of paired data. The line of best fit is described by the equation f(x) = Ax + B, where A is the slope of the line and B is the y-axis intercept.
All you need is enter paired data into the text box, each pair of x and y each line (row).

Also calculate coefficient of correlation Pearson product-moment correlation coefficient (PPMCC or PCC or R). The Pearson correlation coefficient is used to measure the strength of a linear association between two variables, where the value R = 1 means a perfect positive correlation and the value R = -1 means a perfect negataive correlation.




Calculation:

Statistical file:
{[2; 12], [0; 0], [5; 20], [0; 0], [7; 25], [0; 0], [11; 26], [0; 0], [15; 40]}

A = 2.5925090252708 (slope)
B = 2.14440433213 (y intercept)
R = 0.96857802117607 (correlation coefficient)

y = f(x) = Ax + B = 2.5925x+2.1444

Calculation Summary:

xyxyx2 x-mxy-my (x-mx)2(y-my)2 (x-mx)(y-my)
2 12 24 4 -2.4444444444444-1.6666666666667 5.97530864197532.7777777777778 4.0740740740741
0 0 0 0 -4.4444444444444-13.666666666667 19.753086419753186.77777777778 60.740740740741
5 20 100 25 0.555555555555566.3333333333333 0.3086419753086440.111111111111 3.5185185185185
0 0 0 0 -4.4444444444444-13.666666666667 19.753086419753186.77777777778 60.740740740741
7 25 175 49 2.555555555555611.333333333333 6.5308641975309128.44444444444 28.962962962963
0 0 0 0 -4.4444444444444-13.666666666667 19.753086419753186.77777777778 60.740740740741
11 26 286 121 6.555555555555612.333333333333 42.975308641975152.11111111111 80.851851851852
0 0 0 0 -4.4444444444444-13.666666666667 19.753086419753186.77777777778 60.740740740741
15 40 600 225 10.55555555555626.333333333333 111.41975308642693.44444444444 277.96296296296
∑x = 40 ∑y = 123 ∑xy = 1185 ∑x2 = 424 mx=4.4444444444444 my=13.666666666667 SSX = ∑(y-my))2 = 246.22222222222 SSY = ∑(y-my))2 = 1764 SP = ∑(x-mx)(y-my) = 638.33333333333

X-data


Average (mean): μ=4.4444444444444
Absolute deviation: 40.444444444444
Mean deviation: 4.4938271604938
Minimum: 0
Maximum: 15
Variance: 27.358024691358
Standard deviation σ=5.2304899093066
Corrected sample standard deviation s=5.5477723256977
Coefficient of variation cV=1.248248773282
Signal-to-noise ratio SNR=0.80112235750148
Median: 2
Quartile Q1: 0
Quartile Q2: 2
Quartile Q3: 9
1st decile: 0 (Too few data to calculate deciles)
2nd decile: 0
3rd decile: 0
4th decile: 0
5th decile: 2
6th decile: 5
7th decile: 7
8th decile: 11
9th decile: 15
Interquartile range IQR: 9
Quartile Deviation QD: 4.5
Coefficient of Quartile Deviation CQD: 1
Lower fence: -13.5
Upper fence: 22.5
Set of outliers: {} - empty set - no outliers found
Interdecile range IDR: 15
Mode: 0 - unimodal
Geometric mean: 0
Harmonic mean: 0
Sum: 40
Sum of squares: 246.22222222222
Sum of absolute values: 40
Average absolute deviation: 4.4938271604938
Range: 15
Frequency table :
elementfrequencycumulative frequencyrelative frequencycumulative relative frequency
0 4 4 0.44444444444444 0.44444444444444
2 1 5 0.11111111111111 0.55555555555556
5 1 6 0.11111111111111 0.66666666666667
7 1 7 0.11111111111111 0.77777777777778
11 1 8 0.11111111111111 0.88888888888889
15 1 9 0.11111111111111 1
Z-score: {-0.4673, -0.8497, 0.1062, -0.8497, 0.4886, -0.8497, 1.2533, -0.8497, 2.0181}
Count items: 9

Calculation of normal distribution

Statistical file(X-data):
{0, 0, 0, 0, 2, 5, 7, 11, 15}


Y-data


Average (mean): μ=13.666666666667
Absolute deviation: 112.66666666667
Mean deviation: 12.518518518519
Minimum: 0
Maximum: 40
Variance: 196
Standard deviation σ=14
Corrected sample standard deviation s=14.849242404917
Coefficient of variation cV=1.0865299320671
Signal-to-noise ratio SNR=0.92036120725868
Median: 12
Quartile Q1: 0
Quartile Q2: 12
Quartile Q3: 25.5
1st decile: 0 (Too few data to calculate deciles)
2nd decile: 0
3rd decile: 0
4th decile: 0
5th decile: 12
6th decile: 20
7th decile: 25
8th decile: 26
9th decile: 40
Interquartile range IQR: 25.5
Quartile Deviation QD: 12.75
Coefficient of Quartile Deviation CQD: 1
Lower fence: -38.25
Upper fence: 63.75
Set of outliers: {} - empty set - no outliers found
Interdecile range IDR: 40
Mode: 0 - unimodal
Geometric mean: 0
Harmonic mean: 0
Sum: 123
Sum of squares: 1764
Sum of absolute values: 123
Average absolute deviation: 12.518518518519
Range: 40
Frequency table :
elementfrequencycumulative frequencyrelative frequencycumulative relative frequency
0 4 4 0.44444444444444 0.44444444444444
12 1 5 0.11111111111111 0.55555555555556
20 1 6 0.11111111111111 0.66666666666667
25 1 7 0.11111111111111 0.77777777777778
26 1 8 0.11111111111111 0.88888888888889
40 1 9 0.11111111111111 1
Z-score: {-0.119, -0.9762, 0.4524, -0.9762, 0.8095, -0.9762, 0.881, -0.9762, 1.881}
Count items: 9

Calculation of normal distribution

Statistical file(Y-data):
{0, 0, 0, 0, 12, 20, 25, 26, 40}



Practice problems from statistics:



more math problems »