Plot the Poisson CDF with the Standard Normal Distribution CDF
15 views (last 30 days)
Hello all, I have a question on plotting the Poisson cdf together with the standard normal distribution cdf. Below is the task description:
Let X be a random variable with and be the normalized version of X.
The following figure shows the cdf of for some and the cdf Φ of the standard normal distribution.
I have tried my best to plot as same as the given figure but still I am not able to get it looks similiar as the given figure. Below is my result:
May I know what do I miss? Below is my code:
pe = makedist('Normal')
x1 = -3:.1:3;
p = cdf(pe,x1);
x3 = -3:3;
y3 = poisscdf(x3,1);
John D'Errico on 8 Jan 2022
Edited: John D'Errico on 8 Jan 2022
Note that a Poisson random variable will ALWAYS be a non-negative number. It CANNOT have mass on the negative end of the real line. So the plot that you show, with a supposedly Poisson random variable that goes negative? It cannot exist. (At least not for a standard Poisson.)
Perhaps the intent is to have a Poisson random variable that has been transformed into the range of a normal distribution.
For example, Poisson distributions with large Poisson parameters will tend to look very normally distributed. (Not difficult to prove as I recall.)
So a Poisson CDF that does look quite normal. A quick glance at Wikipedia...
tells me that for a Poisson distribution with parameter lamnda, the mean will be lambda, as well as the variance. So we can simply do this:
lambda = 30;
s you should see, the two curves nearly overlay on top of each other.
In your figure, the Poisson was apparently transformed, via a transformation to look like a normal.
lambda = 30;
fplot(@(x) poisscdf(lambda + x*sqrt(lambda),lambda),[-3,3])
However, that is NOT a Poisson distibution because it is shown to have mass for negative x. It is derived from one.
Torsten on 8 Jan 2022
Edited: Torsten on 8 Jan 2022
I suspect the graphics shows that the arithmetic mean of normalized independent Poisson random variables converges in distribution to the standard normal distribution.
You can see it from the following plot:
lambda = 3;
m = 2000; % number of RVs
n = 3000; % number of samples
a = poissrnd(lambda,m,n);
b(i) = (sum(a(:,i))/m-lambda)/sqrt(lambda/m); % normalized arithmetic mean of Poisson RVs
cdfplot(b); % plot empirical cdf of b
x = linspace(min(b),max(b));
plot(x,normcfd(x,0,1)) % compare with standard normal distribution