freealg.distributions.MarchenkoPastur#
- class freealg.distributions.MarchenkoPastur(lam)#
Marchenko-Pastur distribution.
- Parameters:
- lamfloat
Parameter \(\lambda\) of the distribution. See Notes.
Notes
The Marchenko-Pastur distribution has the absolutely-continuous density
\[\mathrm{d} \rho(x) = \frac{1}{2 \pi} \frac{\sqrt{(\lambda_{+} - x) (x - \lambda_{-})}}{\lambda x} \mathbf{1}_{x \in [\lambda_{-}, \lambda_{+}]} \mathrm{d}{x}\]where
\(\lambda_{\pm} = (1 \pm \sqrt{\lambda})^2\) are the edges of the support.
\(\lambda > 0\) is the shape parameter of the density.
References
[1]Marcenko, V. A., Pastur, L. A. (1967). Distribution of eigenvalues for some sets of random matrices. Mathematics of the USSR-Sbornik, 1(4), 457
Examples
>>> from freealg.distributions import MarchenkoPastur >>> mp = MarchenkoPastur()
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.