ML Interview Q Series: Probability of Drawing a Ten and Heart: A Combinatorics Approach.
Browse all the Probability Interview Questions here.
Question: You choose at random two cards from a standard deck of 52 cards. What is the probability of getting a ten and hearts?
Short Compact solution
Take the sample space to be all unordered pairs of distinct cards, which is 52 choose 2 = 1326 equally likely possibilities. Among these:
There are 1 choose 1 * 51 choose 1 = 51 ways to form a pair that includes the ten of hearts and one other card.
There are 3 choose 1 * 12 choose 1 = 36 ways to form a pair containing a ten (not hearts) and a heart (not ten).
Adding these yields 51 + 36 = 87 favorable pairs. Therefore, the probability is 87 / 1326 ≈ 0.0656.
Comprehensive Explanation
Understanding the Event “A Ten and Hearts”
The question is interpreted as the probability that, among your two randomly drawn cards, you have at least one ten and at least one heart. This includes two main cases:
One card is the ten of hearts and the other can be any of the remaining 51 cards.
One card is a heart that is not ten, and the other is a ten that is not hearts.
These two cases are disjoint (they cannot happen simultaneously in the same pair), so we can safely add their counts.
Counting the Sample Space
When drawing two distinct cards from a standard deck of 52 cards, the total number of possible unordered pairs is given by
where 52 choose 2 is 52! / (2! * 50!), which equals 1326. This forms the denominator for our probability computation.
Counting the Favorable Cases
Case 1: The pair contains the ten of hearts. There is exactly 1 way to choose the ten of hearts itself (from the single card that is the ten of hearts) and 51 ways to choose the other card from the remaining 51 cards. Hence, there are 1 choose 1 * 51 choose 1 = 51 such pairs.
Case 2: One card is a heart that is not the ten, and the other card is a ten that is not hearts. There are 12 other hearts (excluding the ten of hearts), and 3 other tens (ten of clubs, ten of diamonds, ten of spades). Because we are looking at unordered pairs, each unique choice of one heart from those 12 and one ten from those 3 forms exactly one favorable pair. So there are 3 choose 1 * 12 choose 1 = 36 such pairs.
Summing these counts: 51 (Case 1) + 36 (Case 2) = 87.
Putting It All Together
The probability is the ratio of favorable outcomes (87) to the total number of outcomes (1326). Hence,
which numerically is approximately 0.0656.
Why This Works
We handle unordered pairs, so each unique pair is counted only once.
The event “ten and hearts” is most straightforwardly counted by separating into disjoint scenarios in which we avoid double counting any overlap.
An alternative method involves enumerating all ways to get at least one ten and at least one heart (including the possibility of having both in the same card) but would arrive at the same final count.
Follow-up question 1
How would the probability differ if we were considering ordered pairs (i.e., if the order in which the two cards are drawn mattered)?
When pairs are ordered, each combination of two distinct cards can appear in 2! = 2 different orders. For instance, drawing the “ten of hearts then the ace of spades” is considered a different outcome than “ace of spades then ten of hearts.” Therefore, the sample space would have 52 * 51 = 2652 equally likely outcomes (because for the first card there are 52 choices, and for the second there are 51 choices).
However, each of our favorable outcomes would also be counted twice, because if a pair (A, B) was favorable in the unordered sense, now (A, B) and (B, A) become two distinct ordered outcomes. So the ratio of favorable outcomes to total outcomes remains the same:
Total outcomes: 2652
Favorable outcomes: 87 * 2 = 174
Hence, the probability would remain 174 / 2652, which reduces to 87 / 1326, exactly the same 0.0656 in numerical value. Ordering does not change the probability, only the absolute counts in both numerator and denominator.
Follow-up question 2
What if the question was instead: “What is the probability that exactly one card is a ten and exactly one card is a heart?”
That changes the interpretation. Now we need the pair to contain exactly one ten (not two tens) and exactly one heart (not two hearts). Let’s break it down:
Exactly one card is a ten:
If you pick exactly one ten, then the other card must not be a ten.
There are 4 total tens in the deck, and 48 non-tens in the deck.
Exactly one card is a heart:
If you pick exactly one heart, then the other must not be a heart.
There are 13 hearts in the deck, and 39 non-hearts in the deck.
We want both conditions to be true simultaneously. A simpler direct approach: the pair should have one ten that is not a heart (since we can’t have both a ten and a heart in the same card if it is “exactly one ten and exactly one heart”) and one heart that is not a ten.
The number of tens that are not hearts = 3 (ten of clubs, diamonds, spades).
The number of hearts that are not ten = 12.
Each unique choice among those 3 tens and 12 hearts yields one favorable pair.
Because these are unordered pairs, 3 * 12 = 36 favorable pairs.
Now the total remains 52 choose 2 = 1326. So the probability would be 36 / 1326 = 0.0271 (approximately).
Follow-up question 3
How can we verify this probability quickly using a Monte Carlo simulation in Python?
You can simulate dealing two cards from a deck very many times (e.g., 10 million trials) and then compute the empirical frequency of drawing at least one ten and at least one heart. A simple Python snippet for demonstration:
import random
def monte_carlo_probability(num_trials=10_000_000):
ranks = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']
suits = ['H','D','C','S']
deck = [r + s for r in ranks for s in suits]
count_favorable = 0
for _ in range(num_trials):
cards = random.sample(deck, 2) # draw two distinct cards
# Check if event "at least one ten and at least one heart" occurs
has_ten = any('10' in c for c in cards)
has_heart = any('H' in c for c in cards)
if has_ten and has_heart:
count_favorable += 1
return count_favorable / num_trials
prob_estimate = monte_carlo_probability()
print(prob_estimate)
After running the above, you should find the simulated probability converging close to 0.0656 as the number of trials becomes large. This Monte Carlo approach is an excellent way to double-check analytical results, especially when the combinatorial arguments get more involved.
Below are additional follow-up questions
Follow-up question 1
What if we are told one card has already been revealed as a heart (but we do not know its rank)? Given this information, what is the conditional probability that the final two-card hand has at least one ten and at least one heart?
Answer Explanation
Scenario Setup
We have chosen two cards in total. We are told that one of the cards is revealed to be a heart, but we do not know if it is the ten of hearts or any other heart.
We want the probability that, in the final two-card hand, we have at least one ten and at least one heart, given that one revealed card is definitely a heart.
Analyzing the Conditioning Event
The conditioning event is "one of the two cards is a heart." Since we do not know which heart it is, the revealed heart can be any of the 13 hearts.
After this revelation, we still have 51 unknown cards left in the deck. Depending on the identity of the revealed heart, the pool of remaining cards changes slightly, but we can handle this systematically.
Direct Conditional Probability Approach Let A = event "the two-card hand (including the revealed card) has at least one ten and at least one heart." Let B = event "one of the two cards is a heart (the revealed one)."
We want P(A | B).
Case-by-Case
Case 1: Revealed Heart is the Ten of Hearts. The condition B in this sub-case implies the revealed card is specifically the ten of hearts. Now for the final hand to have at least one ten and at least one heart, we already have the ten of hearts fulfilling both conditions in one card. Any second card at all will ensure that there is at least one ten and at least one heart. So in this sub-case, the probability is 1.
Case 2: Revealed Heart is not the Ten of Hearts. Then we have a heart (rank not 10). We still need to ensure that overall we have "at least one ten" in the full two-card set. Because we already have a heart, the only missing condition is "at least one ten."
The number of tens remaining in the (52 - 1) = 51 unknown cards is still 4 if the revealed heart was not a ten (since none of the four tens have been used).
Probability that the second card is a ten out of the 51 unknown cards = 4/51.
Hence, in this sub-case, as soon as we pick one of those remaining tens, we achieve “at least one ten and at least one heart.” If we fail to pick a ten, we do not achieve that event. So the probability is 4/51 in this sub-case.
Weighting by the Probability of Each Sub-case
Probability that the revealed heart is the ten of hearts: 1 out of 13 hearts.
Probability that the revealed heart is a non-ten heart: 12 out of 13 hearts.
Therefore, P(A | B) = (1/13)1 + (12/13)(4/51).
That is (1/13) + (48/663) = (1/13) + (48/663). By simplifying further, you get a final numeric value around 0.115.
Potential Pitfalls
Forgetting that the revealed heart could be the ten of hearts changes the probability drastically.
Miscounting the remaining tens or hearts after one card is revealed can lead to errors.
Failing to consider the different probabilities for the sub-case in which the revealed card is the ten of hearts versus a non-ten heart.
Follow-up question 2
If we consider a scenario with replacement (i.e., after drawing the first card, we place it back and reshuffle before drawing the second), how does this affect the probability of getting at least one ten and at least one heart in the two draws?
Answer Explanation
Scenario Setup
We draw one card, record it, then put it back into the deck, reshuffle, and draw a second card. Now each draw is from a full deck of 52 cards.
The question remains: what is P(A) where A = “at least one ten and at least one heart” in these two draws (but now they are not an unordered pair, they are two independent draws with replacement).
Sample Space
We have 52 possible outcomes for the first draw, and 52 possible outcomes for the second draw, for a total of 52 * 52 = 2704 equally likely ordered outcomes.
Computing the Probability
The complement approach is often easiest: Compute 1 – [P(no tens) OR P(no hearts) appropriately].*
Alternatively, compute P(A) directly as: P(At least one ten) * P(At least one heart), which is not correct to do by straightforward multiplication because “having a ten” and “having a heart” in two draws can overlap in complicated ways. Instead, we’ll break it down carefully:
Approach A: Inclusion-Exclusion
Let T = event “at least one ten in the two draws.”
Let H = event “at least one heart in the two draws.”
Then P(A) = P(T ∩ H). By the inclusion-exclusion principle for two draws with replacement, P(T ∩ H) = P(T) + P(H) – P(T ∪ H). But we need to be methodical:
(a) P(T) = 1 – Probability(no tens in either draw). Probability(no tens in one draw) = 48/52 (because there are 48 non-ten cards in 52). Hence for two draws with replacement, Probability(no ten in either draw) = (48/52)(48/52). So P(T) = 1 – (48/52)(48/52).
(b) P(H) = 1 – Probability(no hearts in either draw). Probability(no hearts in one draw) = 39/52 (since there are 39 non-heart cards). For two draws with replacement, Probability(no hearts in either draw) = (39/52)(39/52). So P(H) = 1 – (39/52)(39/52).
(c) P(T ∪ H) = Probability(at least one ten or at least one heart). This is 1 – Probability(neither ten nor heart in either draw). The number of cards that are neither hearts nor tens is 52 – 13 hearts – 4 tens + 1 overlap if the ten of hearts was subtracted twice, so we should count carefully. Specifically:
There are 13 hearts in total, including 1 ten of hearts.
There are 4 tens in total, including that same ten of hearts.
The union of hearts and tens is 13 + 4 – 1 = 16 distinct cards.
Hence “neither a heart nor a ten” means 52 – 16 = 36 cards in the deck. Probability(neither heart nor ten in a single draw) = 36/52. For two draws with replacement, Probability(neither heart nor ten in either draw) = (36/52)(36/52). Therefore, P(T ∪ H) = 1 – (36/52)(36/52).
Finally, P(T ∩ H) = P(T) + P(H) – P(T ∪ H). Substituting the above parts yields the exact probability. You can compute that numerically.
Potential Pitfalls
Mixing up with or without replacement.
Trying to assume independence between “having a ten” and “having a heart,” which is incorrect because a single card can be both a ten and a heart.
Overcounting or undercounting the overlap of the sets in question.
Follow-up question 3
How does the probability change if we consider the deck is missing the ten of hearts? For instance, suppose someone removed the ten of hearts beforehand. Now, what is the probability of drawing at least one ten and at least one heart?
Answer Explanation
Modified Deck
The new deck has 51 cards because the ten of hearts is removed.
We still draw two distinct cards from this 51-card deck.
Sample Space
Since the deck now has 51 cards, the total number of ways to draw two distinct cards is 51 choose 2, which is 1275.
Event: at Least One Ten and at Least One Heart
With the ten of hearts gone, we can only form “ten and heart” combinations by picking from the remaining 3 tens (clubs, diamonds, spades) and the 13 hearts minus the ten of hearts, which is 12 hearts left. But we need at least one heart and at least one ten. Let's consider:
Case 1: We try to get one of those 3 remaining tens and any heart (12 possible hearts). Because the deck is now missing the ten of hearts, the combination “ten of hearts” + (some other card) no longer exists.
Number of ways to pick 1 of the 3 tens and 1 of the 12 hearts = 3 * 12 = 36.
Are there any other ways to fulfill at least one ten and at least one heart?
No, because the card that used to be both a ten and a heart has been removed. So the only way to get a ten and a heart in a two-card draw is indeed to pick from the 3 tens that remain and from the 12 hearts that remain.
So the total favorable ways = 36.
Probability Probability = 36 / 1275. Numerically, that is about 0.0282.
Potential Pitfalls
Forgetting to remove the ten of hearts from both the total deck count and from hearts/tens categories can lead to incorrect counting.
Overlooking that the removed card reduces both the heart count and the ten count by 1 (and also removes the overlap card).
Follow-up question 4
What if we are interested in a multivariate condition: the probability of drawing two cards such that you have “at least one ten,” “at least one heart,” and “at least one king” among the two cards? Is it even possible?
Answer Explanation
Immediate Observation
We want at least one ten, at least one heart, and at least one king in the same two-card hand.
Notice that a single card can be “ten of hearts” or “king of hearts” or “ten of clubs,” etc. But to satisfy all three conditions (a ten, a heart, and a king) in just two cards is actually impossible.
Even if you pick the “ten of hearts” for one card, that covers “ten” and “heart,” but you still need a “king” in just one more card. That second card cannot also be a ten or a heart if it is specifically a “king” that is not hearts (king of clubs, diamonds, spades) or “king of hearts” that simultaneously is a king and a heart. But we do not have a single card that is both a ten and a king.
Conclusion
Because the event demands “at least one ten,” “at least one heart,” and “at least one king,” we would need at least three cards to fulfill that if they are to be distinct.
So for a two-card draw, the probability is 0.
Potential Pitfalls
Overlooking that it’s impossible to cram three distinct properties (ten, heart, king) into two distinct cards, unless a single card could satisfy multiple rank categories (which it cannot, since a card can have only one rank).
Confusion arises if someone tries a naive inclusion-exclusion without recognizing the fundamental impossibility.
Follow-up question 5
Consider the event "At least one of the cards is a heart." If that event happens, we get paid $1. If at least one of the cards is a ten, we get paid an additional $2. So we can get $0 if neither event happens, $1 if only the heart event happens, $2 if only the ten event happens, or $3 if both happen. How do we compute the expected value of this payout from a single two-card draw?
Answer Explanation
Definition of the Random Variable Let X be the random variable representing the total payout. Then:
X = 3 if we have at least one heart and at least one ten,
X = 2 if we have at least one ten but no hearts,
X = 1 if we have at least one heart but no tens,
X = 0 otherwise (neither hearts nor tens).
Probabilities Let’s define events:
H = “at least one heart,”
T = “at least one ten.”
We already know how to count these events among two-card draws:
P(H) = Probability of at least one heart in two cards = 1 – Probability(no hearts) = 1 – (39 choose 2)/(52 choose 2).
P(T) = Probability of at least one ten in two cards = 1 – (48 choose 2)/(52 choose 2).
P(H ∩ T) = Probability of at least one heart and at least one ten = 87/1326 (from the original solution).
We can also find P(neither H nor T) = Probability that the two-card hand has no hearts and no tens. The number of such cards is 52 – 13 hearts – 4 tens + 1 overlap (the ten of hearts) = 36 (since we do not double-count the ten of hearts). Then the number of ways to pick 2 from those 36 is 36 choose 2 = 630, so P(neither H nor T) = 630/1326.
Expected Value Computation We can express X in terms of events: E[X] = 3 * P(H ∩ T) + 2 * P(T \ H) + 1 * P(H \ T) + 0 * P(neither H nor T).
We know P(H ∩ T) = 87/1326.
P(H \ T) = P(H) – P(H ∩ T).
P(T \ H) = P(T) – P(H ∩ T).
P(neither H nor T) is 630/1326.
After you substitute the numeric values, you get a precise fraction. This sum is the expected payout for a single two-card draw under those payoff rules.
Potential Pitfalls
Forgetting to add the overlap to get the $3 payout.
Mixing up disjoint events in the payoff structure.
Failing to handle the overlap event properly when computing probabilities.
Follow-up question 6
If we extend the draw to three cards (without replacement) from the same 52-card deck, what is the probability of getting at least one ten and at least one heart now? How would you approach this?
Answer Explanation
Scenario Setup
We now draw 3 distinct cards from the 52-card deck.
We want P(A) where A = “at least one ten and at least one heart in the three-card hand.”
Sample Space
The total number of ways to choose 3 distinct cards from 52 is 52 choose 3.
Counting Favorable Cases Use the complement approach:
Probability of A = 1 – Probability(A^c).
A^c = “no tens” OR “no hearts” in the three-card hand. However, that’s not quite correct as a direct union: we want “(no tens) or (no hearts).” So we apply inclusion-exclusion.
(a) Probability(no tens) = (48 choose 3)/(52 choose 3). (Because there are 48 non-ten cards in the deck.) (b) Probability(no hearts) = (39 choose 3)/(52 choose 3). (Because there are 39 non-heart cards.) (c) Probability(no tens AND no hearts) = (52 – 4 tens – 13 hearts + 1 overlap) choose 3 = 36 choose 3 all over 52 choose 3. 36 is the count of cards that are neither hearts nor tens.
Then, by inclusion-exclusion, Probability(A^c) = Probability(no tens) + Probability(no hearts) – Probability(no tens AND no hearts).
Finally, P(A) = 1 – Probability(A^c).
Potential Pitfalls
Failing to carefully handle the overlap card (the ten of hearts) in the count of “not a ten and not a heart.”
Using 48 for non-ten and 39 for non-heart but forgetting that “neither ten nor heart” is not simply 48 + 39. The correct approach is 52 – (13 + 4 – 1) = 36.
Accidentally attempting to multiply probabilities that are not independent.