P(紅球比綠球先取完且紅球比藍球先取完)

依據笛摩根定理

$=1-[  P(綠球比紅球先取完)+P(藍球比紅球先取完)-P(綠球比紅球先取完且藍球比紅球先取完)]$

=1-\left(  \frac{r}{r+g}+\frac{r}{r+b}-\frac{r}{r+g+b} \right) 

Next

Reset

=1-P(綠球比紅球先取完或藍球比紅球先取完)

紅球比綠球先取完
\cr\;\;\;\;\;\;\;\;\;\;\;\;\;⇓

紅球比藍球先取完
\cr\;\;\;\;\;\;\;\;\;\;\;\;\;⇓

\;\;\;\;\;\;\;\;⇑
\cr紅球先取完

\;\;\;\;\;\;\;\;\;\;\;\;\;\;⇑
\cr\;紅球比綠球先取完
\cr或紅球比藍球先取完

綠球比紅球先取完

藍球比紅球先取完

綠球比紅球先取完或
\cr藍球比紅球先取完

n = 0 (slider from 0 to 7, step 1)
A = Corner(4)
r = 5 (slider from 1 to 9, step 1)
g = 4 (slider from 1 to 9, step 1)
b = 3 (slider from 1 to 9, step 1)
textQ: "一個不透明的袋中有大小材質相同的" + (LaTeX[r]) + "個紅球," + (LaTeX[g]) + "個綠球," + (LaTeX[b]) + "個藍球，\;每次取出一球，\;取後不放回，\;試求紅球先取完的機率."
text6: "=1-\left(  \frac{" + (LaTeX[r]) + "}{" + (LaTeX[r + g]) + "}+\frac{" + (LaTeX[r]) + "}{" + (LaTeX[r + b]) + "}-\frac{" + (LaTeX[r]) + "}{" + (LaTeX[r + b + g]) + "}\right) "
B: (0.5 * (Corner[1] + Corner[3])) - (0, 0.85)
text7: "=" + (LaTeX[SurdText[(((g * b) * (b + g + (2 * r)))) / ((((r + g + b) * (r + b)) * (r + g)))]]) + ""
r0 = 2.4
d0: r0 / 2
C_1: B - (d0, 0)
C_2: B + (d0, 0)
c_1 = Circle(C_1, r0)
c_2 = Circle(C_2, r0)
C = Intersect(c_1, c_2, 1)
D = Intersect(c_1, c_2, 2)
c_3 = CircleArc(C_2, C, D)
c_4 = CircleArc(C_1, D, C)
list1: {c_3, c_4}
P_1 = Point(list1)
Q_1: P_1 + (0, 0)
lcs1 = Locus(Q_1, P_1)
poly1, d_2, a_1, b_2, b_3 = Polygon(B + (3.8, 2.6), B + ((-3.8), 2.6), B + ((-3.8), (-2.6)), B + (3.8, (-2.6)))
lcs2: lcs1
a = false
c = false
d = false
poly2, b_4, d_1, d_3, d_4 = Polygon(B + (3.8, 2.6), B + ((-3.8), 2.6), B + ((-3.8), (-2.6)), B + (3.8, (-2.6)))
c_{41} = Circle(C_1, r0)
poly3, a_2, b_1, a_3, a_4 = Polygon(B + (3.8, 2.6), B + ((-3.8), 2.6), B + ((-3.8), (-2.6)), B + (3.8, (-2.6)))
c_{42} = Circle(C_2, r0)