Probability that a deck of cards is tampered

Sure it’ll tell you something. As you note, the odds are extremely remote, so it tells you that the overwhelming odds are that you are not dealing with a fair deck. It doesn’t tell you for certain, though.

Why does it tell you that? Even with a fair deck, I could still draw 26 black cards, followed by 25 red cards, correct?

I thought you were talking about when you drew the first 26 and they were all black, nothing about the next draws.

Yes, in real life you would feel very suspicious, I suppose that counts as telling yourself something.
Though you wouldn’t know for certain until that 27th black card is dealt, which could be the final card.

If you felt suspicious, I suppose that you are already formulating a probability that the deck is tampered.
After that, it might be that as the cards are being dealt, what probability of tampering do you find acceptable in real life? Low enough to start of with, such that it can be dismissed?
It sounds like it is the probability values that consecutive cards of the same colour are dealt.

I don’t have an answer for the OP, but I have another question that I think is related. Suppose you are given a coin, but not told whether or not it is a fair coin. You flip the coin n times, getting heads k times (and tails n-k times).

What can you say about the fairness or unfairness of the coin? Surely your estimate of the odds of the coin landing heads is k/n, but what is your confidence of the estimate?

I guess a similar question is, given n flips with k heads, what is the likelihood that it is a fair coin?

And we’re back to the question of priors. Is this a coin you got in change from the grocery store? The vast majority of those are fair, or close enough to fair that you can’t hope to tell the difference. Finding an unfair coin in your change is an extraordinarily rare occurrence. Flipping a fair coin ten times and getting all heads is also a rare occurrence… but it isn’t as rare as finding an unfair coin in your change. So even after ten flips of your coin all come up heads, the more likely possibility is still that it’s a fair coin and you’re just having weird luck.

On the other hand, if, instead of the change at the grocery store, this is a coin that someone handed you at a magicians’ convention, now the probabilities change considerably. In that setting, trick coins are much more common than they are in everyday life. Even five heads in a row might be enough to make you suspect a trick coin, there.

Assume you know nothing about the fairness or unfairness of a coin. Suppose you are working at the Coin Fairness Testing Institute and checking out a new design to validate whether it is fair or not given certain tolerances. This is just a basic stats test, isn’t it? Given a certain p value what is the chance a certain outcome is attributable or not to chance?

My intention with the gedankenexperiment was that you found a vaguely coin-shaped thing with H on one face and T on the other, discover you could flip it to show either H or T, and decided to experiment and find out if it was fair, or if it was skewed, to estimate the direction and magnitude of the skew.

Sure, that you can calculate no problem. But that’s not actually the same question that you asked before, and therein lies the rub.

But is that a fair assumption given the description in the OP? And isn’t an assumption like this essential to get a probability for the OPs scenario?

That’s why I asked the OP for answers to a set of questions. I’m not sure we can answer this without them.

@Saint_Cad and @DMC and @naita - sorry for the late reply.

As you can see, it might be simpler to just ask your climate change question.

DMC - you maybe right, I do regret asking the question. I need to think more to present the question in a statistically solvable form.

Maybe not.

I believe the other way you could get well-defined probabilities would be to use statistical methods to estimate the population of red/black cards by sampling without replacement.

I think there are different assumptions or problem statements that will lend themselves to different methods, but I’m also sure that if the problem is well-defined, the probability distribution is also well-defined, and each card drawn provides information to refine that distribution.

Without replacement becomes fairly trivial, it’s pretty much just counting. You either count the cards as they come out, and find that there are more than 26 black cards, or you get to the end of the deck and find that there are an even number. You will get that information or get to the end of the deck before you have any sort of highly correlated information about the probabilities of the cards.

am77494, Can we rephrase the question this way to answer your question?
You want to see if an urn of marbles (to avoid the duplicate card issue as indicated above and just focusing on the color) is fair with 26 red marbles and 26 black marbles. Your strategy is as follows:
Pick one marble without looking in the urn.
Record red or black and set the marble aside.
Keep a running total that there are no more than 26 of either color. The 52 total marbles is a known quantity.
Lather, rinse, repeat until all 52 marbles are examined.

Unbeknownst to you, someone made the urn unfair by substituting a red marble with a black one. The question is given n draws, what is the probability that on the nth draw (and not before) you realize the urn is unfair which in this scenario means the probability the nth draw is the 27th black marble.

