Poisson Distribution.
The Poisson distribution models the number of events occurring in a fixed interval of time or space, given that these events occur with a known constant mean rate and independently of the time since the last event.
Parameterization:
- λ (lambda) = mean = variance
PMF: P(X = k) = λ^k * e^(-λ) / k!
The Poisson distribution is a limiting case of the Negative Binomial distribution as the dispersion parameter b → 0.
Value parameters
- lambda
-
the rate parameter (must be positive)
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait HasVariance[Double]trait HasCdf[Int]trait HasMean[Double]trait DiscreteDistr[Int]trait Rand[Int]trait Density[Int]class Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Draw a sample from the Poisson distribution
Draw a sample from the Poisson distribution
Attributes
Log PMF: log P(X = k) = k*log(λ) - λ - log(k!)
As plot, applying mods (e.g. Plots.fixedSize) to the spec after the built-in modifications.
As plot, applying mods (e.g. Plots.fixedSize) to the spec after the built-in modifications.
Attributes
As plotCdf, applying mods (e.g. Plots.fixedSize) to the spec after the built-in modifications.
As plotCdf, applying mods (e.g. Plots.fixedSize) to the spec after the built-in modifications.
Attributes
Attributes
- Definition Classes
PMF: P(X = k) = λ^k * e^(-λ) / k!
PMF: P(X = k) = λ^k * e^(-λ) / k!
Attributes
Inherited methods
Returns the unnormalized value of the measure
Overridden by filter/map/flatmap for monadic invocations. Basically, rejection samplers will return None here
Overridden by filter/map/flatmap for monadic invocations. Basically, rejection samplers will return None here
Attributes
- Inherited from:
- Rand
Returns the log unnormalized value of the measure
Returns the log unnormalized value of the measure
Attributes
- Definition Classes
- Inherited from:
- DiscreteDistr
Converts a random sampler of one type to a random sampler of another type. Examples: uniform.map(_2) gives a Rand[Double] in the range [0,2] Equivalently, for(x <- uniform) yield 2x
Converts a random sampler of one type to a random sampler of another type. Examples: uniform.map(_2) gives a Rand[Double] in the range [0,2] Equivalently, for(x <- uniform) yield 2x
Value parameters
- f
-
the transform to apply to the sampled value.
Attributes
- Inherited from:
- Rand
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Gets n samples from the distribution.
Gets one sample from the distribution. Equivalent to get
Gets n samples from the distribution into a specified collection type.
Gets n samples from the distribution into a specified collection type.
Attributes
- Inherited from:
- Rand
An infinitely long iterator that samples repeatedly from the Rand
An infinitely long iterator that samples repeatedly from the Rand
Attributes
- Returns
-
an iterator that repeatedly samples
- Inherited from:
- Rand
Attributes
- Inherited from:
- DiscreteDistr
Returns the probability of that draw up to a constant
Attributes
- Inherited from:
- Rand