P(A) =

P(B|A) =

P(B|noA) =

Ver con enteros

N =

a = 0.006 (slider from 0 to 1, step 0.001)
ba = 0.995 (slider from 0 to 1, step 0.001)
CasillaDeEntradaA = Textfield(a)
CasillaDeEntradaBA = Textfield(ba)
bnoa = 0.01 (slider from 0 to 1, step 0.001)
CasillaDeEntradaBnoA = Textfield(bnoa)
A = (-3, 1)
b: y = y(A)
B = (0.14, 3.38)
c = Segment(A, B)
d: y = y(B)
C = (4.12, 4.56)
e = Segment(B, C)
B'_3 = Mirror(B, d)
C' = Mirror(C, d)
e' = Segment(B'_3, C')
A' = Mirror(A, b)
B'_1 = Mirror(B, b)
c' = Segment(A', B'_1)
B'_2 = Mirror(B, b)
C''' = Mirror(C, b)
e'_1 = Segment(B'_2, C''')
B' = Mirror(B, b)
C'' = Mirror(C', b)
e'' = Segment(B', C'')
MA = Midpoint(c)
MAB = Midpoint(e)
MAB' = Midpoint(e')
MA' = Midpoint(c')
MA'B = Midpoint(e'')
MA'B' = Midpoint(e'_1)
textoPA: "" + a + ""
textoPAB: "" + ba + ""
textoPAB': "" + (1 - ba)
textoPA'B': "" + (1 - bnoa)
textoPA'B: "" + bnoa
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 B) =" + (LaTeX[1 - a]) + "·" + (LaTeX[bnoa]) + "=" + (LaTeX[((1 - a) * bnoa)]) + ""
textoPA'yB': "P(\bar{A} \cap \bar{B}) =" + (LaTeX[1 - a]) + "·" + (LaTeX[1 - bnoa]) + "=" + (LaTeX[((1 - a) * (1 - bnoa))]) + ""
r = 0.8 (slider from 0 to 5, step 0.1)
cA = Circle(A, r)
cB = Circle(B, r)
cB'' = Circle(B', r)
cC'' = Circle(C'', r)
cC' = Circle(C', r)
cC = Circle(C, r)
cC''' = Circle(C''', r)
f = true
n = 100000
campoDeTexto1 = Textfield(n)
textonB: "" + ((a * n))
textonB': "" + (((1 - a) * n))
textonC': "" + (((a * (1 - ba)) * n))
textonA: "" + n + ""
textonC: "" + (((a * ba) * n))
textonC''': "" + ((((1 - a) * (1 - bnoa)) * n))
textonC'': "" + ((((1 - a) * bnoa) * n))
textoPA': "" + (1 - a) + ""
textoBayes: "P(A|B)=\frac{ " + (LaTeX[(a * ba)]) + "}{" + (LaTeX[(a * ba)]) + "+" + (LaTeX[(bnoa * (1 - a))]) + "}=" + (LaTeX[(a * ba / ((a * ba) + ((1 - a) * bnoa)))]) + ""
textoBayes2: "P(A|B)=\frac{ " + (LaTeX[((n * a) * ba)]) + " }{" + (LaTeX[((n * a) * ba)]) + " + " + (LaTeX[((n * (1 - a)) * bnoa)]) + "}=" + (LaTeX[(a * ba / ((a * ba) + ((1 - a) * bnoa)))]) + " "
D = (10.14, -4.56)
E: D - (1, 0)
F: D + (0, 1)
g = Ray(D, F)
h = Ray(D, E)
G = Point(h)
H = Point(g)
desli = 1 (slider from 0 to 1, step 0.005)
u = Vector(G, D)
I: G + (desli * u)
i = OrthogonalLine(I, u)
j = OrthogonalLine(H, g)
J = Intersect(i, j)
polígono1, j_1, h_1, d_1, i_1 = Polygon(J, H, D, I)