denote the largest sample eigenvalue of a p by p
Wishart matrix W with identity covariance, computed from n samples. In
several problems, including testing for multiplicative components of
interaction  and signal detection , there is an interest in the distribution of the following
U = l1 / [ Trace(W) / p ].
In principle, as p,n
with p/n→c, after
proper centering and scaling, the asymptotic distribution of the ratio is the
same as that of the largest eigenvalue itself, namely a Tracy-Widom distribution
Pr [ (U - μn,p) / σn,p] →
β=1 for real valued data and β=2 for complex valued data.
However, as shown in , this may be a poor approximation to this
distribution, in particular for small to modest values of
p,n. Instead, in  a refined
approximation was derived
Pr [ (U - μn,p) / σn,p] ~ TWβ(s) + 1/(β np)
Matlab Code + Demo
We provide a Matlab function that inverts the
modified distribution for the ratio, and for a given right tail probability
α provides an approximate
threshold t(α,p,n), such that
Pr[U > t] ~ α.
function [t s ] = TW_trace_ratio_threshold
(p, n, beta, alpha)
p = dimension
n = number of samples,
1 or 2 for real or complex valued noise,
right tail probability, a number between 0 and 1.
Additional required routines are:
function [mu_np sigma_np] = KN_mu_sigma(n,p,beta); %
computes the centering and scaling constants
TW_beta1.mat, TW_beta2.mat % pre-computed tables of
the Tracy-Widom distributions and their derivatives, using Matlab code by Prof. Folkmar Bornemann and based on 
Demo: function demo_ratio.m compares the accuracy
of the theoretical formula to empirical simulations, as a function of number of samples
to the figure in the paper .
 B. Nadler, On the
distribution of the ratio of the largest eigenvalue to the trace of a
Wishart matrix, Journal of Multivariate Analysis,
I.M. Johnstone, On the distribution of the largest
eigenvalues in principal components analysis, Annals of Statistics, vol.
29, pp. 295-327, 2001.
 J.R. Schott,
A note on the critical values used in stepwise tests for
multiplicative components of interaction, Communications in Statistics -
Theory and Methods, 1986.
 O. Besson, L. L. Scharf,
CFAR matched direction detector,
IEEE Transactions on Signal Processing,
 F. Bornemann, On the numerical evaluation of distributions in random matrix theory,
Markov Processes and Related Fields, 2010.