# Why does the PoissonDistribution not plot around its mean for moderate large numbers?

I plotted the Poisson Distribution for various mean values (plot label and vertical line). The plots does not peak around the mean as the mean increase. Any advice to get the right plot, or at least the right distribution values?

Same when plotting the log of the distribution -s + n Log[s] - LogGamma[n + 1]

Table[ListPlot[Table[PDF[PoissonDistribution[s], n], {n, Round[Max[s - 8 Sqrt[s], 0]], Round[s + 8 Sqrt[s]]}], PlotLabel -> s, GridLines -> {{s}, None}], {s, {50, 60, 70, 80, 100, 150}}]

• Also try DiscretePlot, for example: Table[DiscretePlot[ PDF[PoissonDistribution[s], n], {n, Round[Max[s - 8 Sqrt[s], 0]], Round[s + 8 Sqrt[s]]}, PlotLabel -> s, GridLines -> {{s}, None}], {s, {50, 60, 70, 80, 100, 150}}] – becko Jun 11 '19 at 8:41

Because of the way you are generating the lists. What you are plotting is just a list of "y" values without the corresponding "x", that with ListPlot are plotted by Mathematica from 1 to n (with n the number of elements). If you start the list from a "x" value larger than one, Mathematica still plots from 1 to n.

Try with the following code where I explicitly add the "x" values to the lists: this should fix the problem.

Table[ListPlot[
Table[{n, PDF[PoissonDistribution[s], n]}, {n,
Round[Max[s - 8 Sqrt[s], 0]], Round[s + 8 Sqrt[s]]}]
, PlotLabel -> s, GridLines -> {{s}, None}]
, {s, {50, 60, 70, 80, 100, 150}}]

• Well I see, I miss the x coordinate. Thank you. That is the answer! – jss Jun 11 '19 at 7:50