1
$\begingroup$

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}]] 

enter image description here

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

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

1 Answer 1

2
$\begingroup$

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}]]

enter image description here

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}]]

enter image description here

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.