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 to do is enter paired data into the text box, each pair of x and y in a separate line (row).
Also, the coefficient of correlation is calculated as the Pearson product-moment correlation coefficient (PPMCC or PCC or R). The Pearson correlation coefficient measures 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 negative correlation.
Calculation:
Statistical file:{[2; 12], [5; 20], [7; 25], [11; 26], [15; 40]}
A = 1.9326923076923 (slope)
B = 9.1384615384615 (y intercept)
R = 0.96265074392828 (correlation coefficient)
y = f(x) = Ax + B = 1.9327x+9.1385
y=f(x)=Ax+B=1.9327x+9.1385
Calculation Summary:
x | y | xy | x2 | x-mx | y-my | (x-mx)2 | (y-my)2 | (x-mx)(y-my) |
---|---|---|---|---|---|---|---|---|
2 | 12 | 24 | 4 | -6 | -12.6 | 36 | 158.76 | 75.6 |
5 | 20 | 100 | 25 | -3 | -4.6 | 9 | 21.16 | 13.8 |
7 | 25 | 175 | 49 | -1 | 0.4 | 1 | 0.16 | -0.4 |
11 | 26 | 286 | 121 | 3 | 1.4 | 9 | 1.96 | 4.2 |
15 | 40 | 600 | 225 | 7 | 15.4 | 49 | 237.16 | 107.8 |
∑x = 40 | ∑y = 123 | ∑xy = 1185 | ∑x2 = 424 | mx=8 | my=24.6 | SSX = ∑(y-my))2 = 104 | SSY = ∑(y-my))2 = 419.2 | SP = ∑(x-mx)(y-my) = 201 |
n=5 A=n∑x2−(∑x)2n∑xy−∑x⋅∑y=5⋅424−4025⋅1185−40⋅123=1.9326923076923 B=n∑y−A⋅∑x=5123−1.9326923076923⋅40=9.1384615384615 y=f(x)=Ax+B=1.9327x+9.1385 R=∑(x−mx)2⋅∑(x−mx)2∑(x−mx)(y−my)=104⋅419.2201=0.96265074392828
X-data
Average (mean): μ=8
Absolute deviation: 20
Mean deviation: 4
Minimum: 2
Maximum: 15
Variance: 20.8
Standard deviation σ=4.5607017003966
Corrected sample standard deviation s=5.0990195135928
Coefficient of variation cV=0.6373774391991
Signal-to-noise ratio SNR=1.5689290811055
Median: 7
Quartile Q1: 3.5
Quartile Q2: 7
Quartile Q3: 13
1st decile: 3.8 (Too few data to calculate deciles)
2nd decile: 2.6
3rd decile: 4.4
4th decile: 5.8
5th decile: 7
6th decile: 9.4
7th decile: 11.8
8th decile: 14.2
9th decile: 15
Interquartile range IQR: 9.5
Quartile Deviation QD: 4.75
Coefficient of Quartile Deviation CQD: 0.57575757575758
Lower fence: -10.75
Upper fence: 27.25
Set of outliers: {} - empty set - no outliers found
Interdecile range IDR: 11.2
Mode: {2, 5, 7, 11, 15} - multimodal
Geometric mean: 6.4940614952848
Harmonic mean: 4.997836434444
Sum: 40
Sum of squares: 104
Sum of absolute values: 40
Average absolute deviation: 4
Range: 13
Frequency table :
element | frequency | cumulative frequency | relative frequency | cumulative relative frequency |
---|---|---|---|---|
2 | 1 | 1 | 0.2 | 0.2 |
5 | 1 | 2 | 0.2 | 0.4 |
7 | 1 | 3 | 0.2 | 0.6 |
11 | 1 | 4 | 0.2 | 0.8 |
15 | 1 | 5 | 0.2 | 1 |
Count items: 5
Calculation of normal distribution
Statistical file(X-data):
{2, 5, 7, 11, 15}
Y-data
Average (mean): μ=24.6
Absolute deviation: 34.4
Mean deviation: 6.88
Minimum: 12
Maximum: 40
Variance: 83.84
Standard deviation σ=9.1564185138077
Corrected sample standard deviation s=10.237187113656
Coefficient of variation cV=0.41614581762828
Signal-to-noise ratio SNR=2.403003845381
Median: 25
Quartile Q1: 16
Quartile Q2: 25
Quartile Q3: 33
1st decile: 16.8 (Too few data to calculate deciles)
2nd decile: 13.6
3rd decile: 18.4
4th decile: 22
5th decile: 25
6th decile: 25.6
7th decile: 28.8
8th decile: 37.2
9th decile: 40
Interquartile range IQR: 17
Quartile Deviation QD: 8.5
Coefficient of Quartile Deviation CQD: 0.3469387755102
Lower fence: -9.5
Upper fence: 58.5
Set of outliers: {} - empty set - no outliers found
Interdecile range IDR: 23.2
Mode: {12, 20, 25, 26, 40} - multimodal
Geometric mean: 22.857931028231
Harmonic mean: 21.115322144017
Sum: 123
Sum of squares: 419.2
Sum of absolute values: 123
Average absolute deviation: 6.88
Range: 28
Frequency table :
element | frequency | cumulative frequency | relative frequency | cumulative relative frequency |
---|---|---|---|---|
12 | 1 | 1 | 0.2 | 0.2 |
20 | 1 | 2 | 0.2 | 0.4 |
25 | 1 | 3 | 0.2 | 0.6 |
26 | 1 | 4 | 0.2 | 0.8 |
40 | 1 | 5 | 0.2 | 1 |
Count items: 5
Calculation of normal distribution
Statistical file(Y-data):
{12, 20, 25, 26, 40}
Practice problems from statistics:
- Gradually 34921
We gradually measured the values of 3,8,13,10,1,13,10,5,3,9. Calculate how much is the sum of the median and average of this file from the mode of this file.
- Median and modus
Radka made 50 throws with a dice. The table saw fit individual dice's wall frequency: Wall Number: 1 2 3 4 5 6 frequency: 8 7 5 11 6 13 Calculate the modus and median of the wall numbers that Radka fell.
- A Gallup
A Gallup poll investigated whether adults in Mumbai preferred staying at home or going out as their favorite way of spending time in the evening. Out of the 500 adults, the majority of adults (70%) indicated that staying at home was their favorite evening
- 75th percentile (quartille Q3)
Find 75th percentile for 30,42,42,46,46,46,50,50,54
- A batsman
A batsman scored the following number of runs in seven innings 35,30,45,65,39,20,40. Find the mean, median, and range.
- Increase the mean
To which number should the number 4 be changed between the numbers 4,5,7, 1,0,9,7,8, -3,5 to increase these numbers' arithmetic mean by 1.25?
- Third tests
Third periodical tests are 98, 97, 86, 94, 90, 97, 91, and 94. Find the median of her grades and interpret the result.
- Harmonic HM example
Find the harmonic mean of 4 and 8.
- Find mean
Find the mean of two numbers: -4 and 5 (the first is negative four).
- The data
The data set represents the number of cars in a town given a speeding ticket daily for ten days. 2 4 5 5 7 7 8 8 8 12 What is the IQR?
- The size 2
The size of pants sold during one business day in a department store is 32, 38, 34, 42, 36, 34, 40, 44, 32, and 34. Find the average size of the pants sold.
more math problems »