P(A) =

P(B|A) =

P(B|noA) =

Ver con enteros

N =

A

\overline{A}

B

\overline{B}

paso = 0 (slider from 0 to 8, step 1)
n = 1000
a = 0.3 (slider from 0 to 1, step 0.001)
A = (0, 0)
r = 0.12 (slider from 0 to 0.2, step 0.01)
C: A + (a, 0)
U: C - (0, (1.5 * r))
M: C - (0, ((-1.5) * r))
ba = 0.9 (slider from 0 to 1, step 0.001)
CasillaDeEntradaA = Textfield(a)
CasillaDeEntradaBA = Textfield(ba)
bnoa = 0.75 (slider from 0 to 1, step 0.001)
CasillaDeEntradaBnoA = Textfield(bnoa)
f = false
campoDeTexto1 = Textfield(n)
textoPA: "P(A)=" + (LaTeX[a]) + ""
textoPA': "P(\bar{A})=" + (LaTeX[1 - a]) + ""
textoPAyB: "P(A \cap B)  \\ = " + (LaTeX[a]) + "· " + (LaTeX[ba]) + " \\ =" + (LaTeX[(a * ba)]) + "  "
textoPAyB': " P(A\cap \bar{B})  \\ =" + (LaTeX[a]) + " ·" + (LaTeX[1 - ba]) + "\\ =" + (LaTeX[(a * (1 - ba))]) + " "
textoPA'yB': "P(\bar{A} \cap \bar{B})  \\ =" + (LaTeX[1 - a]) + " ·" + (LaTeX[1 - bnoa]) + "\\ =" + (LaTeX[((1 - a) * (1 - bnoa))]) + "  "
textoPA'yB: "P(\overline{A}\cap B)  \\ =" + (LaTeX[1 - a]) + " ·" + (LaTeX[bnoa]) + "\\ =" + (LaTeX[((1 - a) * bnoa)]) + " "
B: A + (1, 0)
b = Segment(A, B)
c = Segment(A, C)
d = Segment(C, B)
D: A + ((a * (1 - ba)), 0)
E: C + (((1 - a) * bnoa), 0)
F: D + (0, ((-2) * r))
G: E + (0, ((-2) * r))
v = Vector(G, F)
J: A - (0, (-r))
K: B - (0, (-r))
L: C - (0, (-r))
w = Vector(J, L)
e = Vector(L, J)
g = Vector(L, K)
h = Vector(K, L)
N: B - (0, ((-1.5) * r))
O: A - (0, ((-1.5) * r))
j = Segment(U, M)
i = Segment(A, O)
k = Segment(B, N)
P = Midpoint(J, L)
Q = Midpoint(L, K)
R: D - (0, (0.7 * r))
S: E - (0, (0.7 * r))
T: C - (0, (0.7 * r))
l = Vector(R, T)
m = Vector(T, R)
p = Vector(T, S)
u = Vector(S, T)
q = Vector(F, G)
H: D + (0, ((-2.5) * r))
I: E + (0, ((-2.5) * r))
s = Segment(D, H)
t = Segment(E, I)
V = Midpoint(R, T)
W = Midpoint(T, S)
Z = Midpoint(F, G)
texto1: "P(B)=" + (LaTeX[(a * ba)]) + "+" + (LaTeX[((1 - a) * bnoa)]) + "=" + (LaTeX[(a * ba) + (bnoa * (1 - a))]) + ""
a_1 = Segment(D, E)
B2 = If(paso > 2, "" + (((a * ba) * n)), "    ")
D4: n
B3 = If(paso > 4, "" + ((((1 - a) * bnoa) * n)), "")
B4 = If(paso > 5, "" + (((a * ba) * n) + (((1 - a) * bnoa) * n)), "")
C2 = If(paso > 3, "" + (((a * (1 - ba)) * n)), "")
C3 = If(paso > 6, "" + ((((1 - a) * (1 - bnoa)) * n)), "    ")
D2 = If(paso > 0, "" + ((a * n)), "")
C4 = If(paso > 7, "" + (((a * (1 - ba)) * n) + (((1 - a) * (1 - bnoa)) * n)), "")
D3 = If(paso > 1, "" + (((1 - a) * n)), "")
textoBayes2: "P(A|B)=\frac{ " + (LaTeX[((n * a) * ba)]) + " }{ " + (LaTeX[((n * a) * ba) + ((n * (1 - a)) * bnoa)]) + "}=" + (LaTeX[(a * ba / ((a * ba) + ((1 - a) * bnoa)))]) + " "
textoBayes: "P(A|B)=\frac{ " + (LaTeX[(a * ba)]) + "}{" + (LaTeX[(a * ba) + (bnoa * (1 - a))]) + "}=" + (LaTeX[(a * ba / ((a * ba) + ((1 - a) * bnoa)))]) + ""
texto3 = TableText({{A1, B1, C1, D1}, {A2, B2, C2, D2}, {A3, B3, C3, D3}, {A4, B4, C4, D4}}, "c|_")