In: Statistics and Probability
How are the slope and intercept of a simple linear regression line calculated? What do they tell us about the relationship between the two variables? Give example of problem.
the following data are passed:
Time of study | Mark |
3 | 32 |
8 | 56 |
8 | 78 |
9 | 63 |
5 | 12 |
The independent variable is Time of studyTimeofstudy, and the dependent variable is MarkMark. In order to compute the regression coefficients, the following table needs to be used:
Time of study | Mark | Time of study*Mark | Time of study2 | Mark2 | |
3 | 32 | 96 | 9 | 1024 | |
8 | 56 | 448 | 64 | 3136 | |
8 | 78 | 624 | 64 | 6084 | |
9 | 63 | 567 | 81 | 3969 | |
5 | 12 | 60 | 25 | 144 | |
Sum = | 33 | 241 | 1795 | 243 | 14357 |
Based on the above table, the following is calculated: