Created
August 18, 2011 15:08
-
-
Save milktrader/1154255 to your computer and use it in GitHub Desktop.
answer to Get Used To It
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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