In: Statistics and Probability
In this problem, you will create and use a dummy variable and the regression procedure to test the hypothesis of independence of two variables. The data in tab 17 (Waiting time) in DS6 represent the time spent waiting in the ER prior to being seen for two groups of patients. One group of patients had true emergencies; the second group had conditions requiring urgent medical attention. Using these data, do the following:
1. Rearrange the data so they can be analyzed using the regression tool in the data analysis add-in in Excel. That is, place the waiting times into a single column next to which you will add the dummy variable described in part b below. (2 points)
2. Add an independent variable that has the values 1 for Emergency and 0 otherwise, i.e., create a dummy variable for type of visit. (2 points)
3. Test the hypothesis that waiting time is independent of the reason for the emergency room admission (i.e., that wait time does not depend on the reason for the visit) using regression in Excel. Report the results of your test and include a copy of the ANOVA table and the table with the regression coefficients from the regression analysis in your report. (6 points) ER waiting times Reason for ER visit Urgent Emergency
ER waiting times | |
Reason for ER visit | |
Urgent | Emergency |
29 | 33 |
30 | 43 |
32 | 26 |
31 | 46 |
22 | 31 |
26 | 40 |
30 | 34 |
38 | 4 |
29 | 30 |
28 | 24 |
29 | 40 |
38 | 32 |
30 | 36 |
43 | 31 |
23 | 45 |
32 | 20 |
25 | 31 |
32 | 42 |
30 | 29 |
32 | 40 |
35 | 34 |
34 | 44 |
29 | 9 |
21 | 25 |
29 | 29 |
31 | 34 |
36 | 28 |
14 | 37 |
31 | 18 |
36 | 38 |
29 | |
48 | |
36 | |
49 | |
28 | |
39 | |
34 | |
37 | |
34 | |
42 |
The data is rearranged in the following Excel sheet:
Reason |
Binary |
Waiting Time |
Urgent |
0 |
29 |
Urgent |
0 |
30 |
Urgent |
0 |
32 |
Urgent |
0 |
31 |
Urgent |
0 |
22 |
Urgent |
0 |
26 |
Urgent |
0 |
30 |
Urgent |
0 |
38 |
Urgent |
0 |
29 |
Urgent |
0 |
28 |
Urgent |
0 |
29 |
Urgent |
0 |
38 |
Urgent |
0 |
30 |
Urgent |
0 |
43 |
Urgent |
0 |
23 |
Urgent |
0 |
32 |
Urgent |
0 |
25 |
Urgent |
0 |
32 |
Urgent |
0 |
30 |
Urgent |
0 |
32 |
Urgent |
0 |
35 |
Urgent |
0 |
34 |
Urgent |
0 |
29 |
Urgent |
0 |
21 |
Urgent |
0 |
29 |
Urgent |
0 |
31 |
Urgent |
0 |
36 |
Urgent |
0 |
14 |
Urgent |
0 |
31 |
Urgent |
0 |
36 |
Emergency |
1 |
33 |
Emergency |
1 |
43 |
Emergency |
1 |
26 |
Emergency |
1 |
46 |
Emergency |
1 |
31 |
Emergency |
1 |
40 |
Emergency |
1 |
34 |
Emergency |
1 |
4 |
Emergency |
1 |
30 |
Emergency |
1 |
24 |
Emergency |
1 |
40 |
Emergency |
1 |
32 |
Emergency |
1 |
36 |
Emergency |
1 |
31 |
Emergency |
1 |
45 |
Emergency |
1 |
20 |
Emergency |
1 |
31 |
Emergency |
1 |
42 |
Emergency |
1 |
29 |
Emergency |
1 |
40 |
Emergency |
1 |
34 |
Emergency |
1 |
44 |
Emergency |
1 |
9 |
Emergency |
1 |
25 |
Emergency |
1 |
29 |
Emergency |
1 |
34 |
Emergency |
1 |
28 |
Emergency |
1 |
37 |
Emergency |
1 |
18 |
Emergency |
1 |
38 |
Emergency |
1 |
29 |
Emergency |
1 |
48 |
Emergency |
1 |
36 |
Emergency |
1 |
49 |
Emergency |
1 |
28 |
Emergency |
1 |
39 |
Emergency |
1 |
34 |
Emergency |
1 |
37 |
Emergency |
1 |
34 |
The regression and ANOVA output is given below
SUMMARY OUTPUT |
||||||||||
Regression Statistics |
||||||||||
Multiple R |
0.172998361 |
|||||||||
R Square |
0.029928433 |
|||||||||
Adjusted R Square |
0.015449753 |
|||||||||
Standard Error |
8.115000544 |
|||||||||
Observations |
69 |
|||||||||
ANOVA |
||||||||||
df |
SS |
MS |
F |
Significance F |
||||||
Regression |
1 |
136.1231884 |
136.1231884 |
2.067069155 |
0.155164872 |
|||||
Residual |
67 |
4412.166667 |
65.85323383 |
|||||||
Total |
68 |
4548.289855 |
||||||||
Coefficients |
Standard Error |
t Stat |
P-value |
Lower 95% |
Upper 95% |
Lower 95.0% |
Upper 95.0% |
|||
Intercept |
30.16666667 |
1.481589617 |
20.36101381 |
2.1047E-30 |
27.20940141 |
33.12393192 |
27.20940141 |
33.12393192 |
||
X Variable 1 |
2.833333333 |
1.970698417 |
1.437730557 |
0.155164872 |
-1.100197171 |
6.766863837 |
-1.100197171 |
6.766863837 |
||