No, this is the claim that I dispute.

As soon as you’ve drawn a single card, you have information about the state of the deck. It’s not 100% certain information, but it is information, and it informs the probabilistic estimate.

This is really easy to see with a simplified case. Imagine you have just a 2-card deck, and the deck might be evenly divided between red and black cards or it might be 2 red cards.

If you draw a single red card, you are more likely in the universe with the all-red card deck.

Another way to think about it is to think about how many flips of a not-fair coin would it take to reach a specific confidence interval that the coin is not-fair. There is a defined statistical answer to this question (I’m not sure what it is, but I know it exists). If we take the claim that it’s impossible to make any kind of probabilistic claims about the deck of cards until certainty is reached by drawing all the red or black cards, then that would imply that it’s never possible to make probabilistic claims about whether the coin is fair.

After all, there’s no total number of flips that can be reached. You can always flip the coin more times. If you’ve done 100,000 flips and the coin came up heads 60% of the time, it’s possible (though absurdly unlikely) that if you do 100,000 more, it’ll balance out.

This isn’t a paradox. Every flip of the coin gives you some information about its bias, just as every card drawn from the deck gives you some information about its bias.

I think that 27/52 is so lightly biased that you would have no significant evidence for bias until that 27th black card showed up and prove it.

And 27/52 of the time that will be the last card, right?

So i think… crudely approximating

1/2 the time the 27th black will be the last card
1/4 the time the 27th black will be the 51st card
1/8 the time the 27th black will be the 50th

This is very close to right but it can be calculated exactly

The easiest way to think about this, is to note that what will let you know that the deck has been tampered with is when you run out out black cards and only red ones are left So the question of how likely you are to have all of the black cards in the first N, is the same as the probability that cards N+1 … 52 are all red.

The most straight forward way of computing that is to start counting backwards and work out the probability of getting a red streak of a given length at the end

As the OP said the probability of knowing by the last card is 100%.
by 51 cards (means the last card is red) the probability is 25/52
by 50 cards (meaning the last 2 cards is red) the probability the probability will be (25/52)x(24/51) (after drawing the first red card, 24 of the 51 remaining cards are red)
by 48 cards you get (25/52)x(24/51)x(23/50)
by 47 cards you get (25/52)x(24/51)x(23/50)x(22/49)

and so on…

Sounds very similar to Post 34

Here is my thought. The question can be restated as: given that you have drawn n cards what is the probability that the rest are red? After n cards and assuming the last one is the 27th black, there are n-27 red cards showing so 25 - (n - 27) = 52 - n red cards left. So for example the 30th card is the last black so we have 27 black, 3 red with 22 red cards left.

I believe this means that that works out to (looking at the stack of red cards at the bottom) is the permutation P(25, 52-n) so to answer the OP the probability is P(25, 52 -n) ÷ 52! but I need to think about that a bit.

I’m not saying that you cannot assume a bit of a probability, I’m just saying that you will not have a high confidence in this prediction.

Yes, you are somewhat more likely to have two red cards in the deck. The probability that the next card drawn being red is 66%.

I’m not disputing this, what I am disputing is that 66% is a high enough probability to actually put any real significance on. In physics, the standard is one in a million or so before it starts become a “real” result.

As you add more cards, that relationship only gets weaker.

So, the probability is correlated, it just isn’t highly correlated.

See, the coin flip case as you are using now is like the replacement method of drawing cards.

I did not claim that it’s impossible to make any sort of probabilistic claims about the deck of cards until certainty is reached by drawing all the red or black cards, I said that you do not have a very strong probability, and that you will have actually drawn all the cards before you do.

If that was my claim, then the replacement method that I recommended would not work either.

Right, and that’s why replacement makes more sense. You can always draw more cards if you replace them, to get a better sample size to get your probability. If you do not replace them, then the sample size just isn’t big enough, and you will run out of cards before it is.

I didn’t say it’s a paradox at all. I just said that only drawing 52 cards isn’t a large enough sample size to say with any sort of real certainty, what the distribution of cards is. You will count the number of cards of each color before you get that sample size.

Put it this way, you have drawn 51 cards, and 26 were red, 25 were black. The difference between the two decks is pretty small, so assuming that you chose between a biased deck and a straight deck at random in the first place, your chances that the last card is red vs black is only biased by a couple percent, at most.