# Distribution of block maxima of gaussian random variables

I try to verify the following result of extreme value statistics that the distribution of the block maxima of Gaussian random variables converges to a Gumbel distribution. To this end, I first generate Gaussian random varaibles, divide them in blocks of length 100, compute the maximum value of each block and fit a Gumbel distribution

data=RandomVariate[NormalDistribution[0, 1], 100000];
blocks=Table[data[[i + 1 ;; i + 100]], {i, 0, 99900}];
max=Table[blocks[[k]]//Max, {k, 1, 99901}];
est = EstimatedDistribution[max,GumbelDistribution[a, b]];
Show[Histogram[max,{.1},"PDF",PlotRange->{{0, 8},All},Frame->True, Axes->False],Plot[PDF[est, x], {x, 0, 6}]]


As you see there is a poor agreement. Am I doing something wrong?

• You need to use ExtremeValueDistribution for maxima, GumbelDistribution is for minima. This is explained in the documentation for GumbelDistribution Commented Nov 11, 2014 at 14:54
• @SimonWoods Thank you very much!
– ana
Commented Nov 11, 2014 at 15:01

Demonstrating what Simon Woods pointed out.

From the documentation for the GumbelDistribution:

"The Gumbel distribution gives the asymptotic distribution of the minimum value in a sample from a distribution such as the normal distribution."

"The asymptotic distribution of the maximum value, also sometimes called a Gumbel distribution, is implemented in the Wolfram Language as ExtremeValueDistribution."

data = RandomVariate[NormalDistribution[0, 1], {1000, 100}];

{dataMin, dataMax} = {Min /@ data, Max /@ data};

estGumbel = EstimatedDistribution[dataMin, GumbelDistribution[a, b]];

{xminMin, xmaxMin} = {Min[dataMin], Max[dataMin]};

Show[
Histogram[dataMin, Automatic, "PDF",
PlotRange -> {{xminMin, xmaxMin}, All},
Frame -> True,
Axes -> False],
Plot[PDF[estGumbel, x], {x, xminMin, xmaxMin}]]


estExtVal = EstimatedDistribution[dataMax, ExtremeValueDistribution[a, b]];

{xminMax, xmaxMax} = {Min[dataMax], Max[dataMax]};

Show[
Histogram[dataMax, Automatic, "PDF",
PlotRange -> {{xminMax, xmaxMax}, All},
Frame -> True,
Axes -> False],
Plot[PDF[estExtVal, x], {x, xminMax, xmaxMax}]]