The hospital administrator randomly selected 64 patients and measured the time (in minutes) between when they checked in to the ER and the time they were first seen by a doctor. The average time is 137.5 minutes and the standard deviation is 39 minutes. She is getting grief from her supervisor on the basis that the wait times in the ER has increased greatly from last year’s average of 127 minutes. However, she claims that the increase is probably just due to chance.

A) Are conditions for inference met?

  1. We are told that 64 patients is a simple random sample. We can assume is was from less than 10% of the total number of patients for the year, so the observations are independent.

  2. The sample size is greater than 30 which would give us a decent sampling distribution.

  3. Without seeing the data or a plot of it, there is no way to tell if there is any skew or outliers that would affect the distribution. With a sampling size of 64, this gives us a decent sampling distribution but if there is a skew it might affect the results more than if the sampling size was over 100. For this exercise I’m assuming there is a normal distribution

B) Is the change in wait times significant? Use a two-side test.

\(H_o\) = 127 (no change in wait times occured)

\(H_a\) \(\neq\) 127 (wait times change greatly)

Significance level is \(\alpha = 0.05\). This means that we want 95% confidence that the null hypothesis is true. If the Alternate hypothesis falls within the 5%, \(H_a\) must be true.

normalPlot(mean = 137.5, sd = 39, bounds = c(61.06, 213.94), tails = TRUE)

Sample mean = 137.5

Last year’s mean = 127

Standard Deviation (SD) = 39

Standard Error (SE) = \(\frac{SD}{\sqrt{Sample size}}\)

se <- 39/sqrt(64)
se
## [1] 4.875

Z Score = \(\frac{(Sample Mean - Null Value)}{SE}\)

z <- (137.5-127)/se
z
## [1] 2.153846

Find the p-value. We can use the pnorm function to find it. We want to find the probability of sample means GREATER THAN 137.5, so we use 1-pnorm to find the upper tail. Since we are doing a two-sided test, we need to find both tails so we multiply the result of pnorm by 2.

#Two sided test multiple by 2
p <- 2 * (1-pnorm(137.5, 127, se))
p
## [1] 0.03125224

Since the p-value is less than \(\alpha = 0.05\), we can accept the alternate hypothesis and say that an average wait time of 137.5 minutes is very possible from this sample.

C) \(\alpha = 0.01\)

normalPlot(mean = 137.5, sd = 39, bounds = c(36.88, 238.12), tails = TRUE)

Since the p-value is greater than \(\alpha = 0.01\), this tells us that from the sample we have a 3% (p-value) chance of seeing an average wait time of 137.5 minutes. Since this is unlikely, we can say this wait time was by chance.