I am trying to understand how we integrate an exp(of a value) and not the exponential function but the expected value function. My problem is understanding how to exactly setup the integral since I believe the exp should be reflected as E[some value]. Here are the two functions:
I need to find the median of both (set each to 1/2).
The densities are written like this
$f(x) = \frac{1}{2}E[\frac{−x}{2}] $ for x > 0
Answer here is 1.4
Median of density $f(x) = 2xE[−x^2]$ for x>0 Answer here is .83
The median of a random variable with probability density function $f(x)$ is a number $m$ such that $$\mathbb P(X \le m) = \int_{-\infty}^m f(x)\; dx = \frac{1}{2}$$
$\exp$ is the exponential function. The expected value is something completely different: $\mathbb E(X) = \int_{-\infty}^\infty x f(x)\; dx$.
In your first case,
$$ \int_{-\infty}^m f(x)\; dx = \int_0^m \frac12 \exp(-x/2)\; dx = 1 - \exp(-m/2)$$ and this is $1/2$ when $\exp(-m/2) = 1/2$, i.e. $m = 2 \ln(2) \approx 1.386294361$.