0
$\begingroup$

What is the expected number of coin tosses (heads comes with probability 0.5) until we get a result which is different from the first toss?

My first intuition is 3: we need to toss once, and then we have a geometric distribution with expectation of 2.

But, there are 2 possible scenarios: one scenario is when the first toss is heads and the other scenario is when the first toss is tails. So, this might suggest that the expectation is less than 3.... A bit confusing...

PMF I got: enter image description here

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ What is the pmf that you have a result which is different from the first toss? Hint: Sum both cases. $\endgroup$ Dec 11, 2021 at 10:25
  • $\begingroup$ @callculus42-I did that, and this is what I got.... but I would expect that we should get less than 3... No? What should I actually get? $\endgroup$
    – Avi Tal
    Dec 11, 2021 at 10:28
  • $\begingroup$ Sorry, but what is your pmf? $\endgroup$ Dec 11, 2021 at 10:29
  • 1
    $\begingroup$ It seems OK, if x is the total number of tosses. It's a weighted sum of conditional probabilities. According to the exercise it is $p=0.5$. $\endgroup$ Dec 11, 2021 at 10:37
  • 1
    $\begingroup$ Yes, but only if $X$ is the total number of tosses. But I'm not sure if we have to regard the first toss. $\endgroup$ Dec 11, 2021 at 10:45

2 Answers 2

2
$\begingroup$

Your intuition is right.

This because your pmf is

$$P(Y=y)=\left(\frac{1}{2} \right)^{y-1}$$

Where $y=2,3,4\dots$

This rv is $Y=X+1$ where $X$ is a geometric rv counting the trials before the first success.

Thus

$$\mathbb{E}[Y]=1/p+1=3$$

$\endgroup$
1
  • $\begingroup$ I added my reasoning for the expectation (for p being the probability of getting a head). Does this makes sense? $\endgroup$
    – Avi Tal
    Dec 11, 2021 at 10:48
1
$\begingroup$

I've used the conditional probability for this question. I hope this point of view helps.

Let $Y_k$ the number of tosses until you get a result which is different from the first toss. And $X_k$ is the random variable for the first toss. $k$ is the index for tail ($t$) or head ($h$). I make a case decision:

a) The probability to get a head at the n-th toss, given a tail has been thrown at the first toss is $P(Y_h=n|X_t=1)=p^{n-1}$.

Then $P(Y_h=n\cap X_t=1)=P(Y_h=n|X_t=1)\cdot P(X_t=1)=p^{n-1}\cdot (1-p)$

b) The probability to get a tail at the n-th toss, given a head has been thrown at the first toss is $P(Y_t=n|X_h=1)=(1-p)^{n-1}$.

Then $P(Y_t=n\cap X_h=1)=P(Y_t=n|X_h=1)\cdot P(X_h=1)=(1-p)^{n-1}\cdot p$

Finally we have to sum the two probabilities. It confirms your result and indeed the expected value is $3$, if $p=0.5$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .