In: Statistics and Probability
Using the Patients dataset, create a scatter plot (similar to Figure 13.5) with patient’s age on the x-axis and length of stay on the y-axis. Make sure that you fully label this chart (title for the chart, x-axis, and y-axis). (5 points)
Follow the directions in EG13.2 (Excel Guide) at the end of Chapter 13 and create a linear trend line along with the linear regression equation and R-squared value. Interpret both the linear regression equation and the R-squared value. (10 points)
Now calculate the correlation coefficient and interpret it. What do you conclude about the relationship between a patient’s age and length of stay? (5 points)
Length of Stay |
Age (Years) |
3 |
78 |
3 |
74 |
11 |
89 |
3 |
81 |
9 |
87 |
3 |
65 |
3 |
90 |
3 |
61 |
3 |
90 |
5 |
78 |
3 |
78 |
2 |
71 |
3 |
76 |
3 |
76 |
5 |
79 |
3 |
72 |
4 |
72 |
3 |
64 |
2 |
72 |
3 |
69 |
4 |
63 |
1 |
78 |
2 |
83 |
3 |
62 |
4 |
71 |
6 |
83 |
2 |
63 |
1 |
83 |
4 |
76 |
5 |
79 |
3 |
65 |
2 |
79 |
4 |
74 |
15 |
63 |
3 |
84 |
6 |
90 |
4 |
73 |
2 |
81 |
5 |
75 |
9 |
87 |
3 |
70 |
3 |
73 |
5 |
77 |
5 |
71 |
7 |
76 |
4 |
49 |
6 |
78 |
2 |
86 |
3 |
67 |
6 |
69 |
8 |
73 |
4 |
88 |
5 |
67 |
8 |
69 |
7 |
77 |
8 |
64 |
3 |
76 |
12 |
64 |
2 |
41 |
5 |
49 |
5 |
59 |
3 |
81 |
2 |
74 |
4 |
77 |
3 |
78 |
2 |
73 |
6 |
67 |
3 |
80 |
3 |
77 |
4 |
73 |
5 |
67 |
3 |
86 |
7 |
82 |
7 |
84 |
3 |
73 |
4 |
82 |
8 |
62 |
2 |
84 |
3 |
89 |
1 |
84 |
4 |
81 |
3 |
81 |
6 |
78 |
5 |
84 |
5 |
37 |
7 |
62 |
1 |
80 |
2 |
80 |
4 |
73 |
11 |
80 |
3 |
80 |
2 |
80 |
1 |
81 |
4 |
39 |
6 |
86 |
8 |
79 |
4 |
87 |
2 |
53 |
3 |
83 |
7 |
80 |
7 |
79 |
4 |
72 |
3 |
77 |
3 |
81 |
9 |
67 |
4 |
80 |
6 |
67 |
1 |
88 |
1 |
88 |
6 |
92 |
3 |
85 |
5 |
85 |
3 |
80 |
2 |
98 |
3 |
74 |
5 |
77 |
9 |
53 |
7 |
93 |
4 |
83 |
7 |
80 |
3 |
79 |
3 |
87 |
16 |
59 |
3 |
81 |
4 |
94 |
1 |
33 |
2 |
78 |
2 |
29 |
2 |
80 |
3 |
63 |
4 |
86 |
4 |
96 |
5 |
89 |
5 |
80 |
5 |
55 |
5 |
73 |
7 |
67 |
2 |
75 |
Let's use excel:
Step 1) First enter the given dataset in excel columns
step 2) Select both the column and then click on Insert >>>Scatter >>>First image
See the following image
Then we get the following output:
let's fit the line on the above scatter plot:
Right click on any points on the scatter plot and then select "Add Trendline".
Select "Linear" And check the following two boxes
Look the following image
then click on Closed
So we get the following output
From the above output
The sign of the coefficient of x is negative.
So there is negative correlation between Age and length of Stay.
Also the coefficient of determination = R2 = 0.006
So the correlation coefficient = R = = -0.07746
We assign negative sign to R because there is negative correlation ( sign of coefficient of x is negative) between the Age and Length of Stay
Since |R | is very small ( closed to zero) so there is week correlation between the Age and Length of Stay .