Negative Binomial Distribution
y = negbinomial(p,n,k,c)
output
probability of success
number of successes in independent trials. It may be a positive real or integer number.
k is number of failures occuring before n successes in independent trials. It will be a positive integer.
It will generate random integer from the negative binomial distribution, the number of failures occurring before n successes in independent trials with probability p of success. In this case the function is independent of k and hence any value of k can be set.
It will allow the user to compute the probability p(k) of obtaining k from a negative binomial distribution with parameters p and n.
It will allow the user to compute negative binomial cdf P(k)
It will allow the user to compute negative binomial cdf Q(k)
This function is used to calculate negative binomial random variate, probability p(k) of obtaining k from a negative binomial distribution and cumulative distribution functions P(k), Q(k).
// probability p(k) of obtaining k=5 from negative binomial distribution with p=0.5 and n=3.5 p=0.5 n=3.5 k=5 c=2 y = negbinomial(p,n,k,c) disp(y) | ![]() | ![]() |