Cards game and probabilities

Solution 1:

1) The card we pick is 4:

How many permutations (ordered pairs) satisfying the criteria (one is 4, the other is black) do we have? We can divde them into two distinct groups:

First group: one card is a black card that is not 4, the other card is 4. There are 24 black cards that are not 4 and each one can be combined with four different 4s. There are $24\times4=96$ ordered pairs starting with a black card that is not 4 and 96 ordered pairs starting with 4.

Second group: one card is a black 4 and the other card is any other 4. Basically, all ordered pairs of 4s are valid (and we have $4\times3=12$ of them) except 2 ordered pairs of red 4s. The total number of odrered pairs satisfying the criteria for the second group is $12-2=10$

So in total we have $2\times96+10=202$ ordered pairs. There are 96 ordered pairs from the first group starting with 4 and 10 ordered pairs also starting with 4. All ordered pairs are equally possible so the probability that your first card is 4 is:

$$\frac{96+10}{2\times96+10}=\frac{106}{202}=\frac{53}{101}\approx0.524752$$

I did a Monte Carlo simulation with 20.000.000+ draws satisfying the conditions of the problem and got 0.524895 which is within 0.03% from the calculated value. The value $\frac{11}{21}\approx0.523810$ obtained by @drhab is obviously not a better match.

2) The card we pick is black:

Again, we have two groups of ordered pairs and we already calculated that the total number is 202.

First group: one card is a black card that is not 4 (24 possibilities), the other card is 4 (4 possibilities, 2 of them black). How many ordered pairs start with a black card? There are $24\times4=96$ ordered pairs starting with a black card that is not 4, plus $2\times24=48$ ordered pairs starting with a black 4. In total, we have $96+48=144$ ordered pairs starting with a black card.

Second group: one card is a black 4, the other card is any other 4. How many ordered pairs start with a black card? There are two black fours and the second card can be any of the remaining three. So in total there are $2\times3=6$ ordered pairs starting with a black card.

Taking both groups into the account there are $144+6=150$ ordered pairs starting with a black card, so the probability is:

$$\frac{150}{202}=\frac{75}{101}\approx0.742574$$

I did a Monte Carlo simulation with 25.000.000+ draws satisfying the conditions of the problem and got 0.74254516.

3) The card we pick is a face card:

This is the easiest case.

First group: one card is a black card that is not 4 (24 possibilities), the other card is 4 (4 possibilities, 2 of them black). There are 6 black face cards (J,Q,K) so in total we have $6\times4=24$ ordered pairs starting with a face card.

Second group: one card is a black 4, the other card is any other 4. You cannot pick a face card from any ordered pair belonging to this group.

Taking both groups into account, you have only $24$ ordered pairs starting with a face card so the probability is:

$$\frac{24}{202}=\frac{12}{101}\approx0.118881$$

I did a Monte Carlo simulation with 10.000.000+ draws satisfying the conditions of the problem and got 0.11883492.

If you are interested in Monte Carlo, here is the Java code that I used:

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

class Card {
    public int suite; // 0,1 => black, 2,3 => red
    public int value; // from 2 to 14

    public Card(int suite, int value) {
        super();
        this.suite = suite;
        this.value = value;
    }

    public boolean isFour() {
        return value == 4;
    }

    public boolean isBlack() {
        return suite < 2;
    }

    public boolean isFaceCard() {
        return value >= 12 && value <= 14;
    }
}

class Deck {
    private List<Card> cards = new ArrayList<>();
    private Card c1, c2;

    public Deck() {
        for(int value = 2; value <= 14; value++) {
            for(int suite = 0; suite <= 3; suite++) {
                cards.add(new Card(suite, value));
            }
        } 
    }

    public void drawOneBlackAndOneFour() {
        Random rnd = new Random();
        Collections.shuffle(cards, rnd);
        while(true) {
            int i = rnd.nextInt(52);
            c1 = cards.get(i); 
            while(true) {
                int j = rnd.nextInt(52);
                if(i != j) {
                    c2 = cards.get(j);
                    break;
                }
            }
            if(c1.isBlack() && c2.isFour()) {
                break;
            }
            if(c2.isBlack() && c1.isFour()) {
                break;
            }
        }
    }

