I am studying for an exam coming tomorrow and there's one exercise i couldn't really solve:
In a region there are two types of rains: short and long ones. 70% of them are short. The time T (in hours) of the duration of a rain follows an exponential distribution with mean 1 when the rain is short, and mean 4 when the rain is long. The variance of T (in hours^2) is: (Answer is 7.39)
Don't really know where to start so any hints are truly appreciated.
I know that the variance is defined as $V(x)= E(x^2)-(E(x))^2$ where in a single exponential distribution $V(x) = 2/\lambda^2 - 1/\lambda^2 = 1/\lambda^2$
Ok i think i solved the exercise, sorry for any notation problems in my solution:
$ E(T)=P(X_{short\ rain})*E(T|X_{short\ rain}) + P(X_{long\ rain})*E(T|X_{long\ rain})$
$E(T)=0.7*\frac{1}{\lambda_{short\ rain}}+0.3*\frac{1}{\lambda_{long\ rain}}=0.7*\frac{1}{\frac{1}{1}}+0.3*\frac{1}{\frac{1}{4}}=1.19$
$E(T^2)=P(X_{short\ rain})*E(T^2|X_{short\ rain}) + P(X_{long\ rain})*E(T^2|X_{long\ rain})$
$E(T^2)=0.7*\frac{2}{\lambda_{short\ rain}^2}+0.3*\frac{2}{\lambda_{long\ rain}^2}=0.7*\frac{2}{(\frac{1}{1})^2}+0.3*\frac{1}{(\frac{1}{4})^2}=11$
$Var(T) = E(T^2) - E(T)^2 = 11 -1.19^2 = 7.39$