In: Math
Suppose we wish to generate a sample from the exponential ($\beta$) distribution, and only have access to a computer which generates numbers from the skew logistic distribution. It turns out that if $X$~SkewLogistic ($\beta$), then log(1+exp($-X$)) is exponential ($\beta$). Show that this is true and check by simulation that this transformation is correct.
Solution:
The PDF of Skew logistic distribution is,
If Suppose that X is a continuous random variable and is a strictly monotonic differentiable function. Let . Then the PDF of Y is given by
GIven,
So,
Now,
So,
which is PDF of an exponential distribution.
Therefore, Y ~ exp()
I have used R language for simulation.
Run the following function to generate samples of Skew logistic PDF.
sl = function(alpha,size) {
x = runif(size,0,1)
y = (alpha*exp(-x)/(1+exp(-x))^(alpha+1))
return(y)
}
Run the below commands to generate 10000 samples of skew logistic random variables and do the transformation and plot the graph.
x = sl(5,10000)
y = log(1+exp(-x))
plot(y,exp(-5*y))
The graph is shown below.
The graph shows that the random variables y follow an exponential distribution.