Defined in: packages/distribution/src/uniform-distribution.ts:13
A uniform distribution on a nonempty finite interval.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlykind:"uniform"
Defined in: packages/distribution/src/distribution.ts:13
The serializable name of the family.
Inherited from
Section titled “Inherited from”parameters
Section titled “parameters”
readonlyparameters:Readonly<P>
Defined in: packages/distribution/src/distribution.ts:15
The captured input parameters.
Inherited from
Section titled “Inherited from”ContinuousDistribution.parameters
support
Section titled “support”
readonlysupport:DistributionSupport
Defined in: packages/distribution/src/distribution.ts:17
The closed bounds of the represented outcomes.
Inherited from
Section titled “Inherited from”ContinuousDistribution.support
cumulativeProbability
Section titled “cumulativeProbability”
readonlycumulativeProbability: (x) =>Probability
Defined in: packages/distribution/src/distribution.ts:22
The probability of an outcome at or below x.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Throws
Section titled “Throws”With INVALID_ARGUMENT when x is NaN or not a number.
Inherited from
Section titled “Inherited from”ContinuousDistribution.cumulativeProbability
survivalProbability
Section titled “survivalProbability”
readonlysurvivalProbability: (x) =>Probability
Defined in: packages/distribution/src/distribution.ts:27
The probability of an outcome strictly above x.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Throws
Section titled “Throws”With INVALID_ARGUMENT when x is NaN or not a number.
Inherited from
Section titled “Inherited from”ContinuousDistribution.survivalProbability
quantile
Section titled “quantile”
readonlyquantile: (p) =>number
Defined in: packages/distribution/src/distribution.ts:32
The first support value whose cumulative probability reaches p. At 0 and 1, returns the support endpoints.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”number
Throws
Section titled “Throws”With INVALID_PROBABILITY when p is outside [0, 1] or is NaN.
Inherited from
Section titled “Inherited from”ContinuousDistribution.quantile
readonlydraw: (random) =>number
Defined in: packages/distribution/src/distribution.ts:39
Draw one value from the supplied source. There is no state between draws besides the caller’s source. The same seed replays on the same engine build and platform. One differing comparison or rounding on another engine can change that draw and every later one, including how many words a rejection sampler consumes.
Parameters
Section titled “Parameters”random
Section titled “random”Returns
Section titled “Returns”number
Throws
Section titled “Throws”With INVALID_SOURCE_VALUE for an invalid value from the source.
Inherited from
Section titled “Inherited from”density
Section titled “density”
readonlydensity: (x) =>number
Defined in: packages/distribution/src/distribution.ts:68
The density at x, with zero outside the support and the interior limit at a finite endpoint.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
Throws
Section titled “Throws”With INVALID_ARGUMENT when x is NaN or not a number.
Inherited from
Section titled “Inherited from”ContinuousDistribution.density
logDensity
Section titled “logDensity”
readonlylogDensity: (x) =>number
Defined in: packages/distribution/src/distribution.ts:73
The natural logarithm of the density at x, with -Infinity for zero density.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
Throws
Section titled “Throws”With INVALID_ARGUMENT when x is NaN or not a number.
Inherited from
Section titled “Inherited from”ContinuousDistribution.logDensity
readonlymean:number
Defined in: packages/distribution/src/distribution.ts:79
The expected value.
Inherited from
Section titled “Inherited from”variance
Section titled “variance”
readonlyvariance:number
Defined in: packages/distribution/src/distribution.ts:81
The expected squared deviation from the mean.
Inherited from
Section titled “Inherited from”rawMoment
Section titled “rawMoment”
readonlyrawMoment: (order) =>number
Defined in: packages/distribution/src/distribution.ts:86
The expected value of the outcome raised to order. The zeroth moment is 1.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”number
Throws
Section titled “Throws”With INVALID_MOMENT_ORDER outside the supported integer orders.