October 8, 2015

4.13: Waiting at an ER, Part I

A hospital administrator hoping to improve wait times decides to estimate the average emergency room waiting time at her hospital. She collects a random sample of 64 patients and determines the time (in minutes) between when they checked in to the ER until they were first seen by a doctor. A 95% confidence interval based on this sample is (128 minutes, 147 minutes), which is based on the normal model for the mean. Determine whether the following statements are true or false, and explain your reasoning.

4.13: Waiting at an ER, Part I

This confidence interval is not valid since we do not know if the population distribution of tthe ER wait times is nearly normal.

  • False. As long as the data isn't too heavily skewed, we have more than 30 observations, and the sample is independent, the point estimates of any distribution will be normally distributed according to the central limit theorem

We are 95% confident that the average waiting time of these 64 emergency room patients is between 128 and 147 minutes?

  • False. We're 100% certain of the mean since we calculated it for this sample of 64 emergency room patients.

4.13: Waiting at an ER, Part I

We are 95% confident that the average waiting time of all patients at this hospital's ER is between 128 and 147 minutes.

  • True. This is what the confidence interval is used for. Using our sample, we're estimating the underlying statistics of the total population.

95% of random samples have a sample mean between 128 and 147 minutes.

  • False. This is a range around a sample mean, and the confidence interval is a measure of whether or not the population mean is within this range. Because this method doesn't show us exactly how far away this is from the population mean, we cannot know how different sample means relate to each other.

4.13: Waiting at an ER, Part I

A 99% confidence interval would be narrower than the 95% confidence interval since we need to be more sure of our estimate.

  • False. The 99% confidence interval is actually wider. Because we need to be more sure of our answer, we make our interval wider to allow more variance.

4.13: Waiting at an ER, Part I

The margin of error is 9.5 and the sample mean is 137.5.

  • We know z is 1.96 for a 95% confidence interval. We don't know what our SE is, but can solve for it using our interval.

  • The center of our interval is the sample mean, so lets calculate that first:

samplemean <- mean(c(128,147))

samplemean
## [1] 137.5

So, our sample mean is indeed 137.5. Lets back into our MOE:

4.13: Waiting at an ER, Part I

The margin of error MOE is defined as:

\[ MOE = Z \times SE \]

We know our confidence interval, so can solve for MOE below:

\[ CI_{lower} = \bar{x} - 1.96 \times SE \] \[ 128 = 137.5 - 1.96 \times SE \]

Solving for MOE, I got \(1.96 \times SE = 9.5\). Both parts of this statement are true.

4.13: Waiting at an ER, Part I

In order to decrease the margin of error of a 95% confidence interval to half of what it is now, we would need to double the sample size

  • False.

\[ MOE = Z \times SE \]

  • This can be restated as:

\[ MOE = Z \times \frac{\sigma_{sample}}{\sqrt{n}} \]

  • If we wanted halve the MOE, doubling the sample size would only decrease it by a factor of \(\sqrt{n}\).

4.25: Waiting at an ER, Part III

The hospital administrator mentioned in 4.13 randomly selected 64 patients and measured the time (in minutes) between when they checked into 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.

4.25: Waiting at an ER, Part III

Are conditions for infrerence met? Note any assumptions you must make to proceed.

  • The only condition we know is met is the sample size. It is indeed greater than 30. We would also have to assume that the sample is randomly chosen and that the underlying distribution of wait times is not too skewed.

4.25: Waiting at an ER, Part III

Using a significance level of \(\alpha = 0.05\), is the change in wait times statistically significant? Use a two-sided test since it seems the supervisor had to inspect the data before she suggested an increase occurred.

  • We'll use z = 1.96 for this once again.

\[ H_o: \mu = 127 \] \[ H_a: \mu \neq 127 \]

4.25: Waiting at an ER, Part III

z <- 1.96

se <- 39/sqrt(64)

interval <- c(137.5-z*se, 137.5+z*se)

interval
## [1] 127.945 147.055

Looks like we have just enough evidence to reject the null hypothesis. The mean is between 127.95 and 147.055 with 95% certainty. Assuming the last mean was closer to 127.0, evidence would suggest mean wait times have increased.

4.25: Waiting at an ER, Part III

Would the conclusion of the hypothesis test change if the significance level was changed to \(\alpha = 0.01\)?

  • Probably, but lets check. First, lets calculate our z-score.

  • This is a two-tailed test, so we want 1% underneath both tails, and .05% underneath either tail. Lets use this information to calculate our z-score, then our intervals using the same method above.

4.25: Waiting at an ER, Part III

z <- qnorm(1-0.005)

se <- 39/sqrt(64)

interval <- c(137.5-z*se, 137.5+z*se)

interval
## [1] 124.9428 150.0572

We are 99% confident that the mean falls between 124.94 and 150.06. With this chosen confidence interval, we can now say that it's possible that the difference was due to chance.