Namespaces

Types in MathNet.Numerics.Distributions

Type ConwayMaxwellPoisson

Namespace MathNet.Numerics.Distributions

Interfaces IDiscreteDistribution

Discrete Univariate Conway-Maxwell-Poisson distribution.

The Conway-Maxwell-Poisson distribution is a generalization of the Poisson, Geometric and Bernoulli distributions. It is parameterized by two real numbers "lambda" and "nu". For

This implementation will cache the value of the normalization constant..

Constructors

Static Functions

Methods

Properties

Public Constructors

ConwayMaxwellPoisson(double lambda, double nu, Random randomSource)

Initializes a new instance of the ConwayMaxwellPoisson class.
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

Random randomSource

The random number generator which is used to draw random samples.

ConwayMaxwellPoisson(double lambda, double nu)

Initializes a new instance of the ConwayMaxwellPoisson class.
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

Public Static Functions

double CDF(double lambda, double nu, double x)

Computes the cumulative distribution (CDF) of the distribution at x, i.e. P(X ≤ x).
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

double x

The location at which to compute the cumulative distribution function.

Return
double

the cumulative distribution at location x.

bool IsValidParameterSet(double lambda, double nu)

Tests whether the provided values are valid parameters for this distribution.
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

double PMF(double lambda, double nu, int k)

Computes the probability mass (PMF) at k, i.e. P(X = k).
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

int k

The location in the domain where we want to evaluate the probability mass function.

Return
double

the probability mass at location k.

double PMFLn(double lambda, double nu, int k)

Computes the log probability mass (lnPMF) at k, i.e. ln(P(X = k)).
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

int k

The location in the domain where we want to evaluate the log probability mass function.

Return
double

the log probability mass at location k.

int Sample(Random rnd, double lambda, double nu)

Samples a random variable.
Parameters
Random rnd

The random number generator to use.

double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

int Sample(double lambda, double nu)

Samples a random variable.
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

void Samples(Int32[] values, double lambda, double nu)

Fills an array with samples generated from the distribution.
Parameters
Int32[] values

The array to fill with the samples.

double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

void Samples(Random rnd, Int32[] values, double lambda, double nu)

Fills an array with samples generated from the distribution.
Parameters
Random rnd

The random number generator to use.

Int32[] values

The array to fill with the samples.

double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

IEnumerable<int> Samples(Random rnd, double lambda, double nu)

Samples a sequence of this random variable.
Parameters
Random rnd

The random number generator to use.

double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

IEnumerable<int> Samples(double lambda, double nu)

Samples a sequence of this random variable.
Parameters
double lambda

The lambda (λ) parameter. Range: λ > 0.

double nu

The rate of decay (ν) parameter. Range: ν ≥ 0.

Public Methods

double CumulativeDistribution(double x)

Computes the cumulative distribution (CDF) of the distribution at x, i.e. P(X ≤ x).
Parameters
double x

The location at which to compute the cumulative distribution function.

Return
double

the cumulative distribution at location x.

bool Equals(object obj)

int GetHashCode()

Type GetType()

double Probability(int k)

Computes the probability mass (PMF) at k, i.e. P(X = k).
Parameters
int k

The location in the domain where we want to evaluate the probability mass function.

Return
double

the probability mass at location k.

double ProbabilityLn(int k)

Computes the log probability mass (lnPMF) at k, i.e. ln(P(X = k)).
Parameters
int k

The location in the domain where we want to evaluate the log probability mass function.

Return
double

the log probability mass at location k.

int Sample()

Samples a Conway-Maxwell-Poisson distributed random variable.
Return
int

a sample from the distribution.

IEnumerable<int> Samples()

Samples a sequence of a Conway-Maxwell-Poisson distributed random variables.
Return
IEnumerable<int>

a sequence of samples from a Conway-Maxwell-Poisson distribution.

void Samples(Int32[] values)

Fills an array with samples generated from the distribution.

string ToString()

Returns a String that represents this instance.
Return
string

A String that represents this instance.

Public Properties

double Entropy get;

Gets the entropy of the distribution.

double Lambda get;

Gets the lambda (λ) parameter. Range: λ > 0.

int Maximum get;

Gets the largest element in the domain of the distributions which can be represented by an integer.

double Mean get;

Gets the mean of the distribution.

double Median get;

Gets the median of the distribution.

int Minimum get;

Gets the smallest element in the domain of the distributions which can be represented by an integer.

int Mode get;

Gets the mode of the distribution

double Nu get;

Gets the rate of decay (ν) parameter. Range: ν ≥ 0.

Random RandomSource get; set;

Gets or sets the random number generator which is used to draw random samples.

double Skewness get;

Gets the skewness of the distribution.

double StdDev get;

Gets the standard deviation of the distribution.

double Variance get;

Gets the variance of the distribution.