Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Statistics 2120: Introduction to Statistical Analysis

Homework 7

Instructions:

 Be sure to provide your full name and computing ID at the top of your work.

 Write out the Honor Pledge under your name and computing ID: “On my honor, I did not give nor receive aid on this assignment beyond the listed collaboration.”

 List the names of students with whom you collaborated under the Honor Pledge.  If you did not collaborate, write‘None’.

 Respond to each problem below thoroughly, showing all relevant work.

 Use Python for all calculations. Include a screen shot showing relevant code and output for each part using Python.

 Save your completed work as a PDF and upload it to Gradescope. Be sure to select the appropriate page(s) for each answer. Unselected work will not be graded.

Background:

Hospitals area wonderful resource for people to receive treatment for a wide variety of medical conditions, but are in some ways they serve as a hub for many di↵erent illnesses to spread. Overwhelmingly, hospital sta↵ and systems limit or eliminate the spread of illness from one patient to another, but occasionally, a patient may be admitted to the hospital for one medical condition, but they contract an additional condition (especially some sort of infection) from another patient. This type of secondary infection is called a nosocomial infection.

In order to investigate whether nosocomial infections lengthen the average stay of a patient (a logical result of su↵ering an additional infection, a hospital recorded data for many patients and paired each patient who su↵ered a nosocomial infection with another patient with similar medical history and a similar reason for entering the hospital who did not experience such an infection.

The file nosocomial.csv  contains these data. The values measure the length of hospitalization for each patient in the pair (in the columns“Infected”and “NotInfected”). Each row corresponds to a patient pair which were identified as having a similar medical history and similar reasons for entering the hospital. You may assume that the conditions needed for reliable inference to be reliable are satisfied. You may assume that the population standard deviation of the di↵erence in hospital stay times is 13.5 days.

Problems:

1. What experimental design was used for this study? Explain.

2. Are the two variables measured by this pilot study independent? Explain.

3. Create a new variable called DIFF that measures the number of additional days that the patient who su↵ered a nosocomial infection stayed in the hospital. Is each DIFF value independent of the other DIFF values? Explain.

4. What is the estimated increase in a patient’s length of stay at the hospital if they contract a nosocomial infection? (rounded to 4 decimal places)?

5. What is the 90% confidence interval for the true mean increase in hospital stay for those who experience a nosocomial infection?

6. What is the margin of error of the interval found in part 5?

7. For a study like this to merit consideration about the spread of infection within a hospital, the required precision of estimates must be 90/10. In other words, the margin of error of a 90% confidence interval can be no more than 10% of the value of the sample statistic. Will the data from the pilot study enable administrators to consider the estimate and interval given?

8. What is the minimum sample size required to meet the 90/10 precision requirement?

9. The director of the project wants to test if the length of hospital stays is significantly longer for those who su↵er a nosocomial infection.

A. What are the appropriate hypotheses for this test?

Note: Consider the intended test in context of the DIFF variable.

B. Based only on the previous parts, which of the following options is true for the value of the p-value for this test?

a. The p-value is less than 0.05.

b. The p-value is less than 0.10.

c. The p-value is greater than 0.05.

d. The p-value is greater than 0.10.

C. Based only on the previous parts, is there evidence to reject the null hypothesis at the 10% level of significance? Explain.

D. Based only on the previous parts, state the appropriate conclusion of the test in context. E. Interpret the level of significance, ↵ = 0.1, in context.

HW7

Jessica “Jianan” Xiong

On my honor, I did not give nor receive aid on this assignment beyond the listed collaboration.

1. Matched paired design was applied in this study. Patients are matched in pairs. And these patients also have similar medical history and similar reasons for entering the hospital with one of them is nosocomially infected and the other is not nosocomially infected. Each pair of patients in this study are also compared with other patients in other pairs, who are independent to each other.

2. No, two variables are not independent. It is possible that some pairs of the patients may have more serious disease than others as the study is designed in a way that the matched pair of patients are identified as having a similar medical history and similar reasons for entering the hospital. Therefore the length of hospitalization might be longer for one pair compared with other pairs, which means the other patient in that pair will need to stay longer than other patients who do not have serious diseases.

3.

 

Yes, each DIFF value is independent because the DIFF value in each pair will not affect the DIFF values in other groups. Each pair has different values and is independent of each other.

4. The estimated increase in a patient’s length of stay at the hospital if they contract a nosocomial infection is 11.3846 days.

 

5. The  90%  confidence  interval  for  the  true  mean  increase  in  hospital  stay  for  those  who experience a nosocomial infection is (8.3053, 14.464)

 

 

6. The margin of error of the interval is 3.0794.

 

 

7. No, because our value of margin of error 3.0794 is larger than the sample statistic 1.13846 which is 10% of the value of the sample statistic.

8. The minimum sample size required to meet the 90/10 precision requirement is 381 .

 

 

9.

a)

The null hypothesis is the length of hospital stays is the same for patients who suffer a nosocomial infection. “0: μ = 0

The alternative hypothesis is the length of hospital stays is significantly longer for patients who suffer a nosocomial infection. “0: μ > 0

b)

The answer for this question is A. A is true for the value of the p-value for this test because the confidence interval is 90%. The significance level should be 1-90% which is 10% (0.1). If the p- value is less than 0.05, there is enough evidence to reject the null hypothesis and support the alternative  hypothesis.  Therefore,  we  can  conclude  that  the  length  of  hospital  stays  is significantly longer for patients who suffer a nosocomial infection.

c)

Yes, there evidence to reject the null hypothesis at the 10% level of significance. Because the 90% confidence interval for the true mean increase in hospital stay for patients who experience a nosocomial infection is (8.3053, 14.464) . And since 0 is not contained in this interval, the null hypothesis can be rejected at the 10% level of significance.

d)

We have sufficient evidence to suggest that he length of hospital stays is significantly longer for patients who suffer nosocomial infection.

e)

The significance level α is the probability that if “0 is true, “0 would be rejected. This indicated that there is 10% of the probability that the length of hospital stays is the same for those who suffer a nosocomial infection. If this claim is true, it would be rejected.