Ziehen mit Zurücklegen

Ziehen ohne Zurücklegen

Grundgesamtheit:

Trefferanteil i.d. Gesamtheit:

Stichprobenumfang:

p = 0.2 (slider from 0 to 1, step 0.1)
N = 50 (slider from 20 to 2000, step 10)
M: round((p * N))
n = 8 (slider from 1 to 20, step 1)
Verteilung = BinomialDist(n, p)
L = -1 (slider from -5 to 5)
O = 0.5 (slider from -5 to 5)
U: -0.07
xPunkte = Sequence((i, 0), i, 0, n)
R: n + 1
A = Point(xPunkte)
a: x(A)
bink = BinomialDist(n, p, {a})
BalkenX = Polygon({A + (0.5, 0), A + (0.5, bink), A + (-0.5, bink), A + (-0.5, 0)})
B = Point(xPunkte)
b: x(B)
xHistogramm = Sequence(i, i, a, b)
yHistogramm = Sequence(((nCr[n, i] * p^(i)) * (1 - p)^(n - i)), i, a, b)
HistogrammIntervall = BarChart(xHistogramm, yHistogramm)
xPunkteIntervall = Sequence((i, 0), i, a, b)
VerteilungIntervall = Zip(Polygon[{P + (0.5, 0), P + (0.5, h), P + (-0.5, h), P + (-0.5, 0)}], P, xPunkteIntervall, h, yHistogramm)
v: (-0.2, -0.05)
Av: A + v
Bv: B + v
Text3: "b = " + b + ""
k: a
binab = BinomialDist(n, p, Sequence[i, i, a, b])
xWerte = Sequence(i, i, 0, n)
yWerteBinomial = Sequence(((nCr[n, i] * p^(i)) * (1 - p)^(n - i)), i, 0, n)
P = 1 (slider from -5 to 5)
h = 1 (slider from -5 to 5)
werte = 1 (slider from -5 to 5)
VerteilungX = Zip(Polygon[{P + (0.5, 0), P + (0.5, h), P + (-0.5, h), P + (-0.5, 0)}], P, xPunkte, h, yWerteBinomial)
Text1: "k = " + a + ""
yWerteHypergeometrisch = Sequence((nCr[M, i] * nCr[N - M, n - i] / nCr[N, n]), i, 0, n)
VerteilungY = Zip(Polygon[{P + (0.5, 0), P + (0.5, h), P + (-0.5, h), P + (-0.5, 0)}], P, xPunkte, h, yWerteHypergeometrisch)
hypk: (nCr[M, k] * nCr[N - M, n - k] / nCr[N, n])
BalkenY = Polygon({A + (0.5, 0), A + (0.5, hypk), A + (-0.5, hypk), A + (-0.5, 0)})
c = true
d = true
Text2: "P(X = " + a + ") = " + bink + ""
Text4: "P(X = " + k + ") = " + hypk + ""