Represents a Gaussian distribution over a single real variable.
- Companion:
- object
Value members
Concrete methods
Computes the cumulative density function of the value x.
Computes the cumulative density function of the value x.
Computes the inverse cdf of the p-value for this gaussian.
Computes the inverse cdf of the p-value for this gaussian.
- Value parameters:
- p:
a probability in [0,1]
- Returns:
x s.t. cdf(x) = numYes
Computes the probability that a Gaussian variable Z is within the interval [x, y]. This probability is computed as P[Z < y] - P[Z < x].
Computes the probability that a Gaussian variable Z is within the interval [x, y]. This probability is computed as P[Z < y] - P[Z < x].
- Value parameters:
- x
lower-end of the interval
- y
upper-end of the interval
- Returns:
probability that the Gaussian random variable Z lies in the interval [x, y]
- Definition Classes
Inherited methods
Overridden by filter/map/flatmap for monadic invocations. Basically, rejeciton samplers will return None here
Overridden by filter/map/flatmap for monadic invocations. Basically, rejeciton samplers will return None here
- Inherited from:
- Rand
Converts a random sampler of one type to a random sampler of another type. Examples: randInt(10).flatMap(x => randInt(3 * x.asInstanceOf[Int]) gives a Rand[Int] in the range [0,30] Equivalently, for(x <- randInt(10); y <- randInt(30 *x)) yield y
Converts a random sampler of one type to a random sampler of another type. Examples: randInt(10).flatMap(x => randInt(3 * x.asInstanceOf[Int]) gives a Rand[Int] in the range [0,30] Equivalently, for(x <- randInt(10); y <- randInt(30 *x)) yield y
- Value parameters:
- f
the transform to apply to the sampled value.
- Inherited from:
- Rand
Samples one element and qpplies the provided function to it. Despite the name, the function is applied once. Sample usage:
Samples one element and qpplies the provided function to it. Despite the name, the function is applied once. Sample usage:
for(x <- Rand.uniform) { println(x) }
- Value parameters:
- f
the function to be applied
- Inherited from:
- Rand
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.
- Inherited from:
- Rand
Returns the probability density function at that point.
Returns the probability density function at that point.
- Inherited from:
- ContinuousDistr
Gets one sample from the distribution. Equivalent to get()
Gets one sample from the distribution. Equivalent to get()
- Inherited from:
- Rand
An infinitely long iterator that samples repeatedly from the Rand
An infinitely long iterator that samples repeatedly from the Rand
- Returns:
an iterator that repeatedly samples
- Inherited from:
- Rand
Returns the probability density function up to a constant at that point.
Returns the probability density function up to a constant at that point.
- Inherited from:
- ContinuousDistr