We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think that I've found a bug in the logic behind this bit:
die_rolled(9, hypotheses) Out[323]: {6: 0.0, 8: 0.0, 12: 0.72553987580240009, 20: 0.15671661317331853, 22: 0.11774351102428135}
You need to reset the hypotheses, because they are being overwritten each time you roll the die, so the correct answer should be:
hypotheses = { 6: 1, 8: 1, 12:1, 20:1, 22:1 } # Normalize total_possibilities = sum(hypotheses.values()) for key, value in hypotheses.items(): hypotheses[key] = hypotheses[key]/(1.0*total_possibilities) die_rolled(9, hypotheses) {6: 0.0, 8: 0.0, 12: 0.4661016949152542, 20: 0.2796610169491526, 22: 0.25423728813559326}
Unless, I suppose, the idea is that each roll is an additional number reported so that by roll 9, you've also seen 5 and 6 as well.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think that I've found a bug in the logic behind this bit:
You need to reset the hypotheses, because they are being overwritten each time you roll the die, so the correct answer should be:
Unless, I suppose, the idea is that each roll is an additional number reported so that by roll 9, you've also seen 5 and 6 as well.
The text was updated successfully, but these errors were encountered: