Conversation
|
I think this was the code you were putting together to calculate ratios: zipped = zip(heads, tails)
for heads, tails in zipped:
print(heads / tails)Most of your values were returning as .9 or 1.000~ This is because most of the heads counts were nearly equal to the tails counts. Our intuition says that means that nearly half of the flips came up heads, the other half came up tails - but why is the "ratio" at 1 or .9? Because the ratio needs to be more like What the code So to do that you'd compare the amount of heads occurences vs. the total count of flips. That way you'd see values like .51 or .49 - thus saying "50% of flips came up heads" or "49% of flips came up heads". Hope this clarifies. |
Coin Flip