Conditional expectation of uniform distribution

10k Views Asked by At

I'm studying economics and there are two different solutions from different problems. I wonder what is the difference.

(1) Let $\theta$ is uniform distribution. Then
$E(θ|θ ≤ P) =\frac{\int^{P}_{-\infty}θf(θ)dθ}{F(P)}$
(2) Let $\theta$ is uniform distribution [0,1]. Then
$E(θ|θ ≤ P) =\frac{P}{2}$

If we apply (1) formula to (2), the outcome is $\frac{1}{2P}$.
Is there any missing point that I lost?