Theoretische Physik VI - Statistische Physik Blatt 1

<< Graphics`Graphics`

Gauss vs Binomial

n = 10; q = 0.5;

binomdiscrete=({{-2, 0}, {-1, 0}, {0, 0.0009765625`}, {1, 0.009765625`}, {2, 0.0439453125`}, {3, 0.1171875`}, {4, 0.205078125`}, {5, 0.24609375`}, {6, 0.205078125`}, {7, 0.1171875`}, {8, 0.0439453125`}, {9, 0.009765625`}, {10, 0.0009765625`}});

binom = n!/((n - k)! k!) 
          q^k (1 - q)^(n - k);

gauss = 
      1/Sqrt[2 π n q (1 - q)] 
        Exp[- (k - n q)^2/(2 n q (1 - q))]

poisson = (n q)^k/k! Exp[- n q]

DisplayTogether[
        ListPlot[binomdiscrete, PlotStyle -> {Hue[0.6]}, 
          PlotJoined -> True], 
        Plot[gauss, {k, -2, 10}, PlotStyle -> {Hue[1]}], 
        Plot[poisson, {k, -2, 10}, PlotStyle -> {Hue[0.3]}], 
        ImageSize -> 550, 
        AxesLabel -> {"k", "P(k)"}];

Blau-> Binomialverteilung (diskret, mit Geraden verbundene Punkte), Rot->Gaussverteilung, Grün->Poissonverteilung

Poisson vs Binomial

n = 10; q = 0.1;

binomdiscrete=({{-1, 0}, {0, 0.3486784401000001}, {1, 0.38742048900000015}, {2, 0.19371024450000007}, {3, 0.057395628000000025}, {4, 0.011160261000000003}});

binom = n!/((n - k)! k!) 
          q^k (1 - q)^(n - k);

gauss = 
      1/Sqrt[2 π n q (1 - q)] 
        Exp[- (k - n q)^2/(2 n q (1 - q))]

poisson = (n q)^k/k! Exp[- n q]

DisplayTogether[
        ListPlot[binomdiscrete, PlotStyle -> {Hue[0.6]}, 
          PlotJoined -> True], 
        Plot[gauss, {k, -1, 4}, PlotStyle -> {Hue[1]}], 
        Plot[poisson, {k, -1, 4}, PlotStyle -> {Hue[0.3]}], 
        ImageSize -> 550, 
        AxesLabel -> {"k", "P(k)"}];

Blau-> Binomialverteilung (diskret, mit Geraden verbundene Punkte), Rot->Gaussverteilung, Grün->Poissonverteilung

Particle in a Box Estimation

n = 1; q = 0.5;

gauss = 
      1/Sqrt[2 π n q (1 - q)] 
        Exp[- (k - n q)^2/(2 n q (1 - q))]

NIntegrate[
      1/Sqrt[2 π n q (1 - q)] 
        Exp[- (k - n q)^2/(2 n q (1 - q))], {k, 0, 
        0.5 (1 + 10^-5)}]

0.341348735491347`/6 10^-23

Plot[gauss, {k, 0, 0.5 (1 + 10^-5) 1}];