In: Statistics and Probability
A table shows a temperature in a given day and number of trafic accidents in a small city in the period of 7 days.
Temperature ( °C)... x |
32 |
13 |
24 |
20 |
10 |
4 |
36 |
# of accidents ...y |
7 |
4 |
9 |
11 |
3 |
5 |
8 |
Here from the given data we have to calculate first product moment correlation coefficient between the temperature°C and number of accidents.
a) The correlation coefficient is calculated as below,
The scatter plot of data is given below,
The formula for correlation coefficient is,
.
Now based on given data we calculated,
Result Details & Calculation
X Values
∑ = 139
Mean = 19.857
∑(X - Mx)2 = SSx = 820.857
Y Values
∑ = 47
Mean = 6.714
∑(Y - My)2 = SSy = 49.429
X and Y Combined
N = 7
∑(X - Mx)(Y - My) = 116.714
R Calculation
r = ∑((X - My)(Y - Mx)) / √((SSx)(SSy))
r = 116.714 / √((820.857)(49.429)) = 0.5794
r = 0.5794
b) the association between temperature°c and number of accedents is,
The value of R is 0.5794.
This is a moderate positive correlation, which means there is a tendency for high X variable scores go with high Y variable scores (and vice versa).
The value of R2, the coefficient of determination, is 0.3357.
Here notice that the coefficient of determination value is 0.3357 which is mean that the regression model is not appropriate to predict the value of number of accedents.
Coefficient of determination is 0.3357 which means that there is 33% of variation in y Variable number of accedents is explained by x variable i.e temperature.
Nevertheless we calculated the regression equation as below,
c) The regression equation is calculated as below,
The independent variable is X (temperature °c), and the dependent variable is Y (no. of accedents). In order to compute the regression coefficients, the following table needs to be used:
X | Y | X*Y | X2 | Y2 | |
32 | 7 | 224 | 1024 | 49 | |
13 | 4 | 52 | 169 | 16 | |
24 | 9 | 216 | 576 | 81 | |
20 | 11 | 220 | 400 | 121 | |
10 | 3 | 30 | 100 | 9 | |
4 | 5 | 20 | 16 | 25 | |
36 | 8 | 288 | 1296 | 64 | |
Sum = | 139 | 47 | 1050 | 3581 | 365 |
Based on the above table, the following is calculated:
This is the regression equation for given data.
d) Graphically the regression equation on scatter plot is constructed as below,
this the regression line.
Here note that here there no significant association between two variables and using the regression equation for predicting the y values it not gives us reasonable results.
Hope you understood.
Thank you.