LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Foundations of Probability in Python

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Individual probabilities
P_Red = ____
P_Red_n_Ace = ____

# Conditional probability calculation
P_Ace_given_Red = ____

print(P_Ace_given_Red)
Code bearbeiten und ausführen