Init

95%-PI zeigen

p = 0.4 (slider from 0 to 1, step 0.01)
n = 100 (slider from 1 to 1000, step 1)
streck = 0.32 (slider from 0 to 2, step 0.01)
σ: sqrt(((n * p) * (1 - p)))
μ: (n * p)
links: μ - (2 * σ)
rechts: μ + (2 * σ)
A: (links, 0)
B: (rechts, 0)
h: 5
A_1: (x(A), h)
B_1: (x(B), h)
f = Segment(A, A_1)
g = Segment(B, B_1)
i = Segment(A, B)
k_i: 0
Treffer = RandomBinomial(n, p)
C: ((n * p), 0)
a = false
H_i: {}
PunktePlot = DotPlot(H_i, streck)
H_a: {}
PunktePlot_a = DotPlot(H_a, streck)
k_a: 0
Text1: "\text{Anzahl an Stichproben\!: } " + (LaTeX[k_i + k_a]) + ""
Text2: "\text{95%-PI: } [" + (LaTeX[links]) + ";" + (LaTeX[rechts]) + "]=[" + (LaTeX[ceil(links)]) + ";" + (LaTeX[floor(rechts)]) + "]\\
μ=" + (LaTeX[μ]) + ";\;\;σ=" + (LaTeX[σ]) + ""
Text3: "\text{Stichproben innerhalb des 95%-PI: }" + (LaTeX[k_i]) + "\\
\text{Stichproben außerhalb des 95%-PI: }" + (LaTeX[k_a]) + "\\" + (LaTeX[round((k_i / (k_i + k_a) * 100), 2)]) + "\text{% im PI}"