When events are dependent, like drawing cards without replacement, the probability changes after the first event.
Example:
If you draw an Ace first, there are now 51 cards left in the deck, and only 4 of them are Kings. So, the probability of drawing a King is no longer 524​, it is now 514​
P(Ace and then King without replacement)=P(Ace)×P(King | Ace drawn)
Here, P(King | Ace drawn) represents the conditional probability, i.e., the probability of drawing a King given that an Ace has already been drawn.
P(King | Ace drawn)=Total cards - 1Number of Kings​=514​
Therefore,
P(Ace and then King without replacement)=524​×514​
In Python:
# Total number of cards in a standard deck
total_cards = 52
# Number of Aces in a standard deck
aces = 4
# Number of Kings in a standard deck
kings = 4
# Probability of drawing an Ace
probability_of_ace = aces / total_cards
# Probability of drawing a King given an Ace has been drawn
probability_of_king_given_ace_drawn = kings / (total_cards - 1)
# Probability of drawing an Ace and then drawing a King without replacement
probability_of_ace_and_king_no_replace = probability_of_ace * probability_of_king_given_ace_drawn
print(f"Probability of drawing an Ace and then a King (dependent, without replacement): {probability_of_ace_and_king_no_replace:.4f}") # Probability of drawing an Ace and then a King (dependent, without replacement): 0.0060