Final answer:
The task is to modify a Matlab script to compare Binomial and Poisson distributions using only PMFs by calculating interval probabilities around the mean adjusted by the standard deviation. The script will sum PMF values within the interval and compare the probabilities from both distributions.
Step-by-step explanation:
The task involves modifying a Matlab script that compares the probability mass functions (PMFs) of a Binomial and a Poisson random variable. The modification includes removing the cumulative distribution functions (CDFs) from the code and calculating probabilities solely using PMFs. The script then calculates the interval probabilities around the mean ± standard deviation, which is np±σ for a Binomial random variable, where λ=np matches the mean for the Poisson distribution.
The Binomial distribution is a discrete random variable that results from a fixed number of n independent Bernoulli trials with probability p of success on each trial. The mean is μ=np and the standard deviation is σ = √npq. The Poisson distribution is also a discrete random variable that counts the number of events occurring in a fixed interval, with a known average rate λ, and is used to approximate the Binomial when p is small and n is large.
To compute the probabilities for the specified interval using PMFs, the script iterates over the range of integer values that span the interval, summing the PMF values for both Binomial and Poisson distributions. Additionally, the script compares the two distributions by computing the difference in probabilities obtained from both PMFs.