# Fit Poisson distribution to normal distribution

I have a set of data. I plotted the histogram of these data in order to know their distribution, which gives me a Poisson distribution. I want to fit my data as Gaussian. Is it possible to fit the Poisson distribution to a Gaussian distribution under Matlab?

## Answers

Use normfit to obtain the mean and standard deviation of a Gassian distribution fitted to your data, and then normpdf to generate the pdf.

Here's an example with invented data. The data in this case has a triangular-shaped distribution (not a Poisson ditribution), but the idea is the same: a Gaussian function is fitted to it.

See above link for normfit options.

%// Random data data = sum(rand(2,1e4)); %// sum of two uniform RV's gives a triangular pdf %// Plot normalized histogram (empirical pdf) of data edges = 0:.1:2; [yh xh] = hist(data, edges); bar(xh, yh/numel(data)/(edges(2)-edges(1))) %// Compute and plot Gaussian fit [mu, sigma] = normfit(data); hold on xf = -1:.01:3; plot(xf, normpdf(xf, mu, sigma), 'r');