The negative binomial distribution models the number of failures X = k; k = 0,1,... before getting a fixed number of r s
Posted: Tue Apr 26, 2022 6:03 pm
The negative binomial distribution models the number of failures X = k; k = 0,1,... before getting a fixed number of r successes (i.e., the process terminates when r successes are reached, hence the last outcome must be a success). Let p be the probability of success. The probability mass function (p.m.f.) of X is given by = = P(X = k) = X! (r – 1)? "P"(1 – p)". ) p (r + k – 1)! k)!
Derive a recursion relation for the p.m.f. of X, and use it to construct an algorithm for generating negative binomial random variables.
Subsequently, write a program using set seed 11122233 to generate 1000 negative binomial variates with the following parameters: r = 10, p = 0.35. Check the fit with theoretical values graphically.
Derive a recursion relation for the p.m.f. of X, and use it to construct an algorithm for generating negative binomial random variables.
Subsequently, write a program using set seed 11122233 to generate 1000 negative binomial variates with the following parameters: r = 10, p = 0.35. Check the fit with theoretical values graphically.