Real-valued distributions
ixia.beta_variate
Beta distribution.
Conditions on the parameters are alpha > 0
and beta > 0
.
Returned values range between $0$ and $1$.
ixia.binomial_variate
Binomial random variable.
Gives the number of successes for n
independent trials
with the probability of success in each trial being p
.
Equivalent to sum(random() < p for _ in range(n))
.
Returns an integer in the range $[0, n]$.
ixia.expo_variate
Exponential distribution.
lambda_
is $1$ divided by the desired mean. It should be nonzero.
Returned values are in range $[0, +\infty)$ for lambda_ > 0
,
and $(-\infty, 0]$ for lambda_ < 0
.
ixia.gamma_variate
Gamma distribution.
Conditions on the parameters are alpha > 0
and beta > 0
.
The probability distribution function is $$f(x)=\frac{x^{\alpha-1}\cdot e^{\frac{-x}{\beta}}}{\Gamma(\alpha)\cdot\beta^\alpha}$$
ixia.gauss
Normal distribution, also called the Gaussian distribution.
mu
is the mean, and sigma
is the standard deviation. This is slightly
faster than the ixia.normal_variate()
function.
Multithreading Note
When two threads call this function simultaneously, it is possible that they will receive the same return value. This can be avoided in two ways: 1. Put locks around all calls 2. Use the slower, but thread-safeixia.normal_variate()
function instead.
ixia.log_norm_variate
Log normal distribution.
If you take the natural logarithm of this distribution, you'll get a normal
distribution with mean mu
and standard deviation sigma
. mu
can have any
value, and sigma
must be greater than $0$.
ixia.normal_variate
Normal distribution.
mu
is the mean, and sigma
is the standard deviation.
ixia.pareto_variate
Pareto distribution.
alpha
is the shape parameter.
ixia.random
Generates a random floating point number in the range $[0, 1)$.
ixia.triangular
Returns a random floating point number N
such that low <= N <= high
and
with the specified mode between those bounds. The low and high bounds default
to zero and one. The mode argument defaults to the midpoint between the
bounds, giving a symmetric distribution.
ixia.uniform
Returns a random floating point number N
such that a <= N <= b
for a <= b
and b <= N <= a
for b < a
.
The end-point value b may or may not be included in the range depending on
floating-point rounding in the equation a + (b-a) * random()
.
ixia.von_mises_variate
mu
is the mean angle, expressed in radians between $0$
and $\tau$, and kappa
is the concentration parameter, which must be
greater than or equal to zero. If kappa
is equal to zero, this distribution
reduces to a uniform random angle over the range $0$ to $\tau$.
ixia.weibull_variate
Weibull distribution.
alpha
is the scale parameter and beta
is the shape parameter.