I'm trying to fit a Poisson Distribution to data produced in a lab. I've successfully made a Histogram of the data, which looks like:
However, when I try to fit the Poisson Distribution using:
Show[
Histogram[poisson, {0, 9, 1}, "PDF",
ChartLegends -> {"Experimental Result"}, ChartStyle -> "Pastel"],
DiscretePlot[PDF[PoissonDistribution[2.2766917293233084`], x], {x, 0, 10},
PlotStyle -> {Red, Medium},
PlotLegends -> {"Theoretical Poisson"}],
AxesLabel -> {"Time (s)", "Counts"}]
I get a fit that alters the y-axis:
Where the red dots represent the Poisson fit. I have several questions:
- Is my fit even representative of my data?
- How can I change the y-axis of the Poisson distribution?
- How can I get a $\chi ^2$ value for this distribution?
Edit:
Here is the data for reference:
{1., 1., 1., 2., 1., 1., 2., 2., 1., 2., 1., 4., 2., 3., 6., 0., 0.,
3., 3., 3., 3., 0., 0., 0., 3., 1., 5., 3., 1., 3., 5., 2., 2., 1.,
0., 4., 2., 3., 4., 3., 3., 2., 0., 4., 0., 0., 0., 2., 2., 7., 0.,
2., 3., 2., 1., 4., 3., 7., 1., 1., 4., 5., 0., 2., 1., 1., 3., 2.,
3., 3., 3., 4., 0., 2., 2., 2., 5., 4., 2., 0., 0., 3., 2., 2., 2.,
0., 2., 1., 1., 1., 3., 4., 2., 2., 2., 1., 0., 3., 3., 1., 2., 5.,
0., 1., 2., 2., 4., 2., 2., 0., 2., 4., 4., 1., 2., 4., 1., 2., 1.,
1., 0., 5., 3., 4., 2., 2., 1., 1., 1., 7., 1., 1., 3., 3., 0., 4.,
2., 5., 4., 0., 1., 4., 0., 2., 3., 1., 4., 1., 1., 1., 1., 2., 0.,
4., 0., 2., 1., 4., 1., 4., 4., 2., 7., 3., 2., 3., 0., 0., 1., 2.,
0., 2., 2., 2., 3., 1., 4., 1., 3., 3., 2., 3., 1., 3., 2., 2., 6.,
0., 2., 1., 3., 1., 1., 3., 3., 4., 2., 0., 5., 3., 2., 2., 5., 5.,
1., 2., 2., 2., 8., 3., 2., 5., 2., 5., 3., 1., 8., 3., 1., 3., 3.,
2., 3., 3., 4., 2., 4., 2., 7., 2., 1., 1., 1., 4., 5., 2., 4., 2.,
3., 1., 2., 0., 1., 2., 2., 3., 3., 2., 3., 0., 1., 4., 0., 2., 2.,
1., 1., 4., 1., 1., 2., 2., 1., 1., 2., 0., 7., 1., 4., 2., 4., 2.,
6., 5., 2., 3., 1., 3., 5., 0., 2., 1., 2., 3., 1., 4., 2., 1., 2.,
2., 3., 2., 0., 2., 5., 2., 2., 1., 2., 1., 5., 2., 4., 2., 3., 0.,
2., 0., 4., 3., 2., 2., 1., 1., 1., 2., 4., 1., 4., 2., 0., 0., 6.,
4., 1., 2., 4., 0., 0., 0., 5., 3., 3., 1., 0., 1., 1., 4., 0., 0.,
1., 2., 5., 2., 0., 0., 3., 3., 4., 1., 3., 1., 4., 1., 0., 4., 2.,
1., 6., 0., 4., 1., 2., 3., 5., 3., 4., 3., 2., 2., 3., 3., 4., 3.,
1., 3., 2., 5., 1., 5., 4., 1., 2., 5., 1., 2., 2., 0., 1., 3., 1.,
3., 1., 3., 2., 3., 4., 0., 0., 2., 1., 5., 0., 2., 3., 3., 3., 1.,
3., 2., 8., 2., 1., 2., 2., 1., 1., 1., 4., 0., 1., 3., 3., 2., 2.,
2., 2., 2., 3., 2., 2., 4., 6., 3., 5., 4., 4., 4., 1., 2., 1., 3.,
4., 1., 3., 4., 0., 1., 1., 4., 3., 3., 1., 0., 2., 2., 0., 3., 1.,
2., 1., 1., 0., 1., 0., 1., 4., 0., 3., 1., 2., 4., 3., 1., 1., 4.,
1., 5., 2., 4., 1., 3., 2., 2., 2., 3., 3., 3., 0., 3., 2., 6., 1.,
8., 3., 3., 2., 2., 2., 3., 1., 2., 0., 6., 0., 2., 2., 0., 3., 4.,
1., 1., 2., 3., 3., 2., 0., 3., 2., 2., 5., 3., 5., 1., 2., 3., 1.,
3., 1., 2., 0., 3., 0., 3., 5., 4., 1., 2., 0., 0., 2., 5., 1., 1.,
3., 2., 4., 2., 3., 2., 2., 4., 2., 0., 1., 3., 4., 1., 3., 1., 2.,
3., 3., 1., 1., 3., 3., 2., 3., 4., 0., 2., 1., 3., 1., 1., 0., 1.,
2., 1., 2., 1., 3., 3., 6., 3., 4., 2., 1., 3., 1., 3., 3., 1., 7.,
1., 1., 4., 3., 3., 3., 3., 3., 3., 4., 4., 3., 3., 3., 1., 3., 3.,
1., 3., 0., 5., 3., 3., 1., 1., 1., 4., 2., 1., 2., 4., 2., 2., 3.,
4., 3., 2., 4., 2., 3., 1., 6., 1., 3., 2., 0., 3., 1., 2., 1., 2.,
5., 2., 2., 1., 3., 4., 1., 2., 3., 1., 3., 4., 5., 1., 1., 3., 0.,
1., 1.}
DsitributionFitTest
to check fit... Please, in the future, provide minimal but complete examples (any data etc.) - more likely to get a response. $\endgroup$