## Poll

 I love math! 20 votes (46.51%) Math is great. 14 votes (32.55%) My religion is mathology. 6 votes (13.95%) Women didn't speak to me until I was 30. 2 votes (4.65%) Total eclipse reminder -- 04/08/2024 12 votes (27.9%) I steal cutlery from restaurants. 3 votes (6.97%) I should just say what's on my mind. 6 votes (13.95%) Who makes up these awful names for pandas? 5 votes (11.62%) I like to touch my face. 12 votes (27.9%) Pork chops and apple sauce. 9 votes (20.93%)

43 members have voted

Ace2 Joined: Oct 2, 2017
• Posts: 2315
January 25th, 2022 at 9:50:11 AM permalink
Henry and Tom decide to bet on a coin flip. Henry wins on heads, Tom wins on tails.

It’s \$1 per flip and they are really bored, so they decide to do one million flips. At the end of the session, the loser will write a check to the winner for the final balance.

What is the expected value and standard deviation of the check amount ?
It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 5675
January 25th, 2022 at 10:51:19 AM permalink
Quote: Ace2

Henry and Tom decide to bet on a coin flip. Henry wins on heads, Tom wins on tails.

It’s \$1 per flip and they are really bored, so they decide to do one million flips. At the end of the session, the loser will write a check to the winner for the final balance.

What is the expected value and standard deviation of the check amount ?

The expected value is zero
Variance =
2 x C(1,000,000, 0) x 1 / 2^1,000,000 x 1,000,000^2
+ 2 x C(1,000,000, 1) x 1 / 2^1,000,000 x 999,998^2
+ 2 x C(1,000,000, 2) x 1 / 2^1,000,000 x 999,996^2
+ ...
+ 2 x C(1,000,000, 499,999) x 1 / 2^1,000,000 x 2^2
= 8 / 2^1,000,000 x (
C(1,000,000, 0) x 500,000^2
+ C(1,000,000, 1) x 499,999^2
+ ...
+ C(1,000,000, 499,999) x 1^2
)
= 1 / 2^999,997 x (
C(1,000,000, 0) x 500,000^2
+ C(1,000,000, 1) x 499,999^2
+ ...
+ C(1,000,000, 499,999) x 1^2
)

My computer claims the result is exactly 1,000,000; I'll have to see if I can compute that manually
Anyway, the SD = sqrt(variance) = 1000

Expected Value = 0; SD = \$1000
Ace2 Joined: Oct 2, 2017
• Posts: 2315
January 25th, 2022 at 11:18:47 AM permalink
Quote: ThatDonGuy

Quote: Ace2

Henry and Tom decide to bet on a coin flip. Henry wins on heads, Tom wins on tails.

It’s \$1 per flip and they are really bored, so they decide to do one million flips. At the end of the session, the loser will write a check to the winner for the final balance.

What is the expected value and standard deviation of the check amount ?

The expected value is zero
Variance =
2 x C(1,000,000, 0) x 1 / 2^1,000,000 x 1,000,000^2
+ 2 x C(1,000,000, 1) x 1 / 2^1,000,000 x 999,998^2
+ 2 x C(1,000,000, 2) x 1 / 2^1,000,000 x 999,996^2
+ ...
+ 2 x C(1,000,000, 499,999) x 1 / 2^1,000,000 x 2^2
= 8 / 2^1,000,000 x (
C(1,000,000, 0) x 500,000^2
+ C(1,000,000, 1) x 499,999^2
+ ...
+ C(1,000,000, 499,999) x 1^2
)
= 1 / 2^999,997 x (
C(1,000,000, 0) x 500,000^2
+ C(1,000,000, 1) x 499,999^2
+ ...
+ C(1,000,000, 499,999) x 1^2
)

My computer claims the result is exactly 1,000,000; I'll have to see if I can compute that manually
Anyway, the SD = sqrt(variance) = 1000

Expected Value = 0; SD = \$1000

I disagree.

