Is there a method in python to calculate the mean and confidence interval of an array of data points with an arbitrary probability distribution function?
I need to calculate the mean and confidence interval for the convolution of a discrete Gaussian and Poisson distribution and I only know that any new distribution function can be defined with rv_discrete
. So what I would like to have is something like this:
def gaussian(x,mu,sigma):
return ...
def poisson(x,mu,sigma):
return ...
class noise_pdf(rv_discrete):
def _pdf(self,x):
return fftconvolve(gaussian(x,...), poisson(x,...), mode='same')
And now I would like to know the confidence interval for an array x to this new probability distribution function.
Thanks for your help in advance!