# Thread: Help with simulating distributions....

1. ## Help with simulating distributions....

For each of the following c.d.f F, find a formula for X in terms of U, such that if U~Uniform[0,1], then X has c.d.f F.

a)
F(x) =
0 if 0 x<0
x if 0<=x<=1
1 if x>1
b)
F(x) =
0 if 0 x<0
x^2 if 0<=x<=1
1 if x>1
c)
F(x) =
0 if 0 x<0
(x^2)/9 if 0<=x<=3
1 if x>3

How do I solve these?

2. Originally Posted by Sneaky
For each of the following c.d.f F, find a formula for X in terms of U, such that if U~Uniform[0,1], then X has c.d.f F.

a)
F(x) =
0 if 0 x<0
x if 0<=x<=1
1 if x>1
b)
F(x) =
0 if 0 x<0
x^2 if 0<=x<=1
1 if x>1
c)
F(x) =
0 if 0 x<0
(x^2)/9 if 0<=x<=3
1 if x>3

How do I solve these?
You're probably expected to use the probaility integral transform theorem, which states that:

Suppose that X is a continuous random variable with continuous cdf F(x) and suppose that Y is a continuous standard uniform random variable. Then $\displaystyle U = F^{-1}(Y)$ is a random variable with the same pdf as X.

There are many references that give the proof and application of this theorem. There have also been questions in this subforum related to this theorem.

3. are these right?
a)
X=U
b)
X=sqrt(U)
c)
X=3sqrt(U)

also I dont understand this one
F( x)=
0 if x<0
1/3 if 0<=x<7
3/4 if 7<=x<=11
1 if x>= 11