2

A commuter encounters four traffic lights each day on her way to work. Let $X$ represent the number of these that are red lights. The probability mass function of $X$ is as follows: \begin{array}{c|ccccc}x&0&1&2&3&4\\\hline\operatorname P(X=x)&0.1&0.3&0.3&0.2&0.1\end{array} What is the probability that in a period of $100$ days, the average number of red lights encountered is more than $2$ per day?

I have calculated mean to be $\mu = .038$ and $\sigma = .04562$ (guessing st. deviation gets divided by $n$ large, which is $100$? Following a previous example I saw)

I'm struggling figuring out how to get $\operatorname P(X>2)$. I tried doing $\operatorname P(X \le 2)$, but once I plug in the math ( $1 - \frac{2-.038}{\sqrt{.04562}}$ using formula $\frac{c-\mu}{\sqrt{\sigma}}$), I get a number that I cannot get a $z$-score out of. I'm assuming some of what I'm doing is right, since I'm trying to follow notes we received in class. Otherwise, I'm having trouble getting the right $z$-score to find the probability.

3 Answers3

3

You must have: $$P(\bar{X}>2)=P(Z>\frac{\bar{X}-\mu_{\bar{X}}}{\sigma_{\bar{X}}})=P(Z>\frac{2-\mu}{\sigma/\sqrt{n}})=P(Z>\frac{2-1.9}{\sqrt{1.29/100}})=\\ P(Z>0.88)=0.1894,$$ where: $$E(X)=\sum XP(X)=1.9;\\ \sigma^2=E(X^2)-(E(X))^2=\sum X^2P(X)-1.9^2=4.9-3.61=1.29.$$

farruhota
  • 31,482
2

The mean is given by $$\mu=\sum_{x\in\cal X}xp_x=0\times0.1+1\times0.3+2\times0.3+3\times0.2+4\times0.1=1.9$$ and the variance by \begin{align}\sigma^2&=\sum_{x\in\cal X}x^2p_x-\mu^2=0^2\times0.1+1^2\times0.3+2^2\times0.3+3^2\times0.2+4^2\times0.1-1.9^2=1.29\end{align} so $$X\approx{\sf{N}}\left(\mu,\frac{\sigma^2}n\right)={\sf N}\left(1.9,0.0129\right)$$ according to CLT.

1

I think you have the wrong mean and variance for the one-trip random variable.

I simulated a million 100-day periods in R and got a nearly normal distribution of averages for 100 trips, with the anticipated mean and variance (based on my mean and variance for one trip). The distribution of averages takes over a hundred uniquely different values about 0.01 apart, so there is hardly any point in doing a continuity correction for your probability computation based on the CLT. With a million iterations it is reasonable to expect about two decimal places of accuracy for the quantities of interest.

Simulation in R:

set.seed(1234)
a = replicate(10^6, mean(sample(0:4,100,rep=T, p=c(1,3,3,2,1))))
mean(a > 2)
[1] 0.177588     # aprx P(A > 2)
mean(a); sd(a)
[1] 1.899882     # aprx E(A) = 1.29
[1] 0.1135554    # aprx SD(A) = 0.1134

Here is a histogram of the simulated averages along with the density of the appropriate normal curve.

enter image description here

Notes: In the sample procedure, the vector p gives proportions, not necessarily probabilities. The logical vector a > 2 has a million TRUEs and FALSEs. Its mean is its proportion of TRUEs.

BruceET
  • 51,500