Lösungen/Solutions/F2S1Ue/Ex9

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

<< Statistics`DescriptiveStatistics`;
<< Statistics`DataManipulation`;
<< Graphics`Graphics`;

Ueb/Ex 1

tA = Range[0, 4]

tB = Range[1, 10]

tC = Range[1, 50]

tD = Range[1, 100]

\(\(\(tE = 
      Range[1, 1000]\)\(;\)\(\ \ \)\( (*\ \(\(\(";"\ !!\)!!\)!!\)\ *) \)\)\)

tF = Table[n, {n, 1, 10}, {k, 1, n}];
tF1 = Flatten[tF]

tF // TableForm

BarChart[tA];

Falsch / Faux

Frequencies[tA]

b[x_] := BarChart[Frequencies[x]];
b[tA];

b[tB];

b[tC];

b[tD];

b[tE];

b[tF1];

c[x_] := 
      Flatten[{LocationReport[x], DispersionReport[x]}] // N

c[tA]

sDr = 1.5811388300841898/4

c[tB]

sDr = 3.0276503540974917/9

c[tC]

sDr = 14.577379737113251/49

c[tD]

sDr = 29.011491975882016/99

c[tE]

sDr = 288.8194360957494/999

c[tF1]

sDr = 2.4720661623652207/9

modus = 10

Ueb/Ex 2

m = {5, 6, 5, 7, 5, 8, 7, 9, 4, 10, 15, 18, 12, 15, 19, 20, 1, 3, 2, 4, 
        8, 6, 11,  5, 16, 17, 13, 5, 19, 4}

b[m];

c[m]

?BinCounts

bc = BinCounts[m, {0, 20, 2}]

{Length[m], Min[m], Max[m], Length[bc]}

Table[2  n - 0.5, {n, 1, 10}]

bc1 = Transpose[{bc, Table[2  n - 0.5, {n, 1, 10}]}]

BarChart[bc1];

m11 = 
      Table[Table[bc1[[i]][[2]], {k, 
            1, bc1[[i]][[1]]}], {i, 1, Length[bc1]}]

m1 = m11 // Flatten

c[m1]

Ueb/Ex 3

m = {1, 2, 3, 4}

p4 = Partition[m, 4]

P(p4)=1

p3 = 
      Flatten[Table[Partition[RotateLeft[Flatten[p4], k], 3], {k, 0, 3}], 
        1]

P(p3)=3/4

p2 = 
        Flatten[Table[
              Flatten[Table[
                  Partition[RotateLeft[p3[[u]], k], 2], {k, 0, 2}], 
                1], {u, 1, Length[p3]}], 1] // 
          Union;
p2 = Table[Union[p2[[k]]], {k, 1, Length[p2]}] // Union

P(p2)=1/2

p1 = 
      Flatten[Table[Partition[RotateLeft[Flatten[p4], k], 1], {k, 0, 3}], 1] // 
        Union

p1 = Partition[Flatten[p4], 1]

P(p1)=1/4

p0 = {"."}

P(p0)=0

pP = Union[p4, p3, p2, p1, p0]

Length[pP]

Ueb/Ex 4

?Binom*

Binomial[49, 6]

Binomial[49, 1]

(Binomial[49, 1] + Binomial[49, 2] + Binomial[49, 3])/
      Binomial[49, 6]

N[%]

Ueb/Ex 5

30 mal Geburtstag aus 365 auswählen, auf 30 Studenten verteilen 
Choisir 30 fois un anniversaire parmis 365, répartir sur 30 étudiants

a1 = 365^30

30 verschiedene Geburtstage aus 365 auswählen,auf 30 Studenten verteilen
Choisir 30 fois un anniversaire différent parmis 365, répartir sur 30 étudiants

b1 =  365!/(365 - 30)!

Mindestens zwei gleiche Geburtstage = alle minus verschiedene
Au moins deux anniversaires au même jour = tous moins ceux qui sont différents

c1 = a1 - b1

Wahrscheinlichkeit der verschiedenen = Anzahl verschiedene / alle
Probabilité de coux qui sont différents = nembre de coux qui sont différents / tous

p = c1/a1  // N

Vergleich / Pour comparer

a1 = 365^5; b1 =  365!/(365 - 5)!; c1 = a1 - b1; 
    p = c1/a1  // N

Ueb/Ex 6

Am = 1^2 Pi

Ad = (7 - 2) Sqrt[2]*2 - 1*2

Atot = (7 - 2)^2

p = Ad/Atot

N[%]