If, for instance, they flipped three times, then there is a 2/8 chance of a \$3 check and a 6/8 chance of a \$1 check going either way, for an expected check amount of \$1.50.

Yes it’s true than both players have an expected gain/loss of zero (1/8 * 3 + 3/8 * 1 - 3/8 * 1 + 1/8 * 3), but that’s not what’s being asked. Looking for the expected settlement amount.

Also disagree on standard deviation
It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 5675
January 25th, 2022 at 11:26:56 AM permalink
Quote: Ace2

Quote: ThatDonGuy

Quote: Ace2

Henry and Tom decide to bet on a coin flip. Henry wins on heads, Tom wins on tails.

It’s \$1 per flip and they are really bored, so they decide to do one million flips. At the end of the session, the loser will write a check to the winner for the final balance.

What is the expected value and standard deviation of the check amount ?

The expected value is zero
Variance =
2 x C(1,000,000, 0) x 1 / 2^1,000,000 x 1,000,000^2
+ 2 x C(1,000,000, 1) x 1 / 2^1,000,000 x 999,998^2
+ 2 x C(1,000,000, 2) x 1 / 2^1,000,000 x 999,996^2
+ ...
+ 2 x C(1,000,000, 499,999) x 1 / 2^1,000,000 x 2^2
= 8 / 2^1,000,000 x (
C(1,000,000, 0) x 500,000^2
+ C(1,000,000, 1) x 499,999^2
+ ...
+ C(1,000,000, 499,999) x 1^2
)
= 1 / 2^999,997 x (
C(1,000,000, 0) x 500,000^2
+ C(1,000,000, 1) x 499,999^2
+ ...
+ C(1,000,000, 499,999) x 1^2
)

My computer claims the result is exactly 1,000,000; I'll have to see if I can compute that manually
Anyway, the SD = sqrt(variance) = 1000

Expected Value = 0; SD = \$1000

I disagree.

If, for instance, they flipped three times, then there is a 2/8 chance of a \$3 check and a 6/8 chance of a \$1 check going either way, for an expected check amount of \$1.50.

Yes it’s true than both players have an expected gain/loss of zero (1/8 * 3 + 3/8 * 1 - 3/8 * 1 + 1/8 * 3), but that’s not what’s being asked. Looking for the expected settlement amount.

Also disagree on standard deviation

Understood. You want the mean and the SD of the value of the check, regardless of which player pays it to the other.

For the mean, I get about 797.884361. I do have an exact answer, but it is a fraction with a numerator having 301,029 digits.

Because of this, calculating the SD may take a while...

Last edited by: ThatDonGuy on Jan 25, 2022
Wizard Joined: Oct 14, 2009
• Posts: 25269
January 25th, 2022 at 12:59:40 PM permalink
797.88

Based on the method in that solution, for n flips my estimate is 2^2*sqrt(n/4) * sqrt(2/pi).

The reason for multiplying by 2^2 is with every flip there is a change in money of \$2. We square that \$2 to get the variance.

Note: Answer updated 7:15 PST 1/25/22, because I didn't correctly account for \$2 difference between winning and losing for each flip.
Last edited by: Wizard on Jan 25, 2022
“Extraordinary claims require extraordinary evidence.” -- Carl Sagan
Ace2 Joined: Oct 2, 2017
• Posts: 2315
January 25th, 2022 at 2:39:56 PM permalink
Quote: ThatDonGuy

For the mean, I get about 797.884361. I do have an exact answer, but it is a fraction with a numerator having 301,029 digits.

Because of this, calculating the SD may take a while...

I agree with that answer (\$797.88) for the mean, but I’d like to see a formulaic solution for full credit. The solution can be an estimate, albeit a very accurate one (to at least five digits).

Also looking for a formulaic solution for the standard deviation of the check amount, which can also be an accurate estimate

It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 5675
January 25th, 2022 at 2:55:17 PM permalink
Quote: Ace2

Quote: ThatDonGuy

