In: Statistics and Probability
An emergency service wishes to see whether a relationship exists between the outside temperature and the number of emergency calls it receives for a 7-hour period. The data are shown.
Temperature x :68 74 82 88 93 99 101
No. of calls y : 7 4 8 10 11 9 13
a) Draw the scatter plot for the variables.
b) Compute and explain the correlation coefficient in terms of the question provided.
c) Test the significance of the correlation coefficient at ? =0.05. Show all steps of
the hypothesis test.
d) What percent of the variability is accounted for by the relationship between the two
variables?
e) What would be the slope and y-intercept for a regression line based on this data?
Write the regression line also.
f) Draw the regression line on the scatterplot from part a.
g) What is the coefficient of non-determination?
h) Find y’ when x =80 F.
i) Run the regression analysis in R using the lm function and report the R output.
a)
Following is the scatter plot:
b)
Following table shows the calculations:
X | Y | X^2 | Y^2 | XY | |
68 | 7 | 4624 | 49 | 476 | |
74 | 4 | 5476 | 16 | 296 | |
82 | 8 | 6724 | 64 | 656 | |
88 | 10 | 7744 | 100 | 880 | |
93 | 11 | 8649 | 121 | 1023 | |
99 | 9 | 9801 | 81 | 891 | |
101 | 13 | 10201 | 169 | 1313 | |
Total | 605 | 62 | 53219 | 600 | 5535 |
Sample size: n=7
Now,
The coefficient of correlation is :
c)
Hypotheses are:
Test statistics:
-------------------------
Here degree of freedom is df=n-2=5 so p-value of the test is
0.0267.
The excel function used for p-value is: "=TDIST(3.104,5,2)"
Since p-value is less than 0.05 so we reject the null hypothesis.
d)
The percent of the variability is accounted for by the relationship between the two variables is
e)
Slope of the regression equation is
and intercept of the equation will be
So the regression equation will be
y'=-7.5441+0.1898x
f)
g)
The coefficient of non-determination is
h)
y'=-7.5441+0.1898*80 = 7.6399
i)
Following is the screen shot of R script:
Following is the R output: