How to generate right censored data


Super Moderator
Hi all,

I want to generate some data from a given distribution, let say exponential

distribution. But I do not now how.

Any help would be appreciated


What you need is a random number generator. Most software packages (or Excel) have an algorithm that will produce regular uniform or standard normal psuedo-random deviates.

For example, if you want to generate a standard exponential distribution (X) where the mean and standard deviation are both equal 1, then you would transform as follows:

X = -Ln(1-U)

where U is uniformally distributed i.e. U~[0,1].