In: Statistics and Probability
4. Consider the triangular probability distribution with PDF f(x) = 0 if x <= 0 or x >= 4, x/2 if 0 < x <= 1, (4-x)/6 if 1 < x < 4.
(a) Obtain the CDF F
(b) Obtain its inverse F^-1
(c) Describe the inverse CDF simulation method for this given problem.
b) The inverse of cdf is :
c) The inverse CDF sampling method : By knowing the cumulative distribution function (CDF) of a probability distribution, then you can always generate a random sample from that distribution. The inverse CDF method for generating a random sample uses the fact that a continuous CDF, F, is a one-to-one mapping of the domain of the CDF into the interval (0,1). Therefore, if U is a uniform random variable on (0,1), then X = F–1(U) has the distribution F.
To illustrate the inverse CDF sampling method , consider sampling from from above problem
This function can be explicitly inverted by solving for x in the equation F(x) = u. The inverse CDF is
We can find rest of the parts like this only as follow:
then
and as we can know that inverse function does not exist for a costant function so we cannot find inverse of cdf for x<=0 or x>= 4.