Equation of straight line is `y=mx+b`, where Slope is m and Intercept is b
`m=(n sum xy - sum x sum y) / (n sum(x^2) - (sum x)^2)`
`b=(sum y - m sum x)/n`
The values are calculated using the following table
`x` | `y` | `x^2` | `x*y` |
3 | 2.3 | 9 | 6.9 |
5 | 2.6 | 25 | 13 |
7 | 2.8 | 49 | 19.6 |
9 | 3.2 | 81 | 28.8 |
11 | 3.5 | 121 | 38.5 |
--- | --- | --- | --- |
`sum x=35` | `sum y=14.4` | `sum x^2=285` | `sum x*y=106.8` |
Find the value of Slope `m`
`m=(n sum xy - sum x sum y) / (n sum(x^2) - (sum x)^2)`
`:.m=(5 * 106.8 - 35*14.4) / (5* 285 - (35)^2)`
`:.m=(534 - 504) / (1425 - 1225)`
`:.m=(30) / (200)`
`:.m=0.15`
Find the value of Intercept `b`
`b=(sum y - m sum x)/n`
`:.b=(14.4 - 0.15 * 35)/5`
`:.b=(14.4 -5.25)/5`
`:.b=(9.15)/5`
`:.b=1.83`
So the required equation is `y=mx+b`
`y=0.15x+1.83`