As a consultant, you need to use the Hospital database and construct a 90% confi
ID: 3371734 • Letter: A
Question
As a consultant, you need to use the Hospital database and construct a 90% confidence interval to estimate the average census for hospitals. Change the level of confidence to 99%. What happened to the interval? Did the point estimate change?
Determine the sample proportion of the Hospital database under the variable “service” that are “general medical” (category 1). From this statistic, construct a 95% confidence interval to estimate the population proportion of hospitals that are “general medical.” What is the point estimate? How much error is there in the interval?
Suppose you want to “prove” that the average hospital in the United States averages more than 700 births per year. Use the hospital database as your sample and test this hypothesis. Let alpha be 0.01.
On average, do hospitals in the United States employ fewer than 900 personnel? Use the hospital database as your sample and an alpha of 0.10 to test this figure as the alternative hypothesis. Assume that the number of births and number of employees in the hospitals are normally distributed in the population.
This database contains observations for six variables on U.S. hospitals. These variables include Geographic Region, Control, Service, Census, Number of Births, and Personnel.
The region variable is coded from 1 to 7, and the numbers represent the following regions:
1 = South
2 = Northeast
3 = Midwest
4 = Southwest
5 = Rocky Mountain
6 = California
7 = Northwest
Control is a type of ownership. Four categories of control are included in the database:
1 = government, nonfederal
2 = nongovernment, not-for-profit
3 = for-profit
4 = federal government
Service is the type of hospital. The two types of hospitals used in this database are:
1 = general medical
2 = psychiatric
Hospital Geog. Region Control Service Census Births Personnel 1 1 2 1 107 312 792 2 1 1 1 198 1077 1762 3 1 2 1 356 1027 2310 4 1 1 1 100 355 328 5 7 1 1 9 168 181 6 4 2 1 159 3810 1077 7 4 4 1 65 735 742 8 4 2 1 48 1 131 9 1 2 1 253 1733 1594 10 1 1 1 21 257 233 11 1 1 1 27 169 241 12 6 3 1 30 430 203 13 6 3 1 43 0 325 14 6 2 1 233 2049 676 15 6 4 1 2 211 347 16 6 1 1 11 16 79 17 6 3 1 84 2648 505 18 6 2 1 219 2450 1543 19 6 3 1 112 1465 755 20 6 3 1 124 0 959 21 6 3 1 50 1993 325 22 6 2 1 142 2275 954 23 6 2 1 111 1494 1091 24 6 1 1 140 1313 671 25 6 3 1 28 451 300 26 6 2 1 154 1689 753 27 6 2 1 150 1583 607 28 6 3 1 144 2017 929 29 6 3 1 42 995 354 30 6 2 1 77 2045 408 31 5 2 1 119 1686 1251 32 5 2 1 27 503 386 33 5 2 1 15 126 144 34 2 2 1 179 2026 2047 35 2 2 1 175 1412 1343 36 2 2 1 461 1517 1723 37 1 3 2 32 0 96 38 1 2 1 74 0 529 39 1 1 1 414 2719 3694 40 1 2 1 253 1074 1042 41 1 3 1 180 1421 1071 42 1 1 1 184 762 1525 43 1 2 1 243 3194 1983 44 1 2 1 115 496 670 45 1 1 1 215 1442 1653 46 1 3 2 48 0 167 47 1 3 1 124 1107 793 48 1 2 1 189 2989 841 49 1 1 1 181 113 316 50 1 1 1 9 0 93 51 1 3 1 28 0 373 52 1 2 1 288 173 263 53 1 1 1 108 1064 943 54 1 2 1 154 759 605 55 7 2 1 76 1317 596 56 7 3 1 165 1751 1165 57 3 1 2 295 0 568 58 3 3 1 101 0 507 59 3 2 1 69 714 479 60 3 2 1 12 99 136 61 3 2 1 185 2243 1456 62 3 2 1 378 3966 3486 63 3 2 1 114 1308 885 64 3 3 2 49 0 243 65 3 2 1 106 2514 1001 66 3 2 1 460 3714 3301 67 3 2 1 43 126 337 68 3 4 1 29 556 1193 69 3 2 1 125 1327 1161 70 3 2 1 17 415 322 71 3 1 1 10 216 185 72 3 3 1 14 339 205 73 3 1 1 173 1217 1224 74 3 2 1 207 2641 1704 75 3 2 1 223 790 815 76 3 2 1 82 520 712 77 3 1 1 64 35 156 78 3 2 1 139 1168 1769 79 3 2 1 109 793 875 80 3 1 2 298 0 790 81 3 3 1 52 0 308 82 3 1 1 34 14 70 83 3 1 2 168 0 494 84 3 3 2 21 0 111 85 1 4 1 390 0 1618 86 1 1 1 47 0 244 87 1 2 1 80 776 525 88 1 3 1 50 451 472 89 1 3 2 113 0 94 90 1 2 1 45 145 297 91 1 1 1 76 1284 847 92 1 3 1 129 1 234 93 2 2 1 60 319 401 94 2 2 1 418 2154 3928 95 2 2 1 17 295 198 96 2 2 1 138 496 1231 97 2 2 1 64 589 545 98 2 2 1 62 806 663 99 2 1 1 131 701 820 100 2 2 1 265 3968 2581 101 3 4 2 456 0 1298 102 3 2 2 40 0 126 103 3 1 1 310 3655 2534 104 3 3 1 72 0 251 105 3 3 2 19 0 85 106 3 4 1 112 0 432 107 3 1 2 375 0 864 108 3 3 2 15 0 66 109 3 2 1 78 3063 556 110 3 1 1 123 169 347 111 3 2 1 54 66 239 112 3 2 1 96 827 973 113 1 3 1 82 570 439 114 1 1 2 1106 0 1849 115 1 1 1 30 0 102 116 3 1 2 56 0 262 117 3 4 1 36 342 885 118 3 3 1 127 494 549 119 3 1 2 180 0 611 120 3 4 1 59 0 330 121 5 2 1 127 0 1471 122 5 1 1 37 0 75 123 5 4 1 13 286 262 124 5 2 1 100 235 328 125 3 3 1 47 339 377 126 3 1 1 194 398 575 127 3 2 1 172 1275 1916 128 5 3 1 516 5699 2620 129 5 3 1 120 1364 571 130 5 1 1 179 714 703 131 2 4 1 140 0 535 132 2 3 2 78 0 160 133 2 3 2 68 0 202 134 2 2 1 186 779 1330 135 2 2 1 91 0 370 136 2 1 1 340 2202 3123 137 5 1 1 254 3346 2745 138 5 2 1 108 1071 815 139 5 2 1 61 352 576 140 2 2 1 174 254 502 141 2 1 2 306 0 808 142 2 3 2 28 0 50 143 2 2 1 395 699 728 144 2 2 1 923 2462 4087 145 2 1 1 335 3311 3012 146 1 2 1 46 0 68 147 1 1 1 316 4207 3090 148 1 4 2 416 0 1358 149 1 1 1 74 339 576 150 1 2 1 86 130 284 151 3 2 1 38 91 145 152 3 2 1 147 1143 2312 153 3 4 2 232 0 1124 154 3 1 2 138 0 336 155 3 2 1 38 509 415 156 3 2 1 245 1026 1779 157 3 1 2 171 0 338 158 3 3 1 51 447 453 159 3 4 1 28 1161 437 160 3 1 2 797 0 261 161 7 2 1 56 922 609 162 7 1 1 69 562 647 163 7 1 1 40 78 61 164 7 4 1 163 0 2074 165 7 2 1 231 2122 2232 166 2 1 2 523 0 948 167 2 4 1 31 0 409 168 2 2 2 43 0 153 169 2 2 1 66 710 741 170 2 2 1 231 1165 1625 171 1 4 1 11 466 538 172 1 3 1 144 1106 789 173 1 3 1 43 376 395 174 3 4 1 185 0 956 175 3 2 1 82 637 362 176 1 2 2 49 0 144 177 1 3 1 24 352 229 178 1 3 1 63 447 396 179 1 2 1 274 1227 2256 180 1 3 1 93 963 731 181 1 4 1 86 3038 1477 182 1 3 2 28 0 102 183 1 3 2 25 0 106 184 1 3 1 181 868 939 185 5 3 1 39 1189 392 186 5 1 1 302 2849 3516 187 5 2 1 80 1728 785 188 5 2 1 63 2171 607 189 2 2 1 31 364 273 190 2 2 2 170 0 630 191 1 1 1 203 2993 1379 192 1 2 1 296 0 1108 193 1 3 1 83 1964 583 194 7 2 1 84 601 514 195 7 1 1 29 387 216 196 7 2 1 187 1946 1593 197 7 2 1 77 545 1055 198 5 1 2 104 0 399 199 5 1 1 85 838 834 200 5 1 1 47 51 104Explanation / Answer
R CODE :
> data1=read.csv(file.choose(),header=T) #importing the file saved in .csv format
> attach(data1)
> names(data1)
[1] "Hospital" "Geog..Region" "Control" "Service" "Census"
[6] "Births" "Personnel"
> pointestimate=mean(Census)
> pointestimate
[1] 144.095
> t.test(Census,conf.level=0.9)
One Sample t-test
data: Census
t = 13.625, df = 199, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
90 percent confidence interval:
126.6178 161.5722
sample estimates:
mean of x
144.095
> t.test(Census,conf.level=0.99)
One Sample t-test
data: Census
t = 13.625, df = 199, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
99 percent confidence interval:
116.5896 171.6004
sample estimates:
mean of x
144.095
Changing the confidence of the interval has no effect on point estimate since it is fixed for a sample.
> prop.test(length(Census[which(Service==1)]),length(Census)) #just selecting one variable since it will have the same length like the other columns
1-sample proportions test with continuity correction
data: length(Census[which(Service == 1)]) out of length(Census), null probability 0.5
X-squared = 91.125, df = 1, p-value < 2.2e-16
alternative hypothesis: true p is not equal to 0.5
95 percent confidence interval:
0.7800987 0.8864669
sample estimates:
p
0.84
> t.test(Births,mu=700,alt="g",conf.level=0.99)
One Sample t-test
data: Births
t = 2.314, df = 199, p-value = 0.01084
alternative hypothesis: true mean is greater than 700
99 percent confidence interval:
697.6542 Inf
sample estimates:
mean of x
874.045
Since p-value > 0.01, we accept the null hypothesis H0 : births <= 700 and conclude that the births are significantly more than 700 per year.
> t.test(Personnel,mu=900,alt="l",conf.level=0.9)
One Sample t-test
data: Personnel
t = -0.6627, df = 199, p-value = 0.2541
alternative hypothesis: true mean is less than 900
90 percent confidence interval:
-Inf 936.2006
sample estimates:
mean of x
861.5
Since p-value > 0.1, we accept the null hypothesis H0 : Personnel >= 900 and conclude that the number of personnels employed are significantly fewer than 900 per year.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.