3

I have a continuous random variable given by its density distribution function or by cumulative probability distribution function.

The distribution functions are not analytical. They are given numerically (for example as a list of (x,y) values).

One of the things that I would like to do with these distributions is to find a convolution of two of them (to have a distribution of a sum of two random properties).

I do not want to write my own function for that if there is already something standard and tested. Does anybody know if it is the case?

Roman
  • 124,451
  • 167
  • 349
  • 456
  • This post may help you. http://stackoverflow.com/questions/10640759/how-to-get-the-cumulative-distribution-function-with-numpy – PhillipD Oct 04 '13 at 15:28

1 Answers1

4

How about numpy.convolve? It takes two arrays, rather than two functions, which seems ideal for your use. I'll also mention the ECDF function in the statsmodels package in case you really want to turn your observations into (step) functions.

John Zwinck
  • 239,568
  • 38
  • 324
  • 436