# Generating a uniform function from an exponential function

##### New Member
If I have some values x. From these I estimate the PDF of an exponential function f(x)= . Let's say the estimated lambda equals 50. The CDF is . How do I generate a standard uniform distribution from this?

#### Attachments

• 2.2 KB Views: 0

#### GretaGarbo

##### Human
By using the CDF distribution function!

All distribution functions F( ) varies between 0 and 1. So U = F(X) will give you U, an uniformly distributed random variable.

Just plug in the x values you have in the CDF and it will give you uniformly values.

On the other hand, if you have uniformly distributed values, use the inverse of the distribution function to give exponetially distributed values.

##### New Member
I'm sorry I don't understand. I know you are right but I don't get why we get a uniform.
If I put x's were the x is in the CDF, shouldn't I get a CDF?

(I'm sorry if I am not very clear, I'm very confused and I really appreciate your help!)

#### GretaGarbo

##### Human
If I put x's were the x is in the CDF, shouldn't I get a CDF?
You will get the U, which has a uniform distribution.

##### New Member
Thank you GretaGarbo and Dason. Now I can describe what the transform does with words and graphs. However, I am still confused when it comes to the formulas, especially the x's.
The formula for the CDF is and putting X into this gives .
So, if I have a dataset (x1, x2,...,x50) and I put them into the x in the first formula I get a CDF and if I put them in the X in the second formula I get a uniform. This is how I interpret the formulas and it cannot be correct. What am I missing?

#### Attachments

• 1.3 KB Views: 0
• 1.3 KB Views: 0

#### GretaGarbo

##### Human
Just plug in the 50 values in the CDF and it will give you values that are uniformly distributed. And follow the link Dason gave.

if you have a computer it is easy.