Probabilities - Traffic Lights A person passes through three intersections monitored by traffic lights. The location and operation of these traffic lights is such that, to all intents and purposes, they appear to operate independently to a person travelling from one to another. The probability of a red light is $0.4$, $0.8$, and $0.5$ respectively for each of the traffic lights.
(a) Find the probability function of $X$, the number of red lights the person encounters in a single trip.
(b) Compute the mean of $X$.
(c) Assume that the waiting time for each red light is two minutes. What is the mean waiting time in one trip? 

What I got so far:
$P(R1)=0.4$
$P(R2)=0.8$
$P(R3)=0.5$
$P(X=3)=0.4*0.8*0.5=0.16$
$P(X=0)=1-P(X=3)=1-0.16=0.84$
 A: Part (a):

For convenience of notation, let $u = 0.4,\;\;v = 0.8,\;\;w=0.5$.

\begin{align*}
P(X=0)=\;&(1-u)(1-v)(1-w) = .06\\[4pt]
P(X=1)=\;&u(1-v)(1-w)+(1-u)v(1-w)+(1-u)(1-v)w= .34\\[4pt]
P(X=2)=\;&(1-u)vw+u(1-v)w+uv(1-w)= .44\\[4pt]
P(X=3)=\;&uvw=.16\\[4pt]
\end{align*}
Part (b):

The mean of $X$ is 
$$0 \cdot P(X=0) + 1\cdot P(X=1)+2\cdot P(X=2)+3\cdot P(X=3) = 1.7\;\text{minutes}$$
Part (c):

Assume each red light last for $2$ minutes . Then on average, if a given light is red, the waiting time for that light is $1$ minute (half of $2$). 

Hence, the mean waiting time will be
$$u\cdot 1+v\cdot 1 + w\cdot 1 = 1.7\;\text{minutes}$$
A: As we've got only 3 lights with probabilities of red light $p_1, p_2$ and $p_3$, the solution seems to be easy
$$P(X=0)=\prod\limits_{i=1}^3 (1-p_i)\\
P(X=1)=\sum\limits_{i=1}^3p_i\prod\limits_{k\neq i} (1-p_k)\\
P(X=2)=\sum\limits_{i=1}^3(1-p_i)\prod\limits_{k\neq i} p_k\\
P(X=3)=\prod\limits_{i=1}^3 p_i$$
Notice, that it is not true, that $P(X=0)=1-P(X=3)$
As You've got these probabilities, you can easily compute the mean value of $X$
Computing the mean waiting time could be calculated using yhis formula:
$$T=\sum\limits_{i=1}^3 (t_ip_i  + 0(1-p_i))$$
where $t_{i}$ is waiting time on $i$'th light.
