Probability of no king, queen or jack before the first ace occurs? 
A deck of cards is shuffled well. The cards are dealt one by one, until the first time an Ace appears. Find the probability that no kings, queens, or jacks appear before the first ace. (Introduction to Probability, p. 36)

My solution:


*

*Assume $k^{th}$ card is the first ace

*The possible number of hand before the first ace is then $\binom{48}{k-1}$, and the possible number of hands without a king, queen or jack before the first ace is $\binom{36}{k-1}$, so the probability is $\frac{\binom{36}{k-1}}{\binom{48}{k-1}}$.

*The probability that the first ace occurs at the $k^{th}$ position is $\frac{1}{52!} \binom{48}{k-1}(k-1)! \binom{4}{1}(52-k)!$, because there are $52!$ possible ordered decks, $\binom{48}{k-1}(k-1)!$ is the number of possibilities withouth an ace in the first $k$ cards, $\binom{4}{1}$ possibilities to draw an ace at the $k^{th}$ position and $(52-k)!$ possibilities to arrange the remaining cards in order.

*$\sum_{k=1}^{k=37} \frac{\binom{36}{k-1}}{\binom{48}{k-1}} \frac{1}{52!} \binom{48}{k-1}(k-1)! \binom{4}{1}(52-k)! = 0.25$


The computation of the above in R:
    pr <- numeric(37)
    for(k in 1:37){
      pr_ace_at_k <- 1/factorial(52)*choose(48,k-1)*factorial(k-1) * choose(4,1)*factorial(52-k)
      pr_no_before_k <- choose(36,k-1)/choose(48,k-1)
      pr[k] <- pr_no_before_k * pr_ace_at_k
    }
    sum(pr)
    > 0.25

However, a simulation yields:
    deck <- c(rep(1:4, 4), rep(5, 52-4*4))
    out <- replicate(1e6,{
      deck <- sample(deck) # shuffle deck
      k <- which(deck == 4)[1] # get index of first ace
      all(deck[1:(k-1)] == 5) # check if only rest occured before kth card
    })
    mean(out)
    > 0.173099

Is there anything wrong in my calculation? A result of 0.25 looks somehow persuasive.
EDIT
Finally, I found the nasty bug in the code. Problem was the special case when the ace occured at the first position. Corrected code would be
    deck <- c(rep(1:4, 4), rep(5, 52-4*4))
    out <- replicate(1e6,{
      deck <- sample(deck) # shuffle deck
      k <- which(deck == 4)[1] # get index of first ace
      if(k == 1) TRUE
      else all(deck[1:(k-1)] == 5)
    })
    mean(out)
    > 0.249877

 A: The easiest way to think about it is to ignore all the other cards in the deck.  Now you stack up the $16$ cards of interest. What is the chance the top one is an ace?  There are $4$ aces among the $16$, so $\frac 4{16}=\frac 14$
A: Total probability x Probability of only 1st drawing = Probability of event occuring
Total probability x (1 - Probability of another drawing) = Probability of event occuring on 1st drawing
Total probability = Probability of event occuring on 1st drawing / (1 - Probability of another drawing) = $\frac{\frac1{13}}{1-\frac9{13}}=\frac14$
A: Although it is not the simplest approach, we can use recursive conditioning, which is a useful approach in a lot of somewhat more complicated problems. 
To see the intuition, let's check the cases in words. Suppose the first card is a queen/jack/king; then you stop and it doesn't count. Suppose it's an ace; then you stop and it counts. Suppose it's neither; then you run the experiment again with 1 fewer card.
Mathematically we'll say that the desired event when starting with a $k$ card deck is $A_k$. Then we have
$$P(A_k)=P(A_k|\text{ first card is an ace })P(\text{ first card is an ace }) \\
+P(A_k|\text{ first card is queen/jack/king })P(\text{ first card is queen/jack/king })\\
+P(A_k|\text{ first card is neither })P(\text{ first card is neither }) \\
= 1 \cdot \frac{4}{k} + 0 + \frac{k-16}{k} P(A_{k-1})$$
Now take $k=52$ and solve the recurrence relation. Here the base case can be read off from the recurrence itself: we get $P(A_{16})=4/16+0+0=1/4$ for free. Here solving the recurrence proves particularly simple, because if $P(A_{k-1})=1/4$ then $P(A_k)=1/4$, since
$$\frac{4}{k} + \frac{k-16}{k} \frac{1}{4} = \frac{4}{k} + \frac{1}{4} - \frac{4}{k} = \frac{1}{4}.$$
This is an algebraic manifestation of the intuitive observation that we can "ignore all the other cards".
A: One of these $4$ sorts of cards (aces, kings, queens, jacks) will appear as the first. Each sort (also the aces) has the same probability of doing so, hence with probability $\frac{1}{4}$.
