In: Statistics and Probability
Listed below are annual data for various years. The data are weights (metric tons) of imported lemons and car crash fatality rates per 100,000 population. Construct a scatterplot, find the value of the linear correlation coefficient r, and find the P-value using alpha equals0.05 . Is there sufficient evidence to conclude that there is a linear correlation between lemon imports and crash fatality rates? Do the results suggest that imported lemons cause car fatalities? Lemon Imports 231 265 357 482 530 Crash Fatality Rate 15.9 15.7 15.4 15.2 14.8
We will use the R code to solve the problem :
We will define x= Lemon Imports
and y = Crash Fatality Rate
We will define the following terms as follows to calculate r = correlation coefficient
Sxx = - n* (x_bar)2
Syy = - n* (y_bar)2
Sxy = - n*(x_bar)*(y_bar)
r = Sxy/(Sxx*Syy)^0.5
x_bar = / n
y_bar = /n
We have the following results
x_bar = 373
y_bar = 13.4
sxx = 68614
syy = 70.74
sxy = 1200.6
r= 1200.6/ (70.74*68614)0.5
r = 0.5449535
Not to test for linear correlation
Therefore Ho : = 0 vs H1 0
Therefore the test - statistics under Ho is as follows
t = r* / follows with n-2 degrees of freedom
t= 1.125731
p value = 0.342207
Conclusion : Since p value = 0.342207 > = 0.05 we do not have sufficient evidence to reject Ho . And we conclude that there is not sufficient evidence to conclude that there is a linear correlation between lemon imports and crash fatality rates.