Poisson CDF output is all one value
I’m creating a Poisson distribution. I then want to produce a cdf evaluated at an array of values using this distribution. However, the output of the cdf matlab function when applied to a Poisson distribution is giving me all one value. I can alter that value by changing lambda of the Poisson distribution, but it’s still all one and the same.
This is my first time using Poisson distributions in Matlab, so admittedly there is a strong possiblity there is some user error involved here, but after staring at this code and rewriting it for the last two hours I’m stumped.
The code is below, along with a plot of the evaluated cdf over an array that includes 5000 points regularly spaced from 0.00001 to 0.05. The CDF value is roughly 0.95 for all evaluated points, but it should be a nice smooth ‘S’ shape starting at 0 and climbing up as the XX value increases. Why am I getting this nonsensical output?
Computer is a Dell laptop running Windows 10.
XX = 0.00001:0.00001:0.05;
p = makedist(‘Poisson’,’lambda’,0.05);
C = cdf(p,XX);
plot(C)I’m creating a Poisson distribution. I then want to produce a cdf evaluated at an array of values using this distribution. However, the output of the cdf matlab function when applied to a Poisson distribution is giving me all one value. I can alter that value by changing lambda of the Poisson distribution, but it’s still all one and the same.
This is my first time using Poisson distributions in Matlab, so admittedly there is a strong possiblity there is some user error involved here, but after staring at this code and rewriting it for the last two hours I’m stumped.
The code is below, along with a plot of the evaluated cdf over an array that includes 5000 points regularly spaced from 0.00001 to 0.05. The CDF value is roughly 0.95 for all evaluated points, but it should be a nice smooth ‘S’ shape starting at 0 and climbing up as the XX value increases. Why am I getting this nonsensical output?
Computer is a Dell laptop running Windows 10.
XX = 0.00001:0.00001:0.05;
p = makedist(‘Poisson’,’lambda’,0.05);
C = cdf(p,XX);
plot(C) I’m creating a Poisson distribution. I then want to produce a cdf evaluated at an array of values using this distribution. However, the output of the cdf matlab function when applied to a Poisson distribution is giving me all one value. I can alter that value by changing lambda of the Poisson distribution, but it’s still all one and the same.
This is my first time using Poisson distributions in Matlab, so admittedly there is a strong possiblity there is some user error involved here, but after staring at this code and rewriting it for the last two hours I’m stumped.
The code is below, along with a plot of the evaluated cdf over an array that includes 5000 points regularly spaced from 0.00001 to 0.05. The CDF value is roughly 0.95 for all evaluated points, but it should be a nice smooth ‘S’ shape starting at 0 and climbing up as the XX value increases. Why am I getting this nonsensical output?
Computer is a Dell laptop running Windows 10.
XX = 0.00001:0.00001:0.05;
p = makedist(‘Poisson’,’lambda’,0.05);
C = cdf(p,XX);
plot(C) poisson, cdf, pdf, makedist, fitdist MATLAB Answers — New Questions