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.
Latihan ini adalah bagian dari kursus
Foundations of Probability in Python
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
# Individual probabilities
P_Red = ____
P_Red_n_Ace = ____
# Conditional probability calculation
P_Ace_given_Red = ____
print(P_Ace_given_Red)