For the given random variable X with continuous probability density function (pdf) fx(x), find the mean, variance, median, and the mode of X. Give an algorithm to generate the random variable X.
Let the random variable X have the two-sided exponential (Laplace) distribution with pdf Ix(x) = exp(-|x|), for h > 0, and corresponding cumulative distribution function (cdf) given by Fx(x) = (1/2) * (1 + sign(x) * (1 - exp(-|x|))), for x > 0.
Let X be a random variable with pdf given by f(x) = 6x^2(1 - x), 0 < x < 1, and f(x) = 0 otherwise.
Note: If X1 ~ Gamma(d,1) and X2 ~ Gamma(B,1) are independent random variables, then the ratio X = (X1 / X2) has a beta distribution with parameters d and B.