comyx.fading.nakagami#

Module Summary#

Classes#

Nakagami

Represents the \(\text{Nakagami}(m, \Omega)\) distribution.

Reference#

class comyx.fading.nakagami.Nakagami(m: float, omega: float = 1)[source]#

Represents the \(\text{Nakagami}(m, \Omega)\) distribution.

The Nakagami distribution or the Nakagami-m distribution is a probability distribution related to the gamma distribution. The family of Nakagami distributions has two parameters: a shape parameter \(m\) with \(m\geq 1/2\) and a second parameter controlling spread \(\Omega > 0\).

Density Function
\[f(x; m, \Omega) = \frac{2m^m}{\Gamma(m)\Omega^m} x^{2m - 1} \exp\left(-\frac{m}{\Omega}x^2\right)\]

, where \(\Gamma(.)\) is the gamma function.

Expected value
\[\sqrt{\frac{\Omega}{m}} \frac{\Gamma\left(m + \frac{1}{2}\right)}{\Gamma(m)}\]
Variance
\[\Omega \left(1 - \frac{1}{m}\left(\frac{\Gamma\left(m + \frac{1}{2}\right)}{\Gamma(m)}\right)^2\right)\]
Reference:

https://en.wikipedia.org/wiki/Nakagami_distribution

cdf(x: NDArrayFloat) NDArrayFloat[source]#

Cumulative distribution function of the Nakagami distribution.

Parameters:

x – Value at which cdf is evaluated.

Returns:

Value of the cumulative distribution function evaluated at x.

expected_value() float[source]#

Returns the expected value of the Nakagami distribution.

get_samples(size: int | Tuple[int, Ellipsis], seed: int = None) NDArrayFloat[source]#

Generate random variables from the Nakagami 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 Nakagami distribution.

pdf(x: NDArrayFloat) NDArrayFloat[source]#

Probability density function of the Nakagami distribution.

Parameters:

x – Value at which pdf is evaluated.

Returns:

Value of the probability density function evaluated at x.

variance() float[source]#

Returns the variance of the Nakagami distribution.