Suppose we have 52 decks with 26 red and 26 black cards. We shuffle them at a random order. Then we define a "block" as cards with same colors, for example, BRRB has 3 blocks and BRRRBBRRRR has 4 blocks. So how many blocks we would have, in the sense of expectation?

My though is that, we set indicator function $I_i$ representing the i-th card has different colors with the card on the left of it. So $I_i=1$ if it is different, and is zero if it's same. So the final number of blocks would be equal to $\sum_{i=1}^{52}I_i$, and $E\sum_{i=1}^{52}I_i = \sum_{i=1}^{52} P(i)$, where P(i) is the probability that i-th card has different color comparing to his left one. But I got stuck at this step cuz I don't know how to calculate the probability of $i-th$ term. Is there anybody who can help me?

  • $\begingroup$ yes it is @User1865345! Thanks for showing that. But I am still wondering, why Pi = P(i-1) = ... P(1)=26/51? this is the point where I dont understand... $\endgroup$
    – Xu Shan
    Apr 18, 2023 at 10:33
  • $\begingroup$ @User1865345 That answer was essentially copied from math.stackexchange.com/questions/2763/… where other responses go into more detail $\endgroup$
    – Henry
    Apr 18, 2023 at 10:54
  • $\begingroup$ I see @Henry. Just noticed Whuber's comment. It's unethical but at least this could be used to mark the duplicate. Any further detail in the query has to be specified by OP. $\endgroup$ Apr 18, 2023 at 10:56
  • $\begingroup$ @User1865345 May I ask which comment? I suspect you might be referring to stats.stackexchange.com/questions/1865/…. My concern is that your remark "it's unethical" appears to apply to that comment, but I hope you intended it instead to apply to the behavior I was commenting about! $\endgroup$
    – whuber
    Apr 21, 2023 at 18:11
  • $\begingroup$ Of course, I was pointing at OP not explicitly citing the original post - that is unethical to me. I would even taken a copied one too if the original source was mentioned. I upvoted your comment too. I hope there is no misunderstanding. @whuber. $\endgroup$ Apr 21, 2023 at 19:44