Extreme Value Theory 3: Expected value of the maximum

The limiting distribution of the maximum can be used to answer questions such as: what is the expected value of the maximum of n variables? For example, for a distribution in the Gumbel domain, the expected maximum value is

using the fact that the mean of the Gumbel distribution is the Euler constant, gamma = 0.5772. The next figure verifies this prediction for the maximum, and the maximum absolute value, of normal random variables. It would also be possible to write down an exact pdf for the maximum of n normal random variables, but it would be very tedious to integrate to get the expectation.

n = round(logspace(2,5,13));
Nbatches = 40; batchsize = 50; Ntrials = Nbatches*batchsize;
meanxmax = zeros(2,length(n));  batchmean = zeros(2,Nbatches);
for k = 1:length(n)
    for batch = 1:Nbatches % do trials in batches-- memory limit
        x = randn(n(k),batchsize);
        batchmean(1,batch) = mean(max(x));
        batchmean(2,batch) = mean(max(abs(x)));
    end
    meanxmax(:,k) = mean(batchmean,2);
end  % takes about 60-80 sec if max n is 10^5

semilogx(n,meanxmax(1,:),'r+',n,meanxmax(2,:),'rx'), grid on

nc = logspace(log10(n(1)),log10(n(end)),1000);

% predicted mean of maximum of normals
b = sqrt(2)*erfcinv(2./nc);
a = sqrt(2)*erfcinv(2*exp(-1)./nc) - b;
predmean = b + a*(-psi(1)); % psi function gives Euler's constant
line(nc,predmean,'color','b')

% predicted mean of maximum absolute value of normals
b = sqrt(2)*erfcinv(1./nc);
a = sqrt(2)*erfcinv(exp(-1)./nc) - b;
predmean = b + a*(-psi(1));
line(nc,predmean,'color','b')

legend({'max of normals','max absolute value of normals'},4)
xlabel('n'), ylabel(sprintf('<x_{max}> in %d trials',Ntrials))

In the figure, the symbols are the experiment; the solid lines are the predictions using the equation above, the formulas for a(n) and b(n), and the cumulative distribution function for standard normal random variables:

and for the absolute value of standard normal random variables,

Next: Fitting distributions to data