Minimum of Two Exponential
Suppose we want to simulate pseudo random numbers from the following distribution, which I came across in r - Finding a way to simulate random numbers for this distribution - Cross Validated,
F(x)=1−exp(−ax−p+1bxp+1)x≥0
where a,b>0 and p∈(0,1).
Xi'an provided a very elegant solution.
Note that
(1−F(x))=exp{−ax−p+1bxp+1}=1−F1(x)exp{−ax}1−F2(x)exp{−p+1bxp+1}
the distribution F is the distribution of
X=min{X1,X2}X1∼F1,X2∼F2
since
F(x)=P(X≤x)=1−P(X>x)=1−P(X1>x)P(X2>x)=1−(1−F1(X))(1−F2(X)).
Thus, the R code to simulate is simple to be
References
Last updated