# Limit Distributions

Some operations, such as sum, min, or max of random variables, converge to only a few limit distributions when repeated. These limit distributions include NormalDistribution, StableDistribution, MinStableDistribution, and MaxStableDistribution, all of which are built into Mathematica 8.
 In[1]:= Xclt = With[{parent\[ScriptCapitalD] = ExponentialDistribution[1]}, Table[Show[ Histogram[ RandomVariate[ TransformedDistribution[(Total[Array[x, n]] - Mean[parent\[ScriptCapitalD]] n)/(StandardDeviation[ parent\[ScriptCapitalD]] Sqrt[n]), Array[x, n] \[Distributed] ProductDistribution[{parent\[ScriptCapitalD], n}]], 10^5], 50, "PDF"], Plot[PDF[NormalDistribution[], x], {x, -3, 3}, PlotStyle -> Directive[Thick, Orange], PlotRange -> All], PlotLabel -> HoldForm[n] == n], {n, {5, 10, 500}}]];
 In[2]:= Xgclt = With[{\[Alpha] = 2/5}, With[{parent\[ScriptCapitalD] = ParetoDistribution[1, \[Alpha]]}, Table[Show[ Histogram[ RandomVariate[ TransformedDistribution[(Total[Array[x, n]])/n^(1/\[Alpha]), Array[x, n] \[Distributed] ProductDistribution[{parent\[ScriptCapitalD], n}]], 10^5], {-1/10, 4, 1/20}, "PDF"], Plot[PDF[ TruncatedDistribution[{-1/10, 4}, StableDistribution[1, \[Alpha], 1, 0, (( Pi Csc[(Pi \[Alpha])/2])/(2 Gamma[\[Alpha]]))^( 1/\[Alpha])]], x], {x, -1/10, 4}, PlotStyle -> Directive[Thick, Orange], PlotRange -> All], PlotLabel -> HoldForm[n] == n], {n, {5, 10, 500}}]]];
 In[3]:= Xmax = With[{dist = NormalDistribution[], one = 1.0}, Table[With[{invsf1 = InverseSurvivalFunction[dist, one/n], invsf2 = InverseSurvivalFunction[dist, one/(n E)]}, Show[ Histogram[ RandomVariate[ TransformedDistribution[(x - invsf1)/ (invsf2 - invsf1), x \[Distributed] OrderDistribution[{dist, n}, n]], 10^5], 60, "PDF"], Plot[PDF[MaxStableDistribution[0, 1, 0], x], {x, -3, 8}, PlotRange -> All, PlotStyle -> Directive[Orange, Thick]], PlotLabel -> HoldForm[n] == n]], {n, {5, 10, 500}}]];
 In[4]:= XGrid[Join[{Style[DisplayForm[FormBox[#, TraditionalForm]], 12] & /@ {RowBox[{FractionBox["1", RowBox[{SqrtBox["n"], " ", "\[Sigma]"}]], RowBox[{"(", RowBox[{SubscriptBox["x", "1"], "+", "\[Ellipsis]", "+", SubscriptBox["x", "n"], "-", RowBox[{"\[Mu]", " ", "n"}]}], ")"}]}], RowBox[{FractionBox["1", SuperscriptBox["n", RowBox[{"1", "/", "\[Alpha]"}]]], RowBox[{"(", RowBox[{SubscriptBox["x", "1"], "+", "\[Ellipsis]", "+", SubscriptBox["x", "n"]}], ")"}]}], RowBox[{RowBox[{SubscriptBox["a", "n"], " ", RowBox[{"max", "(", RowBox[{SubscriptBox["x", "1"], ",", "\[Ellipsis]", ",", SubscriptBox["x", "n"]}], ")"}]}], "+", SubscriptBox["b", "n"]}]}}, {clt, gclt, max} // Transpose, {Style[#, 14, Bold, FontFamily -> "Helvetica"] & /@ {NormalDistribution, StableDistribution, MaxStableDistribution}}], Dividers -> {{False, True, True, False}, {False, True, True, True, False, {False}}}, FrameStyle -> LightGray]
 Out[4]=