Probability that a deck of cards is tampered

How much information you need before it becomes significant depends on what your priors are. It’s easy to say “this is probably a tampered deck” when tampered decks are common. It’s hard to say “this is probably a tampered deck” when tampered decks are very rare.

With a 52-card deck, while you do have some additional information after even the first draw, it’s very little information, such that your conclusion about the probability of tampering is still almost identical to your prior. That’s why we call that first card “low confidence”.

I’m assuming in this particular case, that there are two decks, one fair, one biased, 50/50 chance of picking either one.

And while I agree that the first card is low confidence, I also think that every subsequent card, until you have either revealed 27 red or gotten to the end of the deck, is also fairly low confidence.

In this case, that’s probably true, because the difference between the decks is so small.

I think we agree, then. I agree that the confidence is low. There seem to be people making the argument in this thread (and I mistakenly interpreted your post as part of them) that you have no information until the 27th red card is drawn.

Or maybe no one is actually making that argument and I’ve misinterpreted other posts as well.

This might not be the problem the OP is interested in, but it’s a problem we solve…

Start with @k9bfriender 's assumptions.

And for clarity let us specify that the fair deck contains 26 black cards and 26 red cards that are otherwise unmarked, and the biased deck contains 27 black cards and 25 red cards that are otherwise unmarked.

If we draw, without replacement B black cards and R red cards we can calculate the probability that we are drawing from the biased deck as follows:

Let \alpha = \binom{27}{B}\binom{25}{R} and let \beta = \binom{26}{B}\binom{26}{R}.

Then P(\text{biased deck}) = \frac{\alpha}{\alpha + \beta }.

Let’s explore some simple cases.

When B=R=0, P = \frac{1}{2} as expected. Likewise B=27 will yield P=1 for any reasonable choice of R.

If we draw the first card an it is red we have B=0, R=1, and P = \frac{25}{51} \approx 0.490.

Or if we draw the first card an it is black we have B=1, R=0, and P = \frac{27}{53} \approx 0.509.

The first card off the deck doesn’t move the probability needle very much either way which matches our intuition.

On the other hand say we have drawn 50 cards from the deck:

B=24, R=26, gives P = 0,
B=25, R=25, gives P = \frac{27}{79} \approx 0.342,
B=26, R=24, gives P = \frac{27}{40} = 0.675,
B=27, R=23, gives P = 1.

So even in cases where we aren’t certain there’s a fairly decent lean in one direction or the other.

For completeness let’s take a quick look at one case somewhere in the middle.

B=20, R=20, gives P = \frac{81}{172} \approx 0.471 which is a slight lean toward the fair deck but not overwhelmingly so.

I’ve been thinking about this a little more and I may have come up with a related problem that is a little closer to something that the OP might be interested in.

Suppose you have a deck with D cards that are either black or red with no other markings i.e. there are B black cards and R red cards with B+R=D. Furthermore, suppose B can have any value 0 \leq B \leq D with equal probability.

Now suppose we draw n cards from the deck without replacement and we see that of those n we have b black cards and r red cards with b+r=n. How does this new information change our guess at the likely value of B?

First let T = \sum_{i=b}^{D-r} \binom{i}{b} \binom{D-i}{r}.

Then we have the probability mass function P_B(B_i) = \binom{B_i}{b} \binom{D-B_i}{r} / T.

Which gives the expectation E(B) = \sum_{B_i=b}^{D-r} B_i \cdot P_B(B_i).

What does this mean? Let’s work through an example.

Suppose we have a 52 card deck and we have exposed the first 40 cards which revealed 25 black cards and 15 red cards. This means D=52, b=25, r=15. With this information, what is our estimate for B, the number of black cards in the deck initially?

The probability mass function gives us the distribution of the possible values of B.

B_i P_B(B_i)
25 0.00007
26 0.00075
27 0.00430
28 0.01606
29 0.04365
30 0.09110
31 0.14976
32 0.19561
33 0.20172
34 0.16043
35 0.09358
36 0.03603
37 0.00694

And we have the expected value of B as E(B) \approx 32.429.

Another way to summarize this is that it’s about 50/50 whether we have B \leq 32 or B \geq 33.