# Mean and variance and special distribution of events

A hospital Accident and Emergency (A&E) department receives an average of 6 ambulances an hour. It can process patients in 30 minutes, but if it receives more than five patients in 30 minutes, a state of emergency will be declared, and the A&E department will shut. Each ambulance will arrive with either 1, 2, or 3 patients, with relative probabilities of 0.7, 0.2 and 0.1 respectively.

i. Calculate the dispersion index of the arrival of the patients and comment on the nature of their arrival.

ii. Calculate the mean and variance of the number of patients arriving over one hour.

This is my attempt so far but I’m not sure now if I’ve done it right.

Your answer for (i) seem OK. Here is some help getting started with (ii). [You don't ask about the probability of declaring an emergency because of having too many arrivals in half an hour.]

The number of ambulance arrivals in an hour is $$A \sim \mathsf{Pois}(\lambda = 6).$$ Then you have a problem involving a random number of random variables to find the distribution of the number $$X$$ of patients per hour. The mean and variance of the number of patients in an ambulance should help with that. Notice that $$Var(X)$$ has two components.

Simulation of number $$X$$ of patients arriving per hour, with $$E(X) = 8.4:$$

set.seed(2020)
x = replicate(10^6,
sum( sample(1:3, rpois(1,6), rep=T, prob=c(.7,.2,.1))) )
mean(x); var(x)
[1] 8.400893  # aprx E(X) = 8.4
[1] 14.39057  # aprx Var(X)

cutp = -1:max(x) + .5
hdr="Simulated Hourly Patient Arrivals"
hist(x, prob=T, br=cutp, col="skyblue2", main=hdr)


• Brilliant I got the mean in the end to be 8.4 I did it doing 1.4*6 but I got my variance to be 2.64 by doing 0.44*6. Is that not the way to do it? – Lauren Hosking Apr 18 '20 at 12:34
• Try variance formula again. Be careful not to mix up A's, N's and X's when using formula in link. I got exact variance computation to be 14.4 which matches my simulated value within sim error.// Something about the variance formula seems to beg for getting wrong answ the first time. – BruceET Apr 18 '20 at 17:03
• fabulous thank you I’ve got it! – Lauren Hosking Apr 18 '20 at 17:50