Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. The Hospital stay EXCEL data is from a larger dataset collected on people dis

ID: 3020613 • Letter: 1

Question

1.      The Hospital stay EXCEL data is from a larger dataset collected on people discharged from a selected Pennsylvania hospital as part of a retrospective chart review of antibiotic usage in hospitals. First sheet of the EXCEL is the data, second sheet is the variable explanation.

DATA......

VARIABLE EXPLANATION....

(a) perform Chisq-test to examine the relationship between gender and the service performed.

(b) To test if the duration of hospital stay is affected by whether a patient has receive antibiotics.

(c) Recode age to two group: 30 and >30, then setup an inferential test to test if patients with age>30 are more likely to receive antibiotics

Id Dur_stay Age Sex Temp WBC Antibio Bact_cul Service 1 5 30 2 99 8 2 2 1 2 10 73 2 98 5 2 1 1 3 6 40 2 99 12 2 2 2 4 11 47 2 98.2 4 2 2 2 5 5 25 2 98.5 11 2 2 2 6 14 82 1 96.8 6 1 2 2 7 30 60 1 99.5 8 1 1 1 8 11 56 2 98.6 7 2 2 1 9 17 43 2 98 7 2 2 1 10 3 50 1 98 12 2 1 2 11 9 59 2 97.6 7 2 1 1 12 3 4 1 97.8 3 2 2 2 13 8 22 2 99.5 11 1 2 2 14 8 33 2 98.4 14 1 1 2 15 5 20 2 98.4 11 2 1 2 16 5 32 1 99 9 2 2 2 17 7 36 1 99.2 6 1 2 2 18 4 69 1 98 6 2 2 2 19 3 47 1 97 5 1 2 1 20 7 22 1 98.2 6 2 2 2 21 9 11 1 98.2 10 2 2 2 22 11 19 1 98.6 14 1 2 2 23 11 67 2 97.6 4 2 2 1 24 9 43 2 98.6 5 2 2 2 25 4 41 2 98 5 2 2 1

Explanation / Answer

b)Here Ho:Duration of Stay and Antibiotic are independent against H1;Duration of Stay and Antibiotic are dependent

Now with the help of the following R code we get

ared = 15.4927, df = 11, p-value = 0.161

Hence p value >0.05 So at 5% level of significance we accept Ho that

a)Here Ho: Gender and Service Performed are independent against H1;Gender and service performed are dependent

Now with the help of the following R code we get

X-squared = 14.1775, df = 11, p-value = 0.2233

Hence p value >0.05 So at 5% level of significance we say Duration of Stay and Antibiotic are independent .