Wolfram Language

Random Matrices

TracyWidom Distribution

TracyWidom distribution is the limiting distribution of the scaled largest eigenvalue of a random matrix belonging to Gaussian ensembles. It also appears in various different disciplines, such as counting problems, random growth models, phase transitions, etc., and gives accurate predictions.

TracyWidom distribution consists of three classes , , and . Each corresponds to different Gaussian ensembles; see the corresponding PDFs.

show complete Wolfram Language input
Click for copyable input
Plot[Table[ PDF[TracyWidomDistribution[\[Beta]], x], {\[Beta], {1, 2, 4}}] // Evaluate, {x, -5, 2}, Filling -> Axis, PlotLegends -> {"\[Beta] = 1", "\[Beta] = 2", "\[Beta] = 4"}, ImageSize -> Medium, PlotTheme -> "Detailed"]

Use MatrixPropertyDistribution to represent the scaled largest eigenvalue of a matrix from GUE.

Click for copyable input
ev\[ScriptCapitalD][2, n_] := MatrixPropertyDistribution[(Max[Eigenvalues[x]] - 2 Sqrt[n]) n^(1/6), x \[Distributed] GaussianUnitaryMatrixDistribution[n]]

Sample from the distribution and compare the histogram with the PDF.

Click for copyable input
sample = RandomVariate[ev\[ScriptCapitalD][2, 250], 2000];
show complete Wolfram Language input
Click for copyable input
Show[Histogram[sample, {0.2}, PDF, PlotTheme -> "Detailed"], Plot[PDF[TracyWidomDistribution[2], x ], {x, -5, 2}, PlotStyle -> Thick, PlotTheme -> "Detailed", PlotLegends -> None], ImageSize -> Medium]

TracyWidom distribution can be well approximated by gamma distribution in the central region.

Click for copyable input
gdist = GammaDistribution[k, s, 1, a]; PDF[gdist, x]

Fit gamma distribution with TracyWidom distribution of by matching the first three moments.

Click for copyable input
moments = Through[{Mean, Variance, Skewness}[gdist]]; nmoments = N[Through[{Mean, Variance, Skewness}[TracyWidomDistribution[1]]]]; sol = FindRoot[Thread[moments == nmoments], {{k, 1}, {s, 1}, {a, 1}}]

Compare the PDFs.

show complete Wolfram Language input
Click for copyable input
Plot[{PDF[gdist /. sol, x], PDF[TracyWidomDistribution[1], x]} // Evaluate, {x, -5, 2}, PlotLegends -> {"Gamma distribution", "Tracy-Widom distribution"}, Filling -> Axis, PlotTheme -> "Detailed", ImageSize -> Medium]

Related Examples

de es fr ja ko pt-br ru zh