WorksheetFunction.NegBinom_Dist (Excel)

Returns the negative binomial distribution. NegBinom_Dist returns the probability that there will be number_f failures before the number_s-th success, when the constant probability of a success is probability_s. This function is similar to the binomial distribution, except that the number of successes is fixed, and the number of trials is variable. Like the binomial, trials are assumed to be independent.

For example, you need to find 10 people with excellent reflexes, and you know the probability that a candidate has these qualifications is 0.3. NegBinom_Dist calculates the probability that you will interview a certain number of unqualified candidates before finding all 10 qualified candidates. Number_f and number_s are truncated to integers. If any argument is nonnumeric, NegBinom_Dist returns the #VALUE! error value. If probability_s < 0 or if probability > 1, NegBinom_Dist returns the #NUM! error value. If number_f < 0 or number_s < 1, NegBinom_Dist returns the #NUM! error value. The equation for the negative binomial distribution is as follows, where x is number_f, r is number_s, and p is probability_s:

NegBinom_Dist (Arg1, Arg2, ..., Arg4)


Dim dblArg1 As Double: dblArg1 = 
Dim dblArg2 As Double: dblArg2 = 
Dim dblArg3 As Double: dblArg3 = 
Dim dblNegBinom_Dist As Double
dblNegBinom_Dist = WorksheetFunction.NegBinom_Dist(Arg1:=dblArg1, Arg2:=dblArg2, Arg3:=dblArg3, Arg4:=True)

Arguments

Arg1, Arg2, ..., Arg4

Arg1 (Double) - Number_f - the number of failures.

Arg2 (Double) - Number_s - the threshold number of successes.

Arg3 (Double) - Probability_s - the probability of a success.

Arg4 (Boolean) - Cumulative - A logical value that determines the form of the function. If cumulative is True, NegBinom_Dist returns the cumulative distribution function; if False, it returns the probability density function.