A random variable X has probability density function: f(x) = 2e^(2x)/e^2−1 for 0
You want to generate five observations of X by using the inverse transform method and then calculate the mean and standard deviation of this sample. You are given that the five random variables U with Uniform (0, 1) are generated to be 0.134, 0.365, 0.974, 0.485, and 0.729, respectively. Calculate the sample mean and sample standard deviation.
My method. I found F(x)=(e^(2x)-1)/(e^(2)-1). Can someone verify this?
I let u = F(x) so u = (e^(2x)-1)/(e^(2)-1)
Then i found x = [ln ((e^(2)-1).u + 1)]/2
Is this correct so far?
I went on to find values of x for all those numbers above and summed it given the f(x) in the function and my mean is 5.482222... But I can't calculate the sd because it gives me a neggative variance. can someone kindly verify these calculations? Most appreciated, thanks.
If your formula says $\frac{1}{2}\ln((e^2-1)u+1)$, then it is right.
For example, at $u=0.134$ you should get roughly $0.309247785$. At $u=0.729$, you should get roughly $0.866501822$.
Add up our $5$ numbers, including the two just calculated, and divide by $5$ to get the (fake sample) mean. I get something like $0.694$. The random variable we are simulating only takes on values between $0$ and $1$, so the $5.482\dots$ of the post is quite impossible.