# Finding conditional probability of getting a number on a die and Jacks in Hand

Suppose we roll a fair six-sided die and then pick a number of cards from a well-shuffled deck equal to the number showing on the die. (For example, if the die shows 4, then we pick 4 cards.)

(a) What is the probability that the number of jacks in our hand equals 2?
(b) Conditional on knowing that the number of jacks in our hand equals 2, what is the conditional probability that the die showed the number 3?

That's the detailed question from the Midterm Review questions I am solving and here's my attempt(me and friends have conflicting answers):

(a) Let A = Get 2 or above on the die.

$P(A) = 5/6$

Let B = Get 2 Jacks after picking 2 or more (up to 6 cards)

$P(B) = C(52,2)(4/52)^2 + C(52,3)(4/52)^2(48/52) + C(52,4)(4/52)^2(48/52)^2 + C(52,5)(4/52)^2 + C(48/52)^3 + C(52,6)(4/52)^2(48/52)^4$

Now just multiply $P(A)$ and $P(B)$ to get the answer to (a)

But I think I got $P(B)$ wrong which is what I need help with.

(b) Let A = 3 on die

Let B = Get 2 Jacks

$P(A|B) = \frac{P(A\cap B)}{P(B)}$

I know that $P(A\cap B) = P(A) * P(B|A)$

But I still don't know $P(B)$ is and I am not sure if above formula is correct.

Let $N_D$ be the number you got from the die and $N_J$ the number of Jacks in your hand. In this context we have:

$$P(N_J = j) = \sum_{d = 1}^6\mathbb P(N_J = j\,|\,N_D = d)\mathbb P(N_D = d)$$

Since the die is fair: $\mathbb P(N_D = d) = 1/6$ for every $d$. To find the other probabilities all you need is the number of hands that have $d$ cards and $j$ Jacks, which is $C(4,j)\times C(52-4,d-j)$. As a consequence:

$$P(N_J = j\,|\,N_D = d) = \frac{C(4,j)\times C(52-4,d-j)}{C(52,d)}$$

To compute the probability on item (b) you can do:

$$\mathbb P(N_D = 3\,|\,N_J = 2) = \frac{\mathbb P(N_J = 2\cap N_D=3)}{\mathbb P(N_J = 2)}$$

$$\mathbb P(N_J = 2\cap N_D=3) = \mathbb P(N_J = 2\,|\,N_D = 3)\mathbb P(N_D = 3)$$

Hope this was useful.