Lösungen / Statistik 2/01

Remove["Global`*"]

1.

<< Statistics`DiscreteDistributions`

a   Kurs / Script

b

berdist = BernoulliDistribution[0.3]

PDF[berdist, x]

f[x_] := PDF[berdist, x]; f[z]

ListPlot[Table[{x, f[x]}, {x, 0, 2}], 
        PlotStyle -> {PointSize[0.03]}];

ListPlot[Table[{x, PDF[berdist, x]}, {x, 0, 5}], 
        PlotStyle -> {PointSize[0.03]}];

c

CDF[berdist, x]

{CDF[berdist, -1], CDF[berdist, 0], CDF[berdist, 1], 
      CDF[berdist, 2]}

ListPlot[Table[{x, CDF[berdist, x]}, {x, -1, 2}], 
        PlotStyle -> {PointSize[0.03]}];

d

Mean[berdist]

Mean[BernoulliDistribution[q]]

Variance[BernoulliDistribution[0.3]]

Variance[BernoulliDistribution[q]]

StandardDeviation[BernoulliDistribution[0.3]]

StandardDeviation[BernoulliDistribution[q]]

Quantile[berdist, 0.5]

Quantile[berdist, 0]

Quantile[berdist, 0.7]

Quantile[berdist, 0.75]

Quantile[berdist, 1]

Quantile[berdist, 2]

2.

bdist = BinomialDistribution[34, 0.3]

PDF[bdist, x]

ListPlot[Table[{x, PDF[bdist, x]}, {x, 0, 34}], 
        PlotStyle -> {PointSize[0.03]}];

CDF[bdist, x]

ListPlot[Table[{x, CDF[bdist, x]}, {x, 0, 34}], 
        PlotStyle -> {PointSize[0.03]}];

Mean[bdist]

Mean[BinomialDistribution[n, p]]

Variance[bdist]

Variance[BinomialDistribution[n, p]]

StandardDeviation[bdist]

StandardDeviation[BinomialDistribution[n, p]]

Quantile[bdist, 0.5]

ExpectedValue[x^3, bdist, x]

RandomArray[bdist, {2, 3}]

3.

P = 
      Sum[ Binomial[10, k] (4/32)^k (1 - 4/32)^(10 - k), {k, 
          6, 10}]

N[%]

bdist3 = BinomialDistribution[10, 4/32]

1 - CDF[bdist3, 5]

N[%]

4.

a

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

bdist4 = BinomialDistribution[120, 0.5];
1 - CDF[bdist4, 49]

b

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

bdist4 = BinomialDistribution[120, 0.5];
CDF[bdist4, 60]

bdist4 = BinomialDistribution[120, 0.5];
CDF[bdist4, 50]

5.

P = 
      Sum[ Binomial[10, k] (5/60)^k (1 - 5/60)^(10 - k), {k, 
          0, 3}]

N[%]

bdist5 = BinomialDistribution[10, 5/60];
CDF[bdist5, 3]

N[%]

Sum[ 
        Binomial[10, k] (5/60)^k (1 - 5/60)^(10 - k), {k, 4, 
          10}] // N

Chance, dass mindestens 4 das Gerät brauchen ist klein!

Sum[ 
        Binomial[10, k] (5/60)^k (1 - 5/60)^(10 - k), {k, 0, 
          2}] // N

Sum[ 
        Binomial[10, k] (5/60)^k (1 - 5/60)^(10 - k), {k, 0, 
          1}] // N

Sum[ 
        Binomial[10, k] (5/60)^k (1 - 5/60)^(10 - k), {k, 0, 
          0}] // N

6.

Alles

a = 104.36;  Δa = 0.02;
b = 96.28;  Δb = 0.02;
γ = (52 + 12/60) Degree;  Δγ = 
      10/60 Degree;
c[a_, b_, γ_] := 
      Sqrt[a^2 + b^2 - 2 a b Cos[γ]]

c[a, b, γ]

Δc = (Abs[
                D[c[a1, b1, γ1], a1]] Δa  + 
            Abs[D[c[a1, b1, γ1], b1]] Δb  +   Abs[
                D[c[a1, 
                    b1, γ1], γ1]] Δγ) /. {a1 -> a, b1 -> b, γ1 -> γ}

Einzelteile

(Abs[D[c[a1, b1, γ1], a1]] Δa  + 
        Abs[D[c[a1, b1, γ1], b1]] Δb  +   Abs[
            D[c[a1, b1, γ1], γ1]] Δγ)

(Abs[
            D[c[a1, b1, γ1], 
              a1]] Δa ) /. {a1 -> a, 
        b1 -> b, γ1 -> γ}

(Abs[
            D[c[a1, b1, γ1], 
              b1]] Δb ) /. {a1 -> a, 
        b1 -> b, γ1 -> γ}

( 
        Abs[D[c[a1, 
                b1, γ1], γ1]] Δγ) /. {a1 -> a, b1 -> b, γ1 -> γ}

Der Hauptteil des Fehlers kommt von γ !