A = (0, 0)
B = (1, 0)
u = Segment(A, B)
P_1 = Point(u)
p_1: x(P_1)
g = Segment(P_1, B)
P_2 = Point(u)
p_2: x(P_2)
h = Segment(P_1, P_2)
n = 19 (slider from 10 to 100, step 1)
Lp_1OK = Sequence(BinomialDist[n, p_1, k, true], k, 0, n)
Lp_2F = Sequence(BinomialDist[n, p_2, k, true], k, 0, n)
Lp_2OK = Sequence(1 - BinomialDist[n, p_2, k, true], k, 0, n)
Lp_1F: 1 - Lp_1OK
strafe_1 = 2 (slider from 0 to 10, step 1)
strafe_2 = 20 (slider from 0 to 50, step 1)
priori_1 = 0.5 (slider from 0 to 1, step 0.1)
gewinn = Sequence((priori_1 * (Element[Lp_1OK, k] - (strafe_1 * Element[Lp_1F, k]))) + ((1 - priori_1) * (Element[Lp_2OK, k] - (strafe_2 * Element[Lp_2F, k]))), k, 1, n + 1)
maxgewinn = Max(gewinn)
maxindex = IndexOf(maxgewinn, gewinn)
gewinngraph = Sequence((k / n, Element[gewinn, k + 1]), k, 0, n)
Text1: "optimale Entscheidungsregel:
Tippe auf p_1 falls X≤ " + (maxindex - 1) + " bzw. h≤" + ((maxindex - 1) / n) + "
sonst auf p_2
Gewinnerwartung: " + maxgewinn + ""