Conditional expectation question and sum of independent uniforms A driver and a passenger are in a car accident. Each of them
independently has probability p = 0.3 of being hospitalised. When a hospi-
talisation occurs, the hospitalisation cost X is uniformly distributed on [0, 1].
When both persons are hospitalised, the respective hospitalisation costs are
independent. Calculate the expected number N of people in the car who
are hospitalised, given that the total hospitalisation cost C from the accident
is less than 1. (Hint: the sum of two independent
U[0,1]-random variables follows the triangular distribution, symmetric around
1.)
Hi, I'm not sure if i am correct and need help correcting. 
$N\sim Bin(2, 0.3)$.
We are to find E[N|c<1]? 
It can be shown that $f_C(c) = c, $ when $ 0 \leq c\leq 1$ and f$_C(c) = 2 - c, $when $1 \leq c \leq 2.$ (sum of 2 uniform). 
Is $f_{N|C<1}(n|c<1)$ the right distribtuion to find out for finding the above expectation? If so, how do I determine it? Thank you 
 A: Find $\mathsf P(C<1)$ by means of:$$\mathsf P(C<1)=\sum_{k=0}^2\mathsf P(N=k\wedge C<1)$$
Then for $k=1,2$ find $\mathsf P(N=k\mid C<1)$ on base of:$$\mathsf P(N=k\mid C<1)\mathsf P(C<1)=\mathsf P(N=k\wedge C<1)$$
Then find $\mathsf E(N\mid C<1)$ by means of:$$\mathsf E(N\mid C<1)=\sum_{k=1}^2k\mathsf P(N=k\mid C<1)$$
A: Let us formalize rigorously the setting of the question: 

One is given $N$ binomial $(2,p)$, $C=\sum\limits_{k=1}^NX_k$, where $(X_1,X_2)$ is independent of $N$ and each $X_k$ is uniform on $[0,1]$, and $A=\{C<1\}$, and one is asked for $$E(N\mid C<1)=\frac{E(N\mathbf 1_A)}{P(A)}$$ 

To solve this, first note that $$P(A)=P(A,N=0)+P(A,N=1)+P(A,N=2)$$ where $$P(A,N=0)=P(N=0)=(1-p)^2$$ and $$P(A,N=1)=P(X_1<1)P(N=1)=P(N=1)=2p(1-p)$$ and $$P(A,N=2)=P(X_1+X_2<1)P(N=2)=rp^2$$ with $$r=P(X_1+X_2<1)$$ Either by the symmetry around $1$ mentioned in the question, or by a direct computation, $r=\frac12$ hence $$P(A)=(1-p)^2+2p(1-p)+\tfrac12p^2=1-\tfrac12p^2$$ Likewise, $$E(N\mathbf 1_A)=P(A,N=1)+2P(A,N=2)=2p(1-p)+2\cdot\tfrac12p^2=2p-p^2$$ hence, finally,

$$E(N\mid C<1)=2p\,\frac{2-p}{2-p^2}$$

