Here is the following question:
"I buy a drill and wonder about its lifespan (which is a real positive number). With a probability of 0.25 the drill has a hidden manufacturing defect and its service life is evenly distributed between 1 and 7 years. If it is not defective (probability 0.75), its lifespan is a random variable uniformly distributed between 9 and 15 years."
My problem is that I would like to calculate the variance of the lifespan. My problem is I am unsure of the formula to use (I didn't really understand it on wikipedia)
I use a variable T for the lifespan and D=0 being a defective tool and D =1 being a nondefective tool. For the conditional variances I obtain the following: $Var(T|D = 0)$ and $Var(T|D = 1) = 3$ and for the variance of the conditional expected value $\mathbb{E}[T|D]$ I obtain 12.
In the solution of the exercise, it is given 15 as the total variance. From what I've understood the total variance should be 18 and not 15.
Considering the two uniform random variables representing the two random lifespans:
1)
$$A\sim U[1;7]$$
2)
$$B\sim U[9;15]$$
The total lifespan's density is a mixture (a linear combination) of the two uniform densities:
$$f_T(t)=0.25\cdot f_A(t)+0.75\cdot f_B(t)$$
Thus
$$\mathbb{E}[T]=0.25\cdot 4+0.75\cdot12=10$$
$$\mathbb{E}[T^2]=0.25\cdot (3+4^2)+0.75\cdot(3+12^2)=115$$
Concluding:
$$\mathbb{V}[T]=115-10^2=15$$
...your textbook is right!