NegativeBinomial_trials Type

The distribution of the number of trials needed (x) to get the rth success in repeated independent bernoulli trials with individual probability p.

Static members

Static member Description

NegativeBinomial_trials.CDF(r) (p) (x)

Full Usage: NegativeBinomial_trials.CDF(r) (p) (x)

Parameters:
    r : int
    p : float
    x : float

Returns: float Probability of requiring a maximum of x trials when r successes are required at a individual probability of p

Computes the cumulative distribution function. P(X lower or equal then x)

X=the number of trials at the rth succeess

r : int
p : float
x : float
Returns: float

Probability of requiring a maximum of x trials when r successes are required at a individual probability of p

NegativeBinomial_trials.CheckParam(r) (p)

Full Usage: NegativeBinomial_trials.CheckParam(r) (p)

Parameters:
    r : int
    p : float

r : int
p : float

NegativeBinomial_trials.Init(r) (p)

Full Usage: NegativeBinomial_trials.Init(r) (p)

Parameters:
    r : int -
    p : float -

Returns: DiscreteDistribution<float, int>

Initializes a negative binomial distribution.

The negative binomial distribution is a discrete probability distribution
that models the number of trials needed x to get the rth success in repeated
independent Bernoulli trials with probability p.

The number of success states
The probability of each independent bernoulli trial
The number of trials until the rth success

r : int

p : float

Returns: DiscreteDistribution<float, int>

Example

NegativeBinomial_trials.InvCDF(r) (p) (x)

Full Usage: NegativeBinomial_trials.InvCDF(r) (p) (x)

Parameters:
    r : int
    p : float
    x : 'a

Returns: 'b

Computes the inverse cumulative distribution function (quantile function).

X=the number of trials at the rth succeess

r : int
p : float
x : 'a
Returns: 'b

NegativeBinomial_trials.Mean(r) (p)

Full Usage: NegativeBinomial_trials.Mean(r) (p)

Parameters:
    r : int -
    p : float -

Returns: float

Computes the mean.

r : int

p : float

Returns: float

Example

NegativeBinomial_trials.Mode(r) (p)

Full Usage: NegativeBinomial_trials.Mode(r) (p)

Parameters:
    r : int -
    p : float -

Returns: int

Computes the mode. Number of trials with the highest probability to obtain r successes with the last trial.

r : int

p : float

Returns: int

Example

NegativeBinomial_trials.PMF(r) (p) (x)

Full Usage: NegativeBinomial_trials.PMF(r) (p) (x)

Parameters:
    r : int
    p : float
    x : int

Returns: float Probability of requiring x trials when r successes are required at a individual probability of p

Computes the probability mass function

r : int
p : float
x : int
Returns: float

Probability of requiring x trials when r successes are required at a individual probability of p

NegativeBinomial_trials.PMFLn(r) (p) (x)

Full Usage: NegativeBinomial_trials.PMFLn(r) (p) (x)

Parameters:
    r : int
    p : float
    x : int

Returns: float

Computes the log probability mass function.

r : int
p : float
x : int
Returns: float

NegativeBinomial_trials.Sample(r) (p)

Full Usage: NegativeBinomial_trials.Sample(r) (p)

Parameters:
    r : int -
    p : float -

Returns: 'a

Produces a random sample using the current random number generator (from GetSampleGenerator()).

r : int

p : float

Returns: 'a

Example

NegativeBinomial_trials.SampleUnchecked(r) (p)

Full Usage: NegativeBinomial_trials.SampleUnchecked(r) (p)

Parameters:
    r : 'a -
    p : 'b -

Returns: 'c

Produces a random sample using the current random number generator (from GetSampleGenerator()).

r : 'a

p : 'b

Returns: 'c

Example

NegativeBinomial_trials.StandardDeviation(r) (p)

Full Usage: NegativeBinomial_trials.StandardDeviation(r) (p)

Parameters:
    r : int -
    p : float -

Returns: float

Computes the standard deviation.

r : int

p : float

Returns: float

Example

NegativeBinomial_trials.Support(r) (p)

Full Usage: NegativeBinomial_trials.Support(r) (p)

Parameters:
    r : int
    p : float

Returns: Interval<int>

Returns the support of the NegativeBinomial distribution: [0, max Int32).

r : int
p : float
Returns: Interval<int>

NegativeBinomial_trials.ToString(r) (p)

Full Usage: NegativeBinomial_trials.ToString(r) (p)

Parameters:
    r : int -
    p : float -

Returns: string

A string representation of the distribution.

r : int

p : float

Returns: string

Example

NegativeBinomial_trials.Variance(r) (p)

Full Usage: NegativeBinomial_trials.Variance(r) (p)

Parameters:
    r : int -
    p : float -

Returns: float

Computes the variance.

r : int

p : float

Returns: float

Example