    public boolean isFirstCardFour() {
        return c1.isFour();
    }

    public boolean isFirstCardBlack() {
        return c1.isBlack();
    }

    public boolean isFirstCardFaceCard() {
        return c1.isFaceCard(); 
    }
}

public class Test {
    public static void main(String[] args) {
        Deck deck = new Deck();
        int ok = 0, total = 0;
        while(true) {
            total++;
            deck.drawOneBlackAndOneFour();
            if(deck.isFirstCardBlack()) {
                ok++;
            }
            System.out.println(String.format("%d/%d = %.8f", ok, total, (double)ok/(double)total)); 
        }
    }
}

Solution 2:

In this answer I preassume that "one is black" stands for "at least one is black".

1)

This question can be rephrased as: "if we take out randomly one by one two cards without replacement then - if one of the cards taken out appears to be black and the other a $4$ - what is the probability that the first card taken out is a $4$.

Let $E$ denote the event that the first drawn card is a $4$.

Let $A$ denote the event that two $4$'s are drawn of different color.

Let $B$ denote the event that two black $4$'s are drawn.

Let $C$ denote the event that a black card that is not a $4$ is drawn and a $4$.

Then:$$P\left(E\mid A\cup B\cup C\right)=\frac{P\left(E\cap A\right)+P\left(E\cap B\right)+P\left(E\cap C\right)}{P(A)+P\left(B\right)+P\left(C\right)}=$$$$=\frac{4\cdot2+2\cdot1+4\cdot25}{4\cdot2+2\cdot1+2\cdot4\cdot25}=\frac{11}{21}$$


Edit:

The comment of Oldboy (thank you) on this stimulated me to have a second look and I found a mistake in my answer (my apologies for that) The $25$ must be (of course) $24$ (the number of black cards that are not a $4$). This leads to the outcome:$$\frac{4\cdot2+2\cdot1+4\cdot24}{4\cdot2+2\cdot1+2\cdot4\cdot24}=\frac{106}{202}=\frac{53}{101}\approx0.524752475$$

This agrees with the outcome of Oldboy.

To make things a bit more clear:

$$P\left(\text{one black and other }4\right)=$$$$P\left(2\text{ black }4\text{'s}\right)+P\left(\text{black }4\text{ and red }4\right)+P\left(\text{one }4\text{ and one black that is not a }4\right)=$$$$\frac{2}{52}\frac{1}{51}+2\frac{2}{52}\frac{2}{51}+2\frac{4}{52}\frac{24}{51}$$

is the denominator, and:$$P\left(\text{one black and other }4\text{ and first one is a }4\right)=$$$$P\left(2\text{ black }4\text{'s}\right)+P\left(\text{black }4\text{ and red }4\right)+P\left(\text{first a }4\text{ and then a black that is not a }4\right)=$$$$\frac{2}{52}\frac{1}{51}+2\frac{2}{52}\frac{2}{51}+\frac{4}{52}\frac{24}{51}$$ is the numinator.


Edit2 (I decided to provide the other answers as well)

2)

Here the denominator is the same as in 1) and the numerator is:$$P\left(\text{one black and other }4\text{ and first one is black}\right)=$$$$P\left(\text{first a black }4\text{ then a black card or a red }4\right)+P\left(\text{first a black that is not a }4\text{ and then a }4\right)=$$$$\frac{2}{52}\frac{27}{51}+\frac{24}{52}\frac{4}{51}$$leading to probability $$\frac{150}{202}=\frac{75}{101}$$


3)

I preassume that $J,Q,K$ are face cards and the aces are not.

Here the denominator is the same as in 1) and the numerator is:$$P\left(\text{one black and other }4\text{ and first one is face}\right)=P\left(\text{first is a black face and second is a }4\right)=\frac{6}{52}\frac{4}{51}$$leading to probability:$$\frac{24}{202}=\frac{12}{101}$$