For the mean, I get about 797.884361. I do have an exact answer, but it is a fraction with a numerator having 301,029 digits.

Because of this, calculating the SD may take a while...

I agree with that answer (\$797.88) for the mean, but I’d like to see a formulaic solution for full credit. The solution can be an estimate, albeit a very accurate one (to at least five digits).

Also looking for a formulaic solution for the standard deviation of the check amount, which can also be an accurate estimate

I assume by "formulatic solution," you mean something other than the sum of:
C(1,000,000, 0) x (1/2)^1,000,000 x (1/2)^0 x 1,000,000
C(1,000,000, 1) x (1/2)^999,999 x (1/2)^1 x 999,998
C(1,000,000, 2) x (1/2)^999,998 x (1/2)^2 x 999,996
...
C(1,000,000, 499,999) x (1/2)^500,001 x (1/2)^499,999 x 2
C(1,000,000, 500,000) x (1/2)^500,000 x (1/2)^500,000 x 0
C(1,000,000, 500,001) x (1/2)^499,999 x (1/2)^500,001 x 2
...
C(1,000,000, 999,999) x (1/2)^1 x (1/2)^999,999 x 999,998
C(1,000,000, 1,000,000) x (1/2)^0 x (1/2)^1,000,000 x 1,000,000
Ace2 Joined: Oct 2, 2017
• Posts: 2315
January 25th, 2022 at 3:27:20 PM permalink
Quote: ThatDonGuy

Quote: Ace2

Quote: ThatDonGuy

For the mean, I get about 797.884361. I do have an exact answer, but it is a fraction with a numerator having 301,029 digits.

Because of this, calculating the SD may take a while...

I agree with that answer (\$797.88) for the mean, but I’d like to see a formulaic solution for full credit. The solution can be an estimate, albeit a very accurate one (to at least five digits).

Also looking for a formulaic solution for the standard deviation of the check amount, which can also be an accurate estimate

I assume by "formulatic solution," you mean something other than the sum of:
C(1,000,000, 0) x (1/2)^1,000,000 x (1/2)^0 x 1,000,000
C(1,000,000, 1) x (1/2)^999,999 x (1/2)^1 x 999,998
C(1,000,000, 2) x (1/2)^999,998 x (1/2)^2 x 999,996
...
C(1,000,000, 499,999) x (1/2)^500,001 x (1/2)^499,999 x 2
C(1,000,000, 500,000) x (1/2)^500,000 x (1/2)^500,000 x 0
C(1,000,000, 500,001) x (1/2)^499,999 x (1/2)^500,001 x 2
...
C(1,000,000, 999,999) x (1/2)^1 x (1/2)^999,999 x 999,998
C(1,000,000, 1,000,000) x (1/2)^0 x (1/2)^1,000,000 x 1,000,000

Yes. I guess I forgot that some people have software to “brute force” things of this magnitude. When I ran some tests in excel, it would not let me calculate combinations too far above 1000.
It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 5675
January 26th, 2022 at 6:38:19 AM permalink

Note that the mean is very close to sqrt(1,000,000) / sqrt(2 PI)
Change the problem so that the mean is 1 / sqrt(2 PI); the SD for 1,000,000 samples is sqrt(M (1 - M) / 1,000,000) = sqrt(M (1 - M)) / 1000
For M = 1 / sqrt(2 PI), SD = sqrt((sqrt(2 PI) - 1) / sqrt(2 PI)) / 1000 = 0.77528 / 1000
If you multiply this by 1,000,000, which is how many tosses were made, you get SD = 775.28

tuttigym Joined: Feb 12, 2010
• Posts: 1493
January 26th, 2022 at 8:21:27 AM permalink
Quote: Ace2

Henry and Tom decide to bet on a coin flip. Henry wins on heads, Tom wins on tails.

It’s \$1 per flip and they are really bored, so they decide to do one million flips. At the end of the session, the loser will write a check to the winner for the final balance.

What is the expected value and standard deviation of the check amount ?