Contingency table
The following table shows the numbers of red and black cards in a deck that are Aces and non-Aces:
| Red | Black | Total | |
|---|---|---|---|
| Ace | 2 | 2 | 4 |
| Non Ace | 24 | 24 | 48 |
| Total | 26 | 26 | 52 |
The total in the Red column is 26, which means there are 26 red cards in the deck. Of these, 2 are Aces and 24 are non-Aces. There are 52 cards in a deck. Use the values in the table to calculate some conditional probabilities.
Deze oefening maakt deel uit van de cursus
Foundations of Probability in Python
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Individual probabilities
P_Red = ____
P_Red_n_Ace = ____
# Conditional probability calculation
P_Ace_given_Red = ____
print(P_Ace_given_Red)