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');


Need Your Help

jQuery & PHP : How can I reorder a list items by their class?

php jquery list smarty reorderlist

Firstly, sorry for my bad english, I hope I'll explain well my problem...

Select all except some rows laravel

php laravel-4 eloquent

Lets say i have car table and i have 2 columns: model, color.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.