MixtureDistribution

This class models mixture distributions that have continuous distributions as their components.

Parameters

cdfList

the list of distributions to be mixed

cdf

the mixing distribution specified as a CDF

name

an optional name

Constructors

Link copied to clipboard
constructor(cdfList: List<ContinuousDistributionIfc>, cdf: DoubleArray, name: String? = null)

Properties

Link copied to clipboard

The distributions that are mixed.

Link copied to clipboard

The mixing weights as a CDF

Link copied to clipboard

The total number of parameters in the mixing distribution. Each weight counts as a parameter and the total number of parameters associated with the distributions.

Link copied to clipboard

The mixing weights.

Functions

Link copied to clipboard
open override fun cdf(x: Double): Double

Returns the F(x) = Pr{X <= x} where F represents the cumulative distribution function

Link copied to clipboard
open override fun domain(): Interval
Link copied to clipboard
open override fun instance(): MixtureDistribution
Link copied to clipboard
open override fun invCDF(p: Double): Double

Provides the inverse cumulative distribution function for the distribution

Link copied to clipboard
open override fun mean(): Double

Returns the mean or expected value of a distribution

Link copied to clipboard

This function returns the parameters of the mixture distribution as a list of double arrays. The first array is the CDF of the mixture. Then, each parameter array from the list of supplied distributions.

Link copied to clipboard
open override fun parameters(): DoubleArray

This function returns the parameters of the mixture distribution as an array. The array will have the following form

open override fun parameters(params: DoubleArray)

This function sets the parameters of the distribution according to the supplied array. The array must have the following form

Link copied to clipboard
open override fun pdf(x: Double): Double

Returns the f(x) where f represents the probability density function for the distribution. Note this is not a probability.

Link copied to clipboard
open override fun randomVariable(streamNumber: Int, streamProvider: RNStreamProviderIfc): MixtureRV

Promises to return a random variable that uses the supplied stream number using the supplied stream provider

Link copied to clipboard
open override fun variance(): Double

Returns the variance of the distribution if defined