A pair of Aces from Four Cards

There are four cards – ace of spades, ace of clubs, ten of spades and seven of clubs.

A♠; A♣; 10♠; 7♣

If I draw two random cards, what is the probability that I get two aces, given?
1. At least one of them is an ace
2. One card is an ace of spades

The problem can be solved in different ways, but we choose, as usual, the Bayes’ rule.

At least one of them is an ace

\\ P(AA|A_{At1}) = \frac{P(A_{At1}|AA) * P(AA)}{P(A_{At1}|AA) * P(AA) + P(A_{At1}|AA^n)* P(AA^n)}

Estimating each parameter:
Probability of at least one Ace, given two aces, P(AAt1|AA) = 1
Probability of picking two aces, P(AA) = 1/6 (there are six ways of arranging four cards into pairs)
Probability of at least one Ace, given NOT two aces, P(AAt1|AAn) = 4/5
Probability of NOT picking two aces, P(AAn) = 5/6 [P(AA) + P(AAn) = 1]
Substituting the values,

\\ P(AA|A_{At1}) = \frac{1/6}{1/6 + (4/5)*(5/6)} = \frac{1}{1+4} = \frac{1}{5}

One card is an ace of spades

\\ P(AA|A_{Asp}) = \frac{P(A_{Asp}|AA) * P(AA)}{P(A_{Asp}|AA) * P(AA) + P(A_{Asp}|AA^n)* P(AA^n)}

Probability of Ace of Spades, given two aces, P(AAsp|AA) = 1
Probability of picking two aces, P(AA) = 1/6 (there are six ways of arranging four cards into pairs)
Probability of Ace of Spades, given NOT two aces, P(AAsp|AAn) = 2/5
Probability of NOT picking two aces, P(AAn) = 5/6 [P(AA) + P(AAn) = 1]
Substituting the values,

\\ P(AA|A_{Asp}) = \frac{1/6}{1/6 + (2/5)*(5/6)} = \frac{1}{1+2} = \frac{1}{3}

R Simulation

cards <- c("Ace of Spades", "Ace of Clubs", "Ten of Spades", "Seven of Clubs")

itr <- 100000

shuff <- replicate(itr, {
draw <- sample(cards, 2, replace = FALSE, prob = rep(1/4, 4)) 

if(any(str_detect(draw, "Ace of Spades"))) {
  if(all(str_detect(draw, "Ace"))){counter <- "A"}
  else{counter <- "B"}
}
else{counter <- "C"}
})

sum(shuff == "A") / (sum(shuff == "A") + sum(shuff == "B"))