Finding the convolution of two histograms?

In order to still move on (towards more murky details), I further adapted your code like this.

In order to still move on (towards more murky details), I further adapted your code like this: from numpy. Random import uniform from numpy import convolve, cumsum, histogram, linspace s, e, n= -0.5, 0.5, 1e3 x, y, bins= uniform(s, e, n), uniform(s, e, n), linspace(s, e, n** .75) pdf_x= histogram(x, normed= True, bins= bins)0 pdf_y= histogram(y, normed= True, bins= bins)0 c= convolve(pdf_x, pdf_y); c= c/ c.sum() bins= linspace(2* s, 2* e, len(c)) # a simulation xpy= uniform(s, e, 10* n)+ uniform(s, e, 10* n) c2= histogram(xpy, normed= True, bins= bins)0; c2= c2/ c2.sum() from pylab import grid, plot, show, subplot subplot(211), plot(bins, c) plot(linspace(xpy.min(), xpy.max(), len(c2)), c2, 'r'), grid(True) subplot(212), plot(bins, cumsum(c)), grid(True), show() Thus, giving plots something like this: Where the upper part represents the PDF (blue line), which indeed looks quite triangular and the simulation (red dots), which reflects the triangular shape. Lower part represents the CDF, which also looks to follow nicely the expected S-curve.

Thanks for the answer. Going according to the Wikipedia article on convolution, I would expect the new x range to run from -1 to 1. That's the part I'm struggling with.

– lafrasu Jun 29 at 20:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions