Poll

 I love math! 1 vote (12.5%) Math is fun! 1 vote (12.5%) This problem is too easy. No votes (0%) I know just enough math to get into trouble. 1 vote (12.5%) I don't understand the question No votes (0%) I simply don't know how to solve it. 1 vote (12.5%) What is the correct way to measure the penis? 1 vote (12.5%) I'm still waiting for my Fyre Island refund. 1 vote (12.5%) Total eclipse reminder 04/08/2024 5 votes (62.5%) I don't feel sorry for Saints fans. 5 votes (62.5%)

8 members have voted

Wizard
Joined: Oct 14, 2009
• Posts: 22948
January 26th, 2019 at 10:42:28 AM permalink
You have a biased coin with probability p of landing on heads. You flip it and observe the outcome. You then keep flipping it until that same outcome happens again. What is the expected total number of flips, including the first and last?

Beer to the first correct answer. However, I'm putting a 24-hour delay on Gordon, Don, and unJon. They may chime in before 24 hours if somebody else gets the correct answer and may explain why incorrect answers are wrong.

The question for the forum is which statements do you agree with?
It's not whether you win or lose; it's whether or not you had a good bet.
Lovecomps
Joined: Aug 12, 2018
• Posts: 426
January 26th, 2019 at 10:52:52 AM permalink
Regarding the poll, and speaking as a person who has no vested interest in either team, I don't feel sorry for the Saints. Bad calls (or non-calls) might not be in the rule book, but they are still a part of the game. I guess that you could just say that the Ram's victory sort of fell off of the back of a truck.
The best things in life are not free.
djtehch34t
Joined: May 7, 2016
• Posts: 44
January 26th, 2019 at 11:12:06 AM permalink
Assuming the previous approach works, the problem of finding the opposite flip seems to have a more complex answer. Then, it would be 1 + (p)/(1-p) + (1-p)/p = p(1-p) + p^2 + (1-p)^2/(p)(1-p) = (p^2 - p + 1)/(p - p^2) which is infinite at p = 0 and p = 1 and minimized at p = 1/2 for an expectation of 3, which matches the previous answer. It makes sense it's always higher, as we're more likely to have to search for the less likely side of the coin.

Edited to fix spoiler tag and fix "lower" -> "higher"
TomG
Joined: Sep 26, 2010
• Posts: 2259
January 26th, 2019 at 12:06:07 PM permalink
I scribbled some numbers on a paper, then put a few of them into a calculator and hit some buttons and came up with 2 and 5/22
ThatDonGuy
Joined: Jun 22, 2011
• Posts: 4759
January 26th, 2019 at 12:46:33 PM permalink
Quote: djtehch34t

Let the coin land on heads on the first flip. Then, the expected number of flips required to hit another heads is 1/p. Now, let the coin land on tails on the first flip. Then, the expected number of flips required to hit another tails is 1/(1-p). Summing these for the total expected number of flips is p/p + (1-p)/(1-p) = 2. Adding in the first flip yields 3 expected flips. This seems counterintuitive because for p = 0 or p = 1, we only get two flips, but it still seems to be right?

The reason you think you get 3 for p = 0 or 1 is, the expected number of flips after the first one, according to that formula, is 1/1 + 0/0. In reality, since p (or q) = 0, you disregard that case entirely, rather than bothering with the whole "what is 0/0?" problem.

RS
Joined: Feb 11, 2014
• Posts: 8623
January 26th, 2019 at 1:38:32 PM permalink
I read it as “you flip it, it lands on tails, then you flip again until it lands on tails again”, right?

P percent of the time it’ll take 1/p more flips.
Q percent of the time it’ll take 1/q more flips.

1 +
P * (1/p) +
Q * (1/q)

=

1 + P + Q

=

SOOPOO
Joined: Aug 8, 2010
• Posts: 7886
January 26th, 2019 at 1:50:41 PM permalink
Quote: Wizard

You have a biased coin with probability p of landing on heads. You flip it and observe the outcome. You then keep flipping it until that same outcome happens again. What is the expected total number of flips, including the first and last?

Can I assume the 'expected number' does not have to be an actual integer? Or do you mean if 2 is 40%, 3 is 30%, 4 is 15%, etc... the answer will be somewhere between 2 and 3, and not the mode which would be 2?

I am probably out of my league here, but also, can I assume that the answer might vary depending on p? Clearly, if the coin is biased enough that it will always land on heads the answer is obviously 2.

I"m guessing the answer is 1 +e/2. I would give my answer a .1% chance of being correct.
Actuarial
Joined: Apr 23, 2014
• Posts: 92
January 26th, 2019 at 2:22:52 PM permalink
3

1+(p/p)+((1-p)/(1-p)) = 3
djtehch34t
Joined: May 7, 2016
• Posts: 44
January 26th, 2019 at 3:36:46 PM permalink
Quote: ThatDonGuy

Quote: djtehch34t

Let the coin land on heads on the first flip. Then, the expected number of flips required to hit another heads is 1/p. Now, let the coin land on tails on the first flip. Then, the expected number of flips required to hit another tails is 1/(1-p). Summing these for the total expected number of flips is p/p + (1-p)/(1-p) = 2. Adding in the first flip yields 3 expected flips. This seems counterintuitive because for p = 0 or p = 1, we only get two flips, but it still seems to be right?

The reason you think you get 3 for p = 0 or 1 is, the expected number of flips after the first one, according to that formula, is 1/1 + 0/0. In reality, since p (or q) = 0, you disregard that case entirely, rather than bothering with the whole "what is 0/0?" problem.

I didn't mean to say we get 3 for p = 0 or 1. I was just pointing out that there's a discontinuity at p = 0, 1. My (wrong) intuition was that it would be a smooth function from 2 at 0 up to 3 at p = 1/2.
Wizard