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.
The negative binomial distribution models the number of failures X = k; k = 0,1,... before getting a fixed number of r s
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
The negative binomial distribution models the number of failures X = k; k = 0,1,... before getting a fixed number of r s
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!