# Compare dos distribuciones con la misma secuencia de momentos

Use escalas variables para ver detalles y formas generales de funciones de densidad para dos distribuciones diferentes con momentos equivalentes, y compare sus primeros momentos en tablas.
 In[1]:= Xdist1 = ProbabilityDistribution[ 1/4 Exp[-Abs[x]^(1/2)], {x, -Infinity, Infinity}]; dist2 = ProbabilityDistribution[ 1/4 Exp[-Abs[x]^(1/2)] (1 + Cos[Sqrt[Abs[x]]]), {x, -Infinity, Infinity}]; momentTable[dist_, kmax_, name_, color_] := Grid[Join[{{Style[name, Bold, FontSize -> 14, FontFamily -> "Verdana"], SpanFromLeft}, {Style["Order", Italic, FontFamily -> "Verdana"], Style["Value", Italic, FontFamily -> "Verdana"]}}, Table[{Style[k, FontFamily -> "Verdana"], Style[Moment[dist, k], FontFamily -> "Verdana"]}, {k, kmax}]], Alignment -> {Left, Center}, Background -> {None, {{color, GrayLevel[.9]}}}, FrameStyle -> Directive[Thick, White], Dividers -> {All, {White, {True}, White}}]; fgrid = Grid[{{TraditionalForm[ Moment[r] == HoldForm[(1 + (-1)^r)/2 (2 r + 1)!]]}}, Alignment -> {Left, Center}, Background -> {None, {{Hue[.6, .15, .9], GrayLevel[.9]}}}, FrameStyle -> Directive[Thick, White], BaseStyle -> {Bold, FontSize -> 14, FontFamily -> "Verdana"}, Dividers -> {All, {White, {True}, White}}]; Row[{GraphicsColumn[ Table[LogPlot[{PDF[dist1, x], PDF[dist2, x]}, {x, -10^k, 10^k}, PlotRange -> All, Filling -> Axis], {k, 2, 4}], ImageSize -> 300], Column[{fgrid, momentTable[dist1, 10, TraditionalForm[Subscript[f, 1][x] == PDF[dist1, x]], Lighter[ColorData[1][1], .6]], momentTable[dist2, 10, TraditionalForm[Subscript[f, 2][x] == PDF[dist2, x]], Lighter[ColorData[1][2], .6]]}, Spacings -> 2]}]
 Out[1]=