z = 1.96
n = 25 (slider from 1 to 300, step 1)
Text1 = Text("Sicherheitswahrscheinlichkeit  95%")
b = Segment((0, 0.95), (1, 0.95))
U = Sequence(k / n - z * sqrt(k / n * (1 - k / n) / n), k, 1, n - 1)
O = Sequence(k / n + z * sqrt(k / n * (1 - k / n) / n), k, 1, n - 1)
L1 = Sequence(Segment[(Element[U, i], i / n), (Element[O, i], i / n)], i, 1, n - 1)
p = 0.3 (slider from 0.01 to 0.99, step 0.01)
a = Segment((p, 0), (p, 1))
T = Sequence(If[Element[U, i] ≤ p ≤ Element[O, i], BinomialDist[n, p, i, false], 0], i, 1, n - 1)
A: (p, If[p ≤ Element[U, 1], Sum[T] + BinomialDist[n, p, 0, false], Sum[T]])
LO = Sequence((Element[O, i], i / n), i, 1, n - 1)
LU = Sequence((Element[U, i], i / n), i, 1, n - 1)