P(A_1) =

P(B|A_1) =

P(B|A_3) =

Ver con enteros

N =

P(A_2)=

P(B|A_2)=

a_1 = 0.48 (slider from 0 to 1, step 0.01)
ba_1 = 0.2 (slider from 0 to 1, step 0.01)
CasillaDeEntradaA1 = Textfield(a_1)
CasillaDeEntradaBA1 = Textfield(ba_1)
ba_3 = 0.6 (slider from 0 to 1, step 0.01)
CasillaDeEntradaBA3 = Textfield(ba_3)
textoPA1: "" + a_1 + ""
textoPA1B: "" + ba_1 + ""
textoPA1B': "" + (1 - ba_1)
textoPA'B': "" + (1 - ba_3)
textoPA3B: "" + ba_3
f = true
n: 10000
campoDeTexto1 = Textfield(n)
textonA1: "" + ((a_1 * n))
textonC': "" + (((a_1 * (1 - ba_1)) * n))
textonC: "" + (((a_1 * ba_1) * n))
a_2 = 0.35 (slider from 0 to 1 - a_1, step 0.01)
CasillaDeEntradaA2 = Textfield(a_2)
textoPA2: "" + a_2 + ""
ba_2 = 0.45 (slider from 0 to 1, step 0.01)
CasillaDeEntrada1 = Textfield(ba_2)
textoPA2B: "" + ba_2 + ""
textoPA2B': "" + (1 - ba_2)
a_3: 1 - a_1 - a_2
textoPA': "" + a_3 + ""
textonA3: "" + ((a_3 * n)) + ""
textonA2: "" + ((a_2 * n)) + ""
textonC'': "" + (((a_3 * ba_3) * n)) + ""
textonC''': "" + (((a_3 * (1 - ba_3)) * n)) + ""
textonL: "" + (((a_2 * ba_2) * n))
textonL': "" + (((a_2 * (1 - ba_2)) * n))
pb: (a_1 * ba_1) + (a_2 * ba_2) + (a_3 * ba_3)
textoTotal2: "P(B)=\frac{ " + (LaTeX[((n * a_1) * ba_1)]) + "+" + (LaTeX[((n * a_2) * ba_2)]) + " +" + (LaTeX[((n * a_3) * ba_3)]) + "}{ " + (LaTeX[n]) + "}=" + (LaTeX[pb]) + " "
textoTotal1: "P(B)= " + (LaTeX[(a_1 * ba_1)]) + "+" + (LaTeX[(a_2 * ba_2)]) + "+" + (LaTeX[(a_3 * ba_3)]) + "=" + (LaTeX[pb]) + ""
texto1: "P(A_3)=" + a_3 + ""
A: (-2, -4)
B: A + (10, 0)
polígono1, g, h, i, j, C, D = Polygon(A, B, 4)
P_1: B + (0, (10 * (a_2 + a_3)))
P_2: B + (0, (10 * a_3))
Q_2: A + (0, (10 * a_3))
Q_1: A + (0, (10 * (a_2 + a_3)))
k = Segment(Q_1, P_1)
l = Segment(Q_2, P_2)
R_1: Q_1 + ((10 * ba_1), 0)
R_2: Q_2 + ((10 * ba_2), 0)
R_3: A + ((10 * ba_3), 0)
E: (x(R_1), y(C))
F: (x(R_2), y(P_1))
G: (x(R_3), y(P_2))
polígono2, d, q_1, r_1, e = Polygon(D, Q_1, R_1, E)
polígono3, q_2, f_1, r_2, q_3 = Polygon(Q_1, F, R_2, Q_2)
polígono4, a, r_3, g_1, q_4 = Polygon(A, R_3, G, Q_2)
polígono5, e_1, c, p_1, r_4 = Polygon(E, C, P_1, R_1)
polígono6, f_2, p_2, p_3, r_5 = Polygon(F, P_1, P_2, R_2)
polígono7, p_4, b, r_6, g_2 = Polygon(P_2, B, R_3, G)
textoPA1yB': "P(A_1\cap \bar{B}) = \\ = " + (LaTeX[a_1]) + "·" + (LaTeX[1 - ba_1]) + "=" + (LaTeX[(a_1 * (1 - ba_1))]) + ""
textoPA2yB: "P(A_2 \cap B) =\\=" + (LaTeX[a_2]) + "·" + (LaTeX[ba_2]) + "= " + (LaTeX[(a_2 * ba_2)]) + ""
textoPA2yB': "P(A_2 \cap \bar{B}) = \\=" + (LaTeX[a_2]) + "·" + (LaTeX[1 - ba_2]) + "= " + (LaTeX[(a_2 * (1 - ba_2))]) + ""
textoPA3yB: "P(A_3\cap B) =\\=" + (LaTeX[a_3]) + "·" + (LaTeX[ba_3]) + "=" + (LaTeX[(a_3 * ba_3)]) + ""
textoPA3yB': "P(A_3 \cap \bar{B}) =\\=" + (LaTeX[a_3]) + "·" + (LaTeX[1 - ba_3]) + "=" + (LaTeX[(a_3 * (1 - ba_3))]) + ""
texto2: "P(A_3)=" + a_3 + ""
textoPA1yB: "P(A_1∩ B) =
\\ = " + (LaTeX[a_1]) + "·" + (LaTeX[ba_1]) + "=\\= " + (LaTeX[(a_1 * ba_1)]) + ""
texto3: "P(A_1|B)=\frac{" + (LaTeX[textonC]) + " }{ " + (LaTeX[(n * pb)]) + "}=" + (LaTeX[(a_1 * ba_1 / pb)]) + ""
m = 1 (slider from 1 to 3, step 1)
texto4: "P(A_2|B)=\frac{" + (LaTeX[textonL]) + " }{ " + (LaTeX[(n * pb)]) + "}=" + (LaTeX[(a_2 * ba_2 / pb)]) + ""
texto5: "P(A_3|B)=\frac{" + (LaTeX[textonC'']) + " }{ " + (LaTeX[(n * pb)]) + "}=" + (LaTeX[(a_3 * ba_3 / pb)]) + ""
texto6: "P(A_1|B)=\frac{" + (LaTeX[(a_1 * ba_1)]) + " }{ " + (LaTeX[pb]) + "}=" + (LaTeX[(a_1 * ba_1 / pb)]) + ""
texto7: "P(A_2|B)=\frac{" + (LaTeX[(a_2 * ba_2)]) + " }{ " + (LaTeX[pb]) + "}=" + (LaTeX[(a_2 * ba_2 / pb)]) + ""
texto8: "P(A_3|B)=\frac{" + (LaTeX[(a_3 * ba_3)]) + " }{ " + (LaTeX[pb]) + "}=" + (LaTeX[(a_3 * ba_3 / pb)]) + ""