IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Foundations of Probability in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Individual probabilities
P_Red = ____
P_Red_n_Ace = ____

# Conditional probability calculation
P_Ace_given_Red = ____

print(P_Ace_given_Red)
Modifica ed esegui il codice