Lösungen / Solutions

L = Lektion/ Leçon   -- Sprechstunde / heures de consultation
W = Work / Arbeit / Travail
A=Anhang/Annexe/Appendice

Ueb/Ex 1      W

q = 1 - p;
z[x_, n_, p_] := (x - n p)/Sqrt[n p (1 - p)]; 
    f[x_, n_, p_] := 
      Binomial[n, x] p^
          x (1 - p)^(n - x);
φ[z_, n_, p_] := 
        1/Sqrt[2 Pi n p (1 - p)] E^(-z^2/
                2);
showPlot[n_, p_, h_] := 
        Show[Plot[φ[z[x, n, p], n, p], {x, 0, n + 3}, 
            PlotRange -> {0, h}], 
          ListPlot[Table[{x, f[x, n, p]}, {x, 0, n}], 
            PlotStyle -> {PointSize[0.03]}, 
            PlotRange -> {0, h}]  ];
showPlot[5, 0.7, 0.5];

showPlot[10, 0.5, 0.3];

showPlot[100, 0.5, 0.1];

showPlot[1000, 0.5, 0.03];

Ueb/Ex 2      W

Remove["Global`@*"]

f[ν_, μ_, σ_] := 
        1/(σ Sqrt[2 Pi]) E^(-1/
                  2*(ν - μ)^2/σ^2);
F[x_, μ_, σ_] := 
      Evaluate[Integrate[
          f[ν, μ, σ], {ν, -Infinity, x}]]

Plot[{f[x, 40, 0.01], F[x, 40, 0.01]}, {x, 39.9, 40.1}, 
        PlotRange -> {0, 45}];

Plot[{F[x, 40, 0.01]}, {x, 39.9, 40.1}];

Ausschuss  / Rebut   ( % ) :

((1 - F[40 + 0.02, 40, 0.01])  +  
        F[40 - 0.02, 40, 0.01])

((1 - F[40 + 0.02, 40, 0.01])  +  
            F[40 - 0.02, 40, 0.01])*100 // N

Ueb/Ex 3      W

Remove["Global`@*"]

p = 0.001;  μ[n_] :=  n* p; 
f[x_, n_] := (μ[n]^x)/(x!)* 
        E^(-μ[n])

Plot[f[x, 1000], {x, 0, 2}];

f[1, 100]

Ueb/Ex 4      W

Remove["Global`@*"]

<< Statistics`DiscreteDistributions`

a

p = 0.5;
P = 
      Sum[ Binomial[100, k] (0.5)^k (1 - 0.5)^(100 - k), {k, 
          65, 100}]

b

p = 0.5;
P = 
      Sum[ Binomial[100, k] (0.5)^k (1 - 0.5)^(100 - k), {k, 
          0, 65}]

c

Binomial[100, 
        65] (0.5)^65 (1 - 0.5)^(100 - 65)

Ueb/Ex 5      W

Remove[u, v, w]

tab21 = Table[u * v, {u, 1, 6}, {v, 1, 6}] // Flatten

<< Statistics`DataManipulation`

freq = Frequencies[tab21]

newFreq = 
      Table[{freq[[n]][[2]], freq[[n]][[1]]}, {n, 1, 
          Length[freq]}]

s = 
      Sum[newFreq[[n]][[2]], {n, 1, Length[newFreq]}]

Table[
      fr[newFreq[[n]][[1]]] = newFreq[[n]][[2]], {n, 
        1, Length[newFreq]}]

Table[
      fr[newFreq[[n]][[1]]], {n, 1, Length[newFreq]}]

fr[12]

Table[
      relfr[newFreq[[n]][[1]]] = newFreq[[n]][[2]]/
          s, {n, 1, Length[newFreq]}]

N[%]

μ = 
      Sum[newFreq[[n]][[1]] * 
          relfr[newFreq[[n]][[1]]] , {n, 1, 
          Length[newFreq]}]

N[%]