Vergleich von "Gammaverteilung" und Lognormalverteilung 1) exponentiell gedämpfte Potenz bzw. "Gammaverteilung" Definition und Eigenschaften Definition In[164]:= ClearΑ, x0 p1x x ^ Α Expx x0 x0 ^ Α 1 GammaΑ 1 Out[165]= x x0 x Α x0 1Α Gamma1 Α p1 (x) ist richtig normiert... In[166]:= Integratep1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 Out[166]= 1 Bestimmung des Maximums In[167]:= p1maximum x. SolveDp1x, x, 1 0, x Out[167]= x0 Α
2 distributionen.nb Momente allgemein berechnet In[168]:= Integratex p1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 Integratex ^ 2 p1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 Integratex ^ 3 p1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 Integratex ^ 4 p1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 Integratex ^ n p1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 && Ren 1 Out[168]= Out[169]= Out[170]= Out[171]= Out[172]= x0 1 Α x0 2 1 Α 2 Α x0 3 Gamma4 Α Gamma1 Α x0 4 Gamma5 Α Gamma1 Α x0 n Gamma1 n Α Gamma1 Α Erwartungswert in Abhängigkeit von Α und x0 In[173]:= Out[173]= p1mittelwert x0 Α 1 x0 1 Α Momente in Abhängigkeit von Α und x0 In[177]:= p1xmomentn x0 n Α k; p1xmoment1 p1xmoment2 p1xmoment3 p1xmoment4 n k 1 Out[178]= Out[179]= Out[180]= Out[181]= x0 1 Α x0 2 1 Α 2 Α x0 3 1 Α 2 Α 3 Α x0 4 1 Α 2 Α 3 Α 4 Α allgemeine Bestimmung der Varianz In[182]:= Out[182]= p1varianz Integratex p1mittelwert^2 p1x, x, 0,, Assumptions Rex0 0 && ReΑ 0 x0 2 1 Α
distributionen.nb 3 Beispielverteilung In[183]:= x0 2; Α 2; Plotp1x, x, 0, 20, PlotRange 0, 0.15, PlotStyle DirectiveBlack, Thick ClearΑ, x0 0.14 0.12 0.10 Out[185]= 0.08 0.06 0.04 0.02 Wie Α, x0, Erwartungswert, Maximum und Varianz voneinander abhaengen.. In[187]:= p1maximum p1mittelwert p1varianz Out[187]= Out[188]= x0 Α x0 1 Α Out[189]= x0 2 1 Α In[190]:= p1maxiα, x0 Α x0; p1mittelα, x0 x0 1 Α; p1variα, x0 x0 2 1 Α; alphamittelmaxi mittel, maxi maxi mittel maxi; alphamittelvari mittel, vari mittel ^ 2 vari 1; x0mittelmaximittel, maxi mittel maxi; x0mittelvarimittel, vari vari mittel; Verteilung in Abhängigkeit von Erwartungswert und Maximum In[197]:= Clearxmittel, xmax p1mod1alpha alphamittelmaxi xmittel, xmax; p1mod1x0 x0mittelmaxixmittel, xmax; p1mod1x x ^ p1mod1alpha Expx p1mod1x0 p1mod1x0 ^ p1mod1alpha 1 Gammap1mod1alpha 1 Out[200]= x xmax xmaxxmittel x xmaxxmittel Gamma1 xmax xmittel 1 xmax xmaxxmittel xmax xmaxxmittel
4 distributionen.nb selbe Beispielverteilung wie oben In[201]:= x0 2; Α 2; xmax p1maxiα, x0 xmittel p1mittelα, x0 Needs"PlotLegends`" Plotp1mod1x, p1x, x, 0, 20, PlotRange 0, 0.15, PlotStyle DirectiveBlack, Thick, DirectiveOrange, Dashed, Thick, PlotLegend "Gammavertxmaxx0,Α,xmittelx0,Α", "Gammavertx0,Α", LegendPosition 0.1, 0.1, LegendShadow 0, 0, LegendSize 1.2, 0.3, LegendTextSpace 15 Clearxmittel, xmax, Α, x0 Out[203]= 4 Out[204]= 6 0.14 Out[206]= 0.12 0.10 0.08 0.06 Gammavertxmaxx0,Α,xmittelx0,Α Gammavertx0,Α 0.04 0.02 Verteilung in Abhängigkeit von Erwartungswert und Varianz In[208]:= Clearxmittel, xvari p1mod2alpha alphamittelvari xmittel, xvari; p1mod2x0 x0mittelvarixmittel, xvari; p1mod2x x ^ p1mod2alpha Expx p1mod2x0 p1mod2x0 ^ p1mod2alpha 1 Gammap1mod2alpha 1 Out[211]= x xmittel xmittel2 1 xvari x xvari xvari xmittel 2 xmittel xvari Gamma xmittel2 xvari
distributionen.nb 5 selbe Beispielverteilung wie oben In[212]:= x0 2; Α 2; xvari p1variα, x0 xmittel p1mittelα, x0 Plotp1mod2x, p1x, x, 0, 20, PlotRange 0, 0.15, PlotStyle DirectiveBlack, Thick, DirectiveGreen, Dashed, Thick, PlotLegend "Gammavertxvarix0,Α,xmittelx0,Α", "Gammavertx0,Α", LegendPosition 0.1, 0.1, LegendShadow 0, 0, LegendSize 1.2, 0.3, LegendTextSpace 15 Clearxmittel, xmax, xvari, Α, x0 Out[214]= 12 Out[215]= 6 0.14 Out[216]= 0.12 0.10 0.08 0.06 Gammavertxvarix0,Α,xmittelx0,Α Gammavertx0,Α 0.04 0.02 In[218]:= 2) Lognormalverteilung Definition und Eigenschaften Definition In[219]:= p2x 1 x S Sqrt2 Pi ExpLogx Μ^2 2 S ^ 2 Out[219]= ΜLogx2 2 S 2 2 Π S x richtig normiert... In[220]:= Integratep2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 && ImΜ 0 Out[220]= 1
6 distributionen.nb Bestimmung des Maximums In[221]:= Out[221]= p2maximum x. SolveDp2x, x, 1 0, x S2 Μ Momente allgemein berechnet In[222]:= Integratex p2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 Integratex ^ 2 p2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 Integratex ^ 3 p2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 Integratex ^ 4 p2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 Integratex ^ n p2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 && ImΜ 0 && ImΜ 0 && ImΜ 0 && ImΜ 0 && ImΜ 0 Out[222]= Out[223]= S2 2 Μ 2 S2 Μ Out[224]= Out[225]= 9 S2 2 3 Μ 8 S2 4 Μ Out[226]= n2 S2 n Μ 2 Erwartungswert in Abhängigkeit von S und Μ In[227]:= p2mittelwert S2 2 Μ ; allgemeine Bestimmung der Varianz In[228]:= Out[228]= p2varianz Integratex p2mittelwert^2 p2x, x, 0,, Assumptions ReS 0 && ReΜ 0 && ImS 0 && ImΜ 0 S2 2 Μ 1 S2
distributionen.nb 7 Beispielverteilung In[229]:= S 1; Μ 2; Plotp2x, x, 0, 20, PlotRange 0, 0.11, PlotStyle DirectiveBlack, Thick ClearS, Μ 0.10 0.08 Out[231]= 0.06 0.04 0.02 Wie S, Μ, Erwartungswert, Maximum und Varianz voneinander abhaengen.. In[233]:= p2maximum p2mittelwert p2varianz Out[233]= S2 Μ Out[234]= Out[235]= S2 2 Μ S2 2 Μ 1 S2 In[236]:= p2maxis, Μ S2 Μ ; p2mittels, Μ S2 2 Μ ; p2varis, Μ S2 2 Μ 1 S2 ; Μmittelmaximittel, maxi 1 Logmaxi 2 Logmittel; 3 Smittelmaximittel, maxi 2 3 Log mittel maxi ; Smittelvarimittel, vari Log mittel2 vari mittel 2 ; Μmittelvarimittel, vari Log mittel 2 mittel 2 vari ;
8 distributionen.nb Verteilung in Abhängigkeit von Erwartungswert und Maximum In[243]:= Clearxmittel, xmax p2mod1s Smittelmaxixmittel, xmax; p1mod1μ Μmittelmaxixmittel, xmax; p2mod1x 1 x p2mod1s Sqrt2 Pi ExpLogx p1mod1μ^2 2 p2mod1s ^ 2 Out[246]= 3 Logx 1 2 3 Logxmax2 Logxmittel 4 Log xmittel xmax 3 Π 2 x Log xmittel xmax selbe Beispielverteilung wie oben In[247]:= S 1; Μ 2; xmax p2maxis, Μ xmittel p2mittels, Μ Plotp2mod1x, p2x, x, 0, 20, PlotRange 0, 0.11, PlotStyle DirectiveBlack, Thick, DirectiveOrange, Dashed, Thick, PlotLegend "Lognormalvert xmaxs,μ,xmittels,μ", "Lognormalvert S,Μ", LegendPosition 0.1, 0.1, LegendShadow 0, 0, LegendSize 1.1, 0.3, LegendTextSpace 15 Clearxmittel, xmax, xvari, S, Μ Out[249]= Out[250]= 52 0.10 0.08 0.06 LognormalvertxmaxS,Μ,xmittelS,Μ LognormalvertS,Μ Out[251]= 0.04 0.02
distributionen.nb 9 Verteilung in Abhängigkeit von Erwartungswert und Varianz In[253]:= Clearxmittel, xvari p2mod2s Smittelvarixmittel, xvari; p1mod2μ Μmittelvarixmittel, xvari; p2mod2x 1 x p2mod2s Sqrt2 Pi ExpLogx p1mod2μ^2 2 p2mod2s ^ 2 Out[256]= xmittel 2 2 LogxLog xmittel 2 xvari 2 Log xmittel2 xvari xmittel 2 2 Π x Log xmittel2 xvari xmittel 2 selbe Beispielverteilung wie oben In[257]:= S 1; Μ 2; xvari p2varis, Μ xmittel p2mittels, Μ Plotp2mod2x, p2x, x, 0, 20, PlotRange 0, 0.11, PlotStyle DirectiveBlack, Thick, DirectiveGreen, Dashed, Thick, PlotLegend "Lognormalvert xvaris,μ,xmittels,μ", "Lognormalvert S,Μ", LegendPosition 0.1, 0.1, LegendShadow 0, 0, LegendSize 1.1, 0.3, LegendTextSpace 15 Clearxmittel, xmax, xvari, S, Μ Out[259]= 1 5 Out[260]= 52 0.10 0.08 0.06 LognormalvertxvariS,Μ,xmittelS,Μ LognormalvertS,Μ Out[261]= 0.04 0.02 In[263]:=
10 distributionen.nb 3) Vergleich der beiden Verteilungen gleiche Varianz und gleicher Erwartungswert Verlauf In[348]:= xvari 10; xmittel 6; Plotp1mod2x, p2mod2x, x, 0, 30, PlotStyle DirectiveBlack, Thick, DirectiveGreen, Thick, PlotLegend "Gammavert", "Lognormalvert ", LegendPosition 0.2, 0.3, LegendShadow None Clearxmittel, xmax, xvari Gammavert Out[350]= Lognormalvert Momente dieser speziellen "Gammaverteilung" In[352]:= xvari 10; xmittel 6; specialgammamomentvarmittel n Integratex ^ n p1mod2x, x, 0,, Assumptions Ren 1 Clearxmittel, xmax, xvari Out[354]= 5 3 n Gamma 18 5 Gamma 18 5 n Momente dieser speziellen Lognormalverteilung In[356]:= xvari 10; xmittel 6; speciallognormalmomentvarmittel n Integratex ^ n p2mod2x, x, 0,, Assumptions Ren 1 Clearxmittel, xmax, xvari Out[358]= 3 Log 648 23 n Log 529 324 2 23 2 1 2 Log 648 23 n Log 529 324 2 Log 648 2 23 4 Log 529 324
distributionen.nb 11 die n-ten Momente aufgetragen über n In[376]:= gammamomentsvarmittel QuietTableNspecialgammamomentvarmittel n, n, 1, 10 lognormalmomentsvarmittel QuietTableNspeciallognormalmomentvarmittel n, n, 1, 10 ShowLegend ListLogPlotgammamomentsvarmittel, lognormalmomentsvarmittel, PlotMarkers GraphicsPointSize0.02, Point0, 0, PlotStyle Red, Blue, Functionx, Ifx 0, Red, Blue, 2, "Momente der Gammavert", "Momente der Lognormalvert ", LegendPosition 0.7, 0.3, LegendPosition 0.1, 0.1, LegendShadow 0, 0, LegendSize 1.2, 0.3, LegendTextSpace 15 Out[376]= 6., 46., 429.333, 4722.67, 59 820.4, 857 426., 1.37188 10 7, 2.42366 10 8, 4.68574 10 9, 9.84005 10 10 Out[377]= 6., 46., 450.63, 5640.75, 90 221.4, 1.8439 10 6, 4.81527 10 7, 1.60679 10 9, 6.85099 10 10, 3.73252 10 12 10 12 Momente der Gammavert Momente der Lognormalvert 10 9 Out[378]= 10 6 die Differenz der n-ten Momente aufgetragen über n In[363]:= momentdiffsvarmittel Absgammamomentsvarmittel lognormalmomentsvarmittel Out[363]= 7.10543 10 15, 7.10543 10 15, 21.2963, 918.085, 30 401., 986 474., 3.44339 10 7, 1.36442 10 9, 6.38241 10 10, 3.63412 10 12
12 distributionen.nb In[364]:= ListLogPlotmomentdiffsvarmittel, PlotRange 10 ^ 16, 10 ^ 15, Filling Bottom, PlotStyle PointSizeLarge 10 8 100 Out[364]= 10 4 10 10 10 16 0 gleicher Erwartungswert und Maximum an der gleichen Stelle Verlauf In[282]:= xmittel 6; xmax 5; Plotp1mod1x, p2mod1x, x, 0, 30, PlotStyle DirectiveBlack, Thick, DirectiveGreen, Thick, PlotLegend "Gammavert", "Lognormalvert ", LegendPosition 0.2, 0.3, LegendShadow None Clearxmittel, xmax, xvari Gammavert Out[284]= Lognormalvert Momente dieser speziellen "Gammaverteilung" In[365]:= xmittel 6; xmax 5; specialgammamomentmaxmittel n Integratex ^ n p1mod1x, x, 0,, Assumptions Ren 1 Clearxmittel, xmax, xvari Out[367]= 1 Gamma6 n 120
distributionen.nb 13 Momente dieser speziellen Lognormalverteilung In[369]:= xmittel 6; xmax 5; speciallognormalmomentmaxmittel n Integratex ^ n p2mod1x, x, 0,, Assumptions Ren 1 Clearxmittel, xmax, xvari Out[371]= 5 1 3 1n n 6 1 3 n 2n die n-ten Momente aufgetragen über n In[381]:= gammamomentsmaxmittel QuietTableNspecialgammamomentmaxmittel n, n, 1, 10 lognormalmomentsmaxmittel QuietTableNspeciallognormalmomentmaxmittel n, n, 1, 10 ShowLegend ListLogPlotgammamomentsmaxmittel, lognormalmomentsmaxmittel, PlotMarkers GraphicsPointSize0.02, Point0, 0, PlotStyle Red, Blue, Functionx, Ifx 0, Red, Blue, 2, "Momente der Gammavert", "Momente der Lognormalvert ", LegendPosition 0.7, 0.3, LegendPosition 0.1, 0.1, LegendShadow 0, 0, LegendSize 1.2, 0.3, LegendTextSpace 15 Out[381]= 6., 42., 336., 3024., 30 240., 332 640., 3.99168 10 6, 5.18918 10 7, 7.26486 10 8, 1.08973 10 10 Out[382]= 6., 40.6528, 311.04, 2687.39, 26 219.9, 288 882., 3.59415 10 6, 5.04963 10 7, 8.01145 10 8, 1.43532 10 10 10 10 10 8 Momente der Gammavert Momente der Lognormalvert 10 6 Out[383]= 10 4 100 die Differenz der n-ten Momente aufgetragen über n In[384]:= momentdiffsmaxmittel Quiet TableNAbsspecialgammamomentmaxmittel n speciallognormalmomentmaxmittel n, n, 1, 10 Out[384]= 0., 1.34724, 24.96, 336.614, 4020.09, 43 758.3, 397 530., 1.3955 10 6, 7.46593 10 7, 3.45595 10 9
14 distributionen.nb In[385]:= ListLogPlotmomentdiffsmaxmittel, PlotRange 10 ^ 16, 10 ^ 15, Filling Bottom, PlotStyle PointSizeLarge 10 8 100 Out[385]= 10 4 10 10 10 16 0