NuGenSciMath

NuGenNegativeBinomialProbability Members

NuGenNegativeBinomialProbability overview

Public Instance Constructors

NuGenNegativeBinomialProbability Constructor The Negative Binomial NuGenProbability The equation for this probability is: P(Y) = (Y-1)!/(((Y-1)-(K-1))!(K-1)!)*p^K*(1-p)^(Y-K)

Public Instance Methods

Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
GetExpectedValue The Expected Value is defined by E(Y) = K / p
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetResult (inherited from NuGenProbability) This is the public function that is callable to compute a probability or a cumulative probability. For cumulative probabilities it is assumed that the Random Variables range is at least computable from zero to Y. Optimizations could be made to compute cumulative probabilities faster for events that have a very large number of FINITE trials by taking the shorter of the computable ranges and possibly subtracting from one if necessary. If the probability is set in the constructor then the value won't be undefined and will be immediately returned.
GetType (inherited from Object) Gets the Type of the current instance.
GetVariance The variance is defined by o^2 = K*(1-p)/p^2
ToString (inherited from Object) Returns a String that represents the current Object.

Protected Instance Fields

m_chance_of_success 
m_kth_success 
m_probability (inherited from NuGenProbability) 
m_RV (inherited from NuGenProbability) 
m_RVT (inherited from NuGenProbability) 
m_trials 

Protected Instance Methods

ComputeResult Computing the result. This algorithm is exactly the same as the Binomial NuGenProbability except that Y-1 is replacing N and K-1 is replacing Y in the original algorithm for computing the factorial part. This directly relates to the fact that we assume K-1 successes have happened out of Y-1 trials and that the last trial is the Kth success. The factorial part figures out how many possible ways we can have K-1 successes in Y-1 trials then the actual probabilities of those successes including the last one are multiplied along with the Y-K number of failed trial probabilities.
Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
SetRV Random variable

See Also

NuGenNegativeBinomialProbability Class | Genetibase.MathX Namespace