Uniform Distribution

Generates random numbers uniformly distributed on the interval \([a, b)\).

Details

Uniform random number generator fills the input \(n \times p\) numeric table with values that are uniformly distributed on the interval \([a, b)\), where \(a, b \in \mathbb{r}\) and \(a <> b\).

The probability density is given by:

\[\begin{split}f_{a, b}(x) = \begin{cases} \frac {1}{b - a}, & x \in [a, b)\\ 0, & x \notin [a, b) \end{cases}\end{split}\]

The cumulative distribution function is as follows:

\[\begin{split}F_{a, b}(x) = \begin{cases} 0, & x < a \\ \frac {x - a}{b - a}, & a \leq x < b \\ 1, & x \geq b \end{cases}\end{split}\]

Batch Processing

Algorithm Parameters

Uniform distribution algorithm has the following parameters in addition to the common parameters specified in Distributions:

Algorithm Parameters for Uniform Distribution (Batch Processing)

Parameter

Default Value

Description

algorithmFPType

float

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

defaultDense

Performance-oriented computation method, the only method supported by the algorithm.

a

\(0.0\)

The left bound \(a\).

b

\(1.0\)

The right bound \(b\).

Examples