Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
answer to Get Used To It
prob(spx(bear), 0.308).
prob(spx(bull), 0.692).
prob(spx(down_four), 0.00242).
conprob(spx(bear) ^ spx(down_four), 0.757).
conprob(spx(bull) ^ spx(down_four), 0.243).
isprob(A,P) :-
prob(A,P), !.
isprob(A^B, P) :-
conprob(A^B, P), !.
isprob(A^B, P) :-
conprob(B^A, PBA),
isprob(A, PA),
isprob(B, PB),
P is PBA * PA / PB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment