Suppose you are taking a multiple-choice test with 4 choices for each question. In answering a question on this test, the probability that you know the answer is 0.33. If you don’t know the answer, you choose one at random. What is the probability that you knew the answer to a question, given that you answered it correctly
def bayes():
p = 0.33
q = 0.67
r = 1
return 0.33/(0.33+(0.67*0.25))# bayes theorem formula
bayes()
0.6633165829145728
Comments
Leave a comment