3.1 Taking a chance
Calculating the sizes of sets lets you reason about chances. For example, if a card is picked at random from the pack (that is, any card is as likely to picked as any other), what are the chances that it will be a picture card that is not a heart?
There are 9 picture cards that are not hearts, and 52 cards altogether. Therefore, the chances are 9/52.
For comparing different probabilities with one another, it is very useful to express them as percentages. Here is how to express 9/52 as a percentage using the Python shell.
First, work out 9/52.
Then multiply it by 100, to make it into a percentage.
Finally, round it. One decimal place seems sensible.
>>> round(_, 1)
So, the chances are 17.3%.
Now try this for yourself in the next activity.
Activity 4 Quick on the draw
A playing card is drawn at random from a full pack. Use the Python console to work out the chances that it will be:
- A heart, but not a picture card.
- Neither a heart nor a picture card.
- Not a picture card.
A heart, but not a picture card: (13 – 3)/52 = 10/52 = 19.2%.
Neither a heart nor a picture card: (52 – 22)/52 = 30/52 = 57.7%.
Not a picture card: (52 – 12)/52 = 40/52 = 76.9%.