Multinomial Type

Static members

Static member Description

Multinomial.CDF(p) (n) (x)

Full Usage: Multinomial.CDF(p) (n) (x)

Parameters:
    p : vector
    n : int
    x : float

Returns: 'a

Computes the cumulative distribution.

p : vector
n : int
x : float
Returns: 'a

Multinomial.CheckParam(p) (n)

Full Usage: Multinomial.CheckParam(p) (n)

Parameters:
p : vector
n : int

Multinomial.Mean(p) (n)

Full Usage: Multinomial.Mean(p) (n)

Parameters:
    p : vector - vector of event probabilities in each trial
    n : int - number of trails

Returns: Vector<float>

Computes the mean vector

p : vector

vector of event probabilities in each trial

n : int

number of trails

Returns: Vector<float>

Multinomial.PMF(p) (x)

Full Usage: Multinomial.PMF(p) (x)

Parameters:
Returns: float
p : vector
x : Vector<int>
Returns: float

Multinomial.PMF_Unchecked(p) (x)

Full Usage: Multinomial.PMF_Unchecked(p) (x)

Parameters:
    p : vector - vector of event probabilities in each trial
    x : Vector<int> - vector of observed successes

Returns: float Probability of observing the exact outcome of k's with given p's.

The probability mass function (PMF) for the multinomial distribution describes the probability of observing a specific set of outcomes in a series of independent trials with different categories. P(K_i = k_i)

n (sum of x's) must be smaller than 170 to not result in infinity due to factorial calculations

p : vector

vector of event probabilities in each trial

x : Vector<int>

vector of observed successes

Returns: float

Probability of observing the exact outcome of k's with given p's.

Example


   open FSharp.Stats
   open FSharp.Stats.Distributions.Discrete
   let p = vector [0.3; 0.5; 0.2]
   let x = Vector.Generic.ofArray [|2; 4; 1|]
   let pdf = Multinomial.PMF p x
   // result: 0.118125

Multinomial.Sample(p) (n)

Full Usage: Multinomial.Sample(p) (n)

Parameters:
    p : vector - vector of event probabilities in each trial
    n : int - number of trails

Returns: 'a

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

p : vector

vector of event probabilities in each trial

n : int

number of trails

Returns: 'a

Example

Multinomial.StandardDeviation(p) (n)

Full Usage: Multinomial.StandardDeviation(p) (n)

Parameters:
    p : vector - vector of event probabilities in each trial
    n : int - number of trails

Returns: Vector<float>

Computes the standard deviation.

p : vector

vector of event probabilities in each trial

n : int

number of trails

Returns: Vector<float>

Multinomial.Support(p) (n)

Full Usage: Multinomial.Support(p) (n)

Parameters:
    p : vector - vector of event probabilities in each trial
    n : int - number of trails

Returns: Vector<Interval<int>>

Returns the support of the Multinomial distribution: for each x: [0, n].

p : vector

vector of event probabilities in each trial

n : int

number of trails

Returns: Vector<Interval<int>>

Example

Multinomial.ToString(p) (n)

Full Usage: Multinomial.ToString(p) (n)

Parameters:
    p : vector - vector of event probabilities in each trial
    n : int - number of trails

Returns: string

A string representation of the distribution.

p : vector

vector of event probabilities in each trial

n : int

number of trails

Returns: string

Multinomial.Variance(p) (n)

Full Usage: Multinomial.Variance(p) (n)

Parameters:
    p : vector - vector of event probabilities in each trial
    n : int - number of trails

Returns: Vector<float>

Computes the variance vector

p : vector

vector of event probabilities in each trial

n : int

number of trails

Returns: Vector<float>