comyx.fading.rayleigh#
Module Summary#
Classes#
Represents the \(\text{Rayleigh}(\sigma)\) distribution. |
Reference#
- class comyx.fading.rayleigh.Rayleigh(sigma: float = 1)[source]#
Represents the \(\text{Rayleigh}(\sigma)\) distribution.
The Rayleigh distribution is a continuous probability distribution for nonnegative-valued random variables. Up to rescaling, it coincides with the chi distribution with two degrees of freedom.
- Density function
- \[f(x; \sigma) = \frac{x}{\sigma^2} \cdot \exp\left(-\frac{x^2}{2\sigma^2}\right)\]
- Expected value
- \[\sigma \cdot \sqrt{\frac{\pi}{2}}\]
- Variance
- \[\left(2 - \frac{\pi}{2}\right) \cdot \sigma^2\]
- RMS value
- \[\sqrt{2} \cdot \sigma\]
- Reference:
- cdf(x: NDArrayFloat) NDArraySigned[source]#
Cumulative distribution function of the Rayleigh distribution.
- Parameters:
x – Value at which cdf is evaluated.
- Returns:
Value of the cumulative distribution function evaluated at x.
- get_samples(size: int | Tuple[int, Ellipsis], seed: int = None) NDArrayFloat[source]#
Generates random variables from the Rayleigh distribution.
- Parameters:
size – Number of random variables to generate.
seed – Seed for the random number generator.
- Returns:
An array of size size containing random variables from the Rayleigh distribution.