# Can I do this transformation?

1. May 31, 2012

### EngWiPy

Hello,

Suppose that X1,...,XN are i.i.d. exponentially distributed random variables. Now assume that:

$$\mathcal{X}=\sum_n\frac{1}{1+a\,X_n}$$

I need to find the CDF of X. I did the following:

1- Find the the CDF of Xi.
2- Find the CDF of 1+a X_i.
3- Find the CDF and PDF of 1/(1+a Xi).
4- The MGF of X is the product of the MGFs of the individual MGFs.
5- Take the inverse laplace transform of the total MGF divided by the Laplace variable s.

Are these steps valid?

Thanks

2. May 31, 2012

### chiro

Hey S_David.

I'm assuming you found the characteristic function for the last step:

http://en.wikipedia.org/wiki/Characteristic_function_(probability_theory)

I don't think you can from MGF to distribution, but you can definitely go from characteristic function to distribution function as those two are bijective and this is based on the fourier transform not the laplace transform. For continuous variables, this has to be used to go from characteristic function (which is a kind of analogue of MGF) to final distribution given sums of distributions of continuous functions that are independent (not necessarily identically distributed though).

So my advice would be to use the characteristic function (CF) to get the CF for each distribution in the sum, then multiply these to get the CF for the sum of n variables, take the inversion formula to calculate the CDF and use that to get the PDF.

Because they are continuously distributed, this is what you will need to do. For discrete distributions you use what are called Probability Generating Functions, but for continuous again, use the characteristic function.

3. May 31, 2012

### EngWiPy

Ok, thanks. What I am concerned about is the steps, because I read in a paper that the argument in the sum is "intractable", and I was wondering why?

The MGF is defined as:

$$\mathcal{M}_X(s)=\mathbf{E}[e^{-sX}]=\int_0^{\infty}e^{-sX}f_X(x)\,dx$$

which shows a relationship between the PDF and the MGF from which we can infer the relationship between MGF and CDF. It has been done in communication literature many times.

Thanks again

4. May 31, 2012

### chiro

I see how that will work for this particular case (since the exponential is only defined over the positive real part), and since this is the definition of a Laplace transform, the inversion will correspond to getting the pdf. In general though, if the domain is not like this then you will need to use the characteristic function.

In terms of the intractable nature, this will depend on what the output is: If it ends up being too complicated then you might want to resort to something like a simulation based approach (like Monte-Carlo). If you simulate enough, you can get a distribution with enough accuracy so that you will have a numerical description by dividing your output distribution into bins that are 'small enough' that correspond with your desired accuracy.

The evaluation of probabilities will then be based on numerical integration that corresponds with your chosen bin size. The simulation might take say a day to run, but the results would be as accurate as you want to make them.

Because of the nature of your work, I think that you are best to do it analytically and see what you get because at least that way you a) have a reference for what should be the PDF and b) if you decide to use simulation to get your final distribution, then you can check this simulation and the generated PDF vs the analytic solution and if both agree then that will give you some confidence that things are OK (not a gaurantee but a good way to check).

5. May 31, 2012

### EngWiPy

Of course if analytical solution can be found it is better, but in my case this is almost impossible. So, I just need to see the output curve, without focusing too much on the CDF itself.

I am doing the inverse Laplace transform numerically. Again, this is not my problem for now at least, I just wanted to know if my steps are correct or not, because when I plotted the output I got some results greater than one, which does not make sense, because it is a probability. So, I am trying to locate my logical error.

Thanks

6. May 31, 2012

### chiro

I would check each step that you have listed numerically just to be sure that each step is a valid probability distribution, instead of just checking the last step.

From there you can narrow down this problem specifically and see what is going wrong.

Also I recommend you simulate random variables to make sure that the analytic solution provides a good match for a good simulated version that you get. You could use something like R for this and it wouldn't take much in terms of the coding.

Simulation is always good for this kind of error checking and I recommend you use it, especially in a serious application like engineering even if it is to double check your work (this is what often happens anyway).

7. Jun 1, 2012

### EngWiPy

OK, I think I found my mistake. The argument of the exponential distribution is greater than or equal zero, and I did not take this into account when I tried to get the results. I understand now why it is said that the above formula is intractable for all arguments.