freealg.distributions.KestenMcKay#

class freealg.distributions.KestenMcKay(d)#

Kesten-McKay distribution.

Parameters:
dfloat

Parameter \(d\) of the distribution. See Notes.

Notes

The Kesten-McKay distribution has the absolutely-continuous density

\[\mathrm{d} \rho(x) = \frac{\sqrt{4(d-1) - x^2}}{2 \pi (d^2 - x^2)} \mathbf{1}_{x \in [\lambda_{-}, \lambda_{+}]} \mathrm{d}{x}\]

where

  • \(\lambda_{\pm} = \pm 2 \sqrt{d-1}\) are the edges of the support.

  • \(d > 1\) is the shape parameter of the density.

References

[1]

Kesten, H. (1959). Symmetric random walks on groups. Transactions of the American Mathematical Society, 92(2), 336–354.

[2]

McKay, B. D. (1981). The expected eigenvalue distribution of a large regular graph. Linear Algebra and its Applications, 40, 203-216

Examples

>>> from freealg.distributions import KestenMcKay
>>> km = KestenMcKay()

Methods

density([x, plot, latex, save, eig])

Density of distribution.

hilbert([x, plot, latex, save])

Hilbert transform of the distribution.

stieltjes([x, y, plot, on_disk, latex, save])

Stieltjes transform of distribution.

sample(size[, x_min, x_max, method, seed, ...])

Sample from distribution.

matrix(size[, seed])

Generate matrix with the spectral density of the distribution.