Blue and red cards

634 Views Asked by At

Imagine that you have 10 blue cards and 10 red cards ordered in random order. And you start revealing them card by card. The first card you draw is, let's say, blue. Also the second card is blue. So you've got a group of 2 of blue cards. Then it continues a group of 3 red cards and so on. And the question is, what is the average number of cards of the same color in a group fon N - red cards and N - blue cards. Thanks for answers.

2

There are 2 best solutions below

0
On BEST ANSWER

for 2n cards, we take any card at random to see if a new sequence has started.

If we choose the first card, with probability 1/(2n), then it can be termed the start of a new sequence.

If we choose any other card, with probability 1 - 1/(2n), there is an n / (2n - 1) chance that the previous card was of the other colour (because n of the remaining 2n-1 cards are that other colour)

prob of selecting run start P = 1/(2n) + (1 - 1/(2n))(n / (2n - 1)) = 1/(2n) + ((2n - 1) /(2n))(n / (2n - 1)) = 1/(2n) + 1/2

if picking a card at random gives us 1/(2n) + 1/2 sampled are the start of a new run, then the average is 2n[1/(2n) + 1/2] = n + 1

answer E[no of runs] = n + 1

note:I'm considering a scenario where an infinite number of shuffled decks are sampled at random once only - in that case the observed probability that we see the start of a new run gives us the expected number of runs

If the expected number of runs is n+1, then I figure that the expected length of a run is 2n / (n+1)

4
On

I´ve tried to solve this question. Firstly I realized that $\frac nm$ where n is number of red or blue cards and m is the number of groups of red or blue cards. Then I tried to do the average from all the possible values of m: $$\frac{n+\frac n2+\frac n3+\frac n4...+\frac nn}{n}$$

And from it follows that the average number of cards in a group should be: $$1+\frac 12+\frac 13+\frac 14...+\frac 1n$$ which is of course the n-th harmonic number.