<< Chapter < Page Chapter >> Page >

Binomial, poisson, and gaussian dstributions

bincomp.m Graphical comparison of the binomial, Poisson, and Gaussian distributions. The procedure calls for binomial parameters n , p , determines a reasonable range of evaluation points and plots on the same graph the binomial distribution function, thePoisson distribution function, and the gaussian distribution function with the adjustment called the “continuity correction.”

% BINCOMP file bincomp.m Approx of binomial by Poisson and gaussian % Version of 5/24/96% Gaussian adjusted for "continuity correction" % Plots distribution functions for specified parameters n, pn = input('Enter the parameter n '); p = input('Enter the parameter p ');a = floor(n*p-2*sqrt(n*p)); a = max(a,1); % Prevents zero or negative indicesb = floor(n*p+2*sqrt(n*p)); k = a:b;Fb = cumsum(ibinom(n,p,0:n)); % Binomial distribution function Fp = cumsum(ipoisson(n*p,0:n)); % Poisson distribution functionFg = gaussian(n*p,n*p*(1 - p),k+0.5); % Gaussian distribution function stairs(k,Fb(k+1)) % Plotting detailshold on plot(k,Fp(k+1),'-.',k,Fg,'o')hold off xlabel('t values') % Graph labeling detailsylabel('Distribution function') title('Approximation of Binomial by Poisson and Gaussian')grid legend('Binomial','Poisson','Adjusted Gaussian')disp('See Figure for results')
Got questions? Get instant answers now!

poissapp.m Graphical comparison of the Poisson and Gaussian distributions. The procedure calls for a value of the Poisson parameter mu, then calculates and plots the Poissondistribution function, the Gaussian distribution function, and the adjusted Gaussian distribution function.

% POISSAPP file poissapp.m Comparison of Poisson and gaussian % Version of 5/24/96% Plots distribution functions for specified parameter mu mu = input('Enter the parameter mu ');n = floor(1.5*mu); k = floor(mu-2*sqrt(mu)):floor(mu+2*sqrt(mu));FP = cumsum(ipoisson(mu,0:n)); FG = gaussian(mu,mu,k);FC = gaussian(mu,mu,k-0.5); stairs(k,FP(k))hold on plot(k,FG,'-.',k,FC,'o')hold off gridxlabel('t values') ylabel('Distribution function')title('Gaussian Approximation to Poisson Distribution') legend('Poisson','Gaussian','Adjusted Gaussian')disp('See Figure for results')
Got questions? Get instant answers now!

Setup for simple random variables

If a simple random variable X is in canonical form, the distribution consists of the coefficients of the indicator funtions (the values of X ) and the probabilities of the corresponding events. If X is in a primitive form other than canonical, the csort operation is applied to the coefficients of the indicator functions and the probabilities of the corresponding events to obtainthe distribution. If Z = g ( X ) and X is in a primitive form, then the value of Z on the event in the partition associated with t i is g ( t i ) . The distribution for Z is obtained by applying csort to the g ( t i ) and the p i . Similarly, if Z = g ( X , Y ) and the joint distribution is available, the value g ( t i , u j ) is associated with P ( X = t i , Y = u j ) . The distribution for Z is obtained by applying csort to the matrix of values and the corresponding matrix of probabilities.

Questions & Answers

if three forces F1.f2 .f3 act at a point on a Cartesian plane in the daigram .....so if the question says write down the x and y components ..... I really don't understand
Syamthanda Reply
hey , can you please explain oxidation reaction & redox ?
Boitumelo Reply
hey , can you please explain oxidation reaction and redox ?
Boitumelo
for grade 12 or grade 11?
Sibulele
the value of V1 and V2
Tumelo Reply
advantages of electrons in a circuit
Rethabile Reply
we're do you find electromagnetism past papers
Ntombifuthi
what a normal force
Tholulwazi Reply
it is the force or component of the force that the surface exert on an object incontact with it and which acts perpendicular to the surface
Sihle
what is physics?
Petrus Reply
what is the half reaction of Potassium and chlorine
Anna Reply
how to calculate coefficient of static friction
Lisa Reply
how to calculate static friction
Lisa
How to calculate a current
Tumelo
how to calculate the magnitude of horizontal component of the applied force
Mogano
How to calculate force
Monambi
a structure of a thermocouple used to measure inner temperature
Anna Reply
a fixed gas of a mass is held at standard pressure temperature of 15 degrees Celsius .Calculate the temperature of the gas in Celsius if the pressure is changed to 2×10 to the power 4
Amahle Reply
How is energy being used in bonding?
Raymond Reply
what is acceleration
Syamthanda Reply
a rate of change in velocity of an object whith respect to time
Khuthadzo
how can we find the moment of torque of a circular object
Kidist
Acceleration is a rate of change in velocity.
Justice
t =r×f
Khuthadzo
how to calculate tension by substitution
Precious Reply
hi
Shongi
hi
Leago
use fnet method. how many obects are being calculated ?
Khuthadzo
khuthadzo hii
Hulisani
how to calculate acceleration and tension force
Lungile Reply
you use Fnet equals ma , newtoms second law formula
Masego
please help me with vectors in two dimensions
Mulaudzi Reply
how to calculate normal force
Mulaudzi
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask