MATLAB+Examples+of+PMF+for+Poisson+distribution+with+different+parameter+alpha

MATLAB+Examples+of+PMF+for+Poisson+distribution+with+different+parameter+alpha

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
MATLAB Examples of PMF for Poisson distribution with different parameter alpha = 0.1; % setting parameters for the Poisson distribution n = 19, P_alpha =[]; for k = 0:1:n, P_alpha = [P_alpha alpha^k /factorial(k) * exp(-alpha)]; end subplot(411); stem(0:n, P_alpha); ylabel('P(n, \alpha) '); xlabel('k'); title('PMF of Poisson P(n, \alpha) vs. n with \alpha = 0.1'); % alpha = 0.5; % setting parameters for the Poisson distribution n = 19, P_alpha =[]; for k = 0:1:n, P_alpha = [P_alpha alpha^k /factorial(k) * exp(-alpha)]; end subplot(412); stem(0:n, P_alpha); ylabel('P(n, \alpha) '); xlabel('k'); title('PMF of Poisson P(n, \alpha) vs. n with \alpha = 0.5'); % alpha = 5; % setting parameters for the Poisson distribution n = 19, P_alpha =[]; for k = 0:1:n, P_alpha = [P_alpha alpha^k /factorial(k) * exp(-alpha)];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end subplot(413); stem(0:n, P_alpha); ylabel('P(n, \alpha) '); xlabel('k'); title('PMF of Poisson P(n, \alpha) vs. n with \alpha = 5'); % alpha = 10; % setting parameters for the Poisson distribution n = 19, P_alpha =; for k = 0:1:n, P_alpha = [P_alpha alpha^k /factorial(k) * exp(-alpha)]; end subplot(414); stem(0:n, P_alpha); ylabel('P(n, \alpha) '); xlabel('k'); title('PMF of Poisson P(n, \alpha) vs. n with \alpha = 10'); 2 4 6 8 10 12 14 16 18 20 0.5 1 P(n, ) k PMF of Poisson P(n, ) vs. n with = 0.1 2 4 6 8 10 12 14 16 18 20 0.5 1 k PMF of Poisson P(n, ) vs. n with = 0.5 2 4 6 8 10 12 14 16 18 20 0.1 0.2 k PMF of Poisson P(n, ) vs. n with = 5 2 4 6 8 10 12 14 16 18 20 0.1 0.2 k PMF of Poisson P(n, ) vs. n with = 10...
View Full Document

This note was uploaded on 09/14/2011 for the course ECE 321 taught by Professor Hongyage during the Spring '11 term at NJIT.

Ask a homework question - tutors are online