In: Statistics and Probability
Dataset:
clinic1 |
clinic2 |
140 |
169 |
126 |
151 |
30 |
175 |
130 |
115 |
193 |
167 |
137 |
153 |
168 |
115 |
99 |
194 |
135 |
216 |
184 |
149 |
118 |
122 |
109 |
155 |
93 |
185 |
136 |
150 |
102 |
141 |
24 |
135 |
99 |
87 |
104 |
42 |
134 |
96 |
80 |
111 |
30 |
234 |
44 |
158 |
156 |
130 |
150 |
148 |
150 |
105 |
95 |
108 |
51 |
114 |
205 |
113 |
30 |
131 |
92 |
114 |
173 |
61 |
49 |
175 |
137 |
135 |
27 |
198 |
150 |
149 |
182 |
92 |
184 |
127 |
152 |
170 |
147 |
167 |
76 |
175 |
161 |
263 |
143 |
138 |
27 |
161 |
166 |
166 |
139 |
88 |
92 |
152 |
145 |
136 |
176 |
121 |
186 |
174 |
48 |
90 |
92 |
179 |
69 |
171 |
168 |
85 |
27 |
134 |
157 |
123 |
83 |
134 |
139 |
64 |
132 |
153 |
85 |
106 |
97 |
192 |
125 |
115 |
145 |
150 |
129 |
151 |
157 |
166 |
183 |
105 |
50 |
159 |
185 |
160 |
149 |
52 |
157 |
167 |
185 |
103 |
127 |
178 |
110 |
174 |
66 |
80 |
141 |
128 |
125 |
172 |
111 |
154 |
150 |
170 |
162 |
152 |
94 |
95 |
138 |
111 |
162 |
144 |
134 |
136 |
83 |
191 |
157 |
193 |
134 |
144 |
137 |
168 |
76 |
94 |
115 |
126 |
51 |
208 |
150 |
136 |
25 |
201 |
137 |
171 |
148 |
148 |
207 |
214 |
189 |
111 |
104 |
204 |
197 |
189 |
131 |
159 |
151 |
188 |
202 |
174 |
In order to solve this question I used R software.
R codes and output:
> x=scan('clipboard')
Read 200 items
> m=matrix(x,nrow=100,byrow=TRUE)
> head(m)
[,1] [,2]
[1,] 140 169
[2,] 126 151
[3,] 30 175
[4,] 130 115
[5,] 193 167
[6,] 137 153
> var(m[,1])
[1] 2283.129
> var(m[,2])
[1] 1582.514
> t.test(m[,1],m[,2])
Welch Two Sample t-test
data: m[, 1] and m[, 2]
t = -3.4918, df = 191.7, p-value = 0.0005955
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-33.973357 -9.446643
sample estimates:
mean of x mean of y
123.32 145.03
Hypothesis:
H0 :
There is no difference in the average of clinic1 and clinic2.
H1 :
There is significant difference in the average of clinic1 and clinic2.
Since we don't know the population standard deviation hence we use t test. And sample are independent of each other and having different variances. Hence we use independent sample t test with unequal variances.
Test statistics = t = -3.4918 with df = 191.7,
p-value = 0.0005955
Since p-value is less than 0.05, we reject null hypothesis and conclude that there is significant difference in the average of clinic1 and clinic2.