From d5962d232258996da4969fe00b4fd117d003e479 Mon Sep 17 00:00:00 2001
From: Connor Moore <connor@hhmoore.ca>
Date: Sat, 25 Apr 2026 21:38:01 -0400
Subject: Finished section 2 and section 3

---
 report/report.tex | 63 ++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 51 insertions(+), 12 deletions(-)

(limited to 'report/report.tex')

diff --git a/report/report.tex b/report/report.tex
index 7b66883..2d73bb4 100644
--- a/report/report.tex
+++ b/report/report.tex
@@ -6,10 +6,13 @@
 
 \usepackage{xcolor}
 \usepackage{graphicx}
-\graphicspath{{./figures/}}
+\graphicspath{{./figures/} {./figures/tracy-widom-approx/}}
 \usepackage{amsmath}
 \usepackage{booktabs}
 \usepackage{longtable}
+\usepackage{caption}
+\captionsetup{margin=0.5cm} % Sets a 1cm margin on both sides
+\captionsetup{labelfont=bf}
 
 \usepackage{hyperref}
 \hypersetup{colorlinks=true,
@@ -39,26 +42,62 @@ This work considers Gaussian orthogonal ensembles (GOEs) specifically and attemp
 \section{Relevant Theory}
 
 \subsection{Random Ensembles}
-The GOE-based random matrix has some properties that go beyond simply being normally distributed. Namely, the matrix is square, symmetric, and the standard deviation $\sigma$ is unity except for elements on the diagonal where $\sigma=2$. The mean $\mu$ is considered as zero for all elements. Consider the normal distribution with notation $N(\mu, \sigma$). Then, an example is provided below for a $5\times5$ matrix:
+The GOE-based random matrix has some properties that go beyond simply being normally distributed. Namely, the matrix is square, symmetric, and the standard deviation $\sigma$ is unity except for elements on the diagonal where $\sigma=2$. The mean $\mu$ is considered as zero for all elements. Consider the normal distribution with notation $N(\mu, \sigma$). Then, the matrix is constructed using:
 \begin{equation*}
-    \mathbf{A} = 
-    \begin{pmatrix}
-        N(0,2) & N(0,1) & N(0,1) & N(0,1) & N(0,1) \\
-        N(0,1) & N(0,2) & N(0,1) & N(0,1) & N(0,1) \\
-        N(0,1) & N(0,1) & N(0,2) & N(0,1) & N(0,1) \\
-        N(0,1) & N(0,1) & N(0,1) & N(0,2) & N(0,1) \\
-        N(0,1) & N(0,1) & N(0,1) & N(0,1) & N(0,2) \\
-    \end{pmatrix}
+    \mathbf{A}(i,j) \sim
+    \begin{cases}
+    N(0, 1) & \forall (i \neq j) \\
+    N(0, 2) & \forall (i = j)
+    \end{cases}
 \end{equation*}
 The diagonal standard deviation of 2 is what makes this ensemble orthogonal. Note that the representation above does not explicitly state the symmetry, but $\mathbf{A}(i,j) = \mathbf{A}(j,i)\, \forall(i,j)$.
 
 \subsection{The Tracy-Widom Distributions}
-Various distributions can be 
+Various distributions can be reconstructed from the eigenvalues of a GOE. For example, the case of the global eigenvalues yields a semicircle distribution \cite{anderson2009An_Int}. Consider the $N$ eigenvalues of a vector $|\lambda_1| \ge |\lambda_2| \ge |\lambda_3\| \ge ... \ge |\lambda_N|$. In this case, $\lambda_1$ is considered the \emph{dominant} eigenvalue so long as $|\lambda_1| > |\lambda_2|$. Taking the distribution of the dominant eigenvalues $\lambda_1$ yields an entirely different result that is known as the \emph{Tracy-Widom} distribution. This distribution can be parametrized in terms of which division algebra is used in its definition. Wigner's work considered real, complex, and Quaternion cases, shown below in Figure \ref{fig:tracy-widoms}:
+
+\begin{figure}[H]
+    \centering
+    \input{figures/tracy-widom-approx/tracy_widom.tex}
+    \caption{Various Tracy-Widom distributions for $\beta=1,2,4$. The different values of $\beta$ depend on which division algebra is used for the Gaussian ensemble (real/complex/quaternion). This work considers only the TW\textsubscript{1} distribution defined for real numbers, shown in red as the shallowest peak compared with the complex and quaternion versions.}
+    \label{fig:tracy-widoms}
+\end{figure}
+
+Compared with a normal distribution, it is also difficult to distinguish between the two visually. Figure \ref{fig:tracy-widom-vs-normal} shows a comparison between a Tracy-Widom and a normal distribution:
+
+\begin{figure}[H]
+    \centering
+    \input{figures/tracy-widom-approx/tracy_widom_compare.tex}
+    \caption{The TW\textsubscript{1} distribution compared with a normal distribution of arbitrary mean and standard deviation. Note that while the peaks are centered, the Tracy-Widom has a `fatter' tail on the $+x$ side and a slimmer one on the $-x$ side. Both distributions are quite similar visually, so this asymmetry will play an important role in quantifying their differences.}
+    \label{fig:tracy-widom-vs-normal}
+\end{figure}
+Because of their similarities, a smart approach to validating the generation of a Tracy-Widom distribution should include some type of quantifiable, statistical assurance that a normal distribution was not generated.
 
 \subsection{Statistical Differentiation}
-The Tracy-Widom and normal distributions are hard to differentiate based on shape alone. Because of this, it is necessary to consider quantifying the differences in some meaningful way. One way to do this is to consider the important differences between the two distributions. For example, while the normal distribution is symmetric, the Tray-Widom is not. The symmetry of a distribution is something that can be quantified
+There are various ways to go about discerning a Tracy-Widom distribution from a normal one. Perhaps the most elegant is to exploit some basic differences in properties between the two. As mentioned earlier, the Tracy-Widom has a fatter side and a slimmer side, which makes it asymmetric. This is not the case with the normal distribution which is identical on either side of the mean value $\mu$. It turns out that the symmetry of a distribution is readily quantifiable using existing statistical tools, and as such that will be the backbone of the statistical analysis. First consider the \emph{expected value} of a probability density function (PDF) $p(x)$, defined as \cite{siegrist2021}:
+\begin{equation}
+    E[x] = \int_s x p(x)\, dx \approx \left(\sum_i x_i\,p(i)\right) \Delta x
+    \label{eqn:expected}
+\end{equation}
+where the approximation applies for a discrete PDF with equi-distance bins along $x$. The expected value has \emph{moments} that give quantifiable insights into the behaviour and shape of a PDF. The general equation for the $n$th central moment of $E(x)$ is given as:
+\begin{equation}
+    E\left[(x-a_n)^n\right]
+\end{equation}
+where $a_n$ is some constant. The first moment (taken as a so-called \emph{raw moment} with $a=0$) simply reduces to \ref{eqn:expected}. The second moment is the variance of the function and is taken with $a=\mu$:
+\begin{equation}
+    \sigma^2 = E\left[(x - E[x])^2\right] = E\left[ (x - \mu)^2\right]
+\end{equation}
+The next two moments are of particular value for this project as they quantify the symmetry of the distribution. The third moment is the \emph{skewness} of the distribution, which deviates from the central moments above and is normalized by the standard deviation $\sigma$:
+\begin{equation}
+    \mathrm{Skewness} = E\left[\frac{(x-\mu)^3}{\sigma}\right]
+\end{equation}
+Lastly, the 4th moment is the kurtosis of the distribution. Kurtosis comes from the Greek word for \emph{bulging}, and as a parameter it quantifies the `sharpness' of the PDF. A larger value of kurtosis implies that the distribution has fatter tails \cite{siegrist2021}. Note that kurtosis is always a positive value and is equal to 3 for a standard normal distribution. Therefore, the  \emph{excess} kurtosis is considered by subtracting 3. The relation is given as:
+\begin{equation}
+    \mathrm{Excess\ Kurtosis} = E\left[ \frac{(x - \mu)^4}{\sigma} \right] - 3
+\end{equation}
+These tests, while perhaps simple, will do a fine job in the strict context of differentiating a Tracy-Widom distribution from a normal distribution. In the case of the normal distribution, the skewness and excess kurtosis are both zero. For comparison, the approximate Tracy-Widom has a skewness of $\approx 0.2935$ and an excess kurtosis of $\approx 0.1292$.This was calculated using an Octave script that sampled 50,000 bins in the range $[-9,9]$ for both distributions. This also verified the calculations as it properly reconstructed the exact mean and standard deviation for the normal distribution sampled from its the closed-form equation.
 
 \section{Numerical Methods}
+The natural extension of defining the prerequisite statistical tests to confirm a Tracy-Widom is to actually sample a Tracy-Widom. The issue with this, however, is that it can be quite computationally demanding. The Tracy-Widom is quite similar to the normal except for near the very tails, meaning that most samples (occurring near the peaks) will show agreement between the two. Additionally, it is theorized that the dimension of the matrix $N$ has to be on the order of thousands to get a very Tracy-Widom distribution. The combination of these two points motivates finding a convenient way to calculate the maximum eigenvalue of a large matrix repeated such that thousands of calculations can be performed in a meaningfully short amount of time.
 \subsection{The Power Method}
 One relatively cheap way to find the maximum eigenvalue is through the so-called power method. The power method is an iterative approach to finding the maximum eigenvalue of a matrix that exploits the spectral gap ($\lambda_1 - \lambda_2$). Consider an initial guess in the form of a vector of length $N$ given as $\mathbf{x_0}$. Then, perform the multiplication:
 \begin{equation}
-- 
cgit v1.2.3

