[Math] Expected number of people who are hospitalized, given the total loss due to hospitalization

actuarial-scienceexpectationprobability

NOTE: I'm currently a high school senior planning to take the Actuary P-Exam next year. I've posted one question from a past P-Exam down below that I had trouble with. If anyone has any additional resources or books that help prepare for this exam, that would be greatly appreciated.

The question is as follows:

A driver and a passenger are in a car accident. Each of them independently has probability $0.3$ of being hospitalized. When a hospitalization occurs, the loss is uniformly distributed on $[0,1]$. When two hospitalizations occur, the losses are independent.

Calculate the expected number of people in the car who are hospitalized, given that the total loss due to hospitalizations from the accident is less than $1$.

(A) $0.510$

(B) $0.534$

(C) $0.600$

(D) $0.628$

(E) $0.800$

The answer is (B).

When attempting this question, I first calculated the probability of $0$ hospitalizations occurring, $1$ hospitalization occurring, and $2$ hospitalizations occurring.

$$P(0) = (0.7)^2$$
$$P(1) = 2(0.3)(0.7)$$
$$P(2) = (0.3)^2$$

Then I tried to calculate the expected value:

$$E(X) = 0*P(0) + 1*P(1) + 2*P(2) = 2(0.3)(0.7) + 2(0.3)^2$$

However, this led me nowhere to the answer.

Could someone point me in the right direction in getting a solution to this problem? Any help is appreciated. Thanks.

Best Answer

Let $N$ be the random number of hospitalizations, so $N \in \{0, 1, 2\} \sim \operatorname{Binomial}(n = 2, p = 0.3)$. Let $L$ be the total loss of all hospitalizations. We are asked to find $$\operatorname{E}[N \mid L \le 1] = \sum_{k=0}^2 k \Pr[N = k \mid L \le 1],$$ by the definition of expectation. Now we must compute the conditional probabilities. $$\Pr[N = k \mid L \le 1] = \frac{\Pr[L \le 1 \mid N = k]\Pr[N = k]}{\Pr[L \le 1]},$$ by Bayes' theorem. We know that $$\Pr[N = k] = \binom{2}{k} (0.3)^k (0.7)^{2-k},$$ and: $$\begin{align*} \Pr[L \le 1 \mid N = 0] &= 1, \\ \Pr[L \le 1 \mid N = 1] &= 1, \\ \Pr[L \le 1 \mid N = 2] &= \int_{x=0}^1 \int_{y=0}^{1-x} \, dy \, dx = \frac{1}{2}. \end{align*}$$ Therefore, $$\Pr[L \le 1] = 1(0.7)^2 + 1(2)(0.3)(0.7) + \frac{1}{2}(0.3)^2 = \frac{191}{200},$$ and the rest of the calculation is straightforward: $$\operatorname{E}[N \mid L \le 1] = \frac{\Pr[L \le 1 \mid N = 1]\Pr[N = 1] + 2 \Pr[L \le 1 \mid N = 2]\Pr[N = 2]}{\Pr[L \le 1]}.$$


Mathematica code to compute the empirical expectation for $10^6$ simulations:

Mean[Last /@ Select[{Total[RandomVariate[UniformDistribution[{0, 1}], #]], #} & /@ RandomVariate[BinomialDistribution[2, 0.3], 10^6], First[#] <= 1 &]]
Related Question