Thread Rating:

Poll

18 votes (50%)
13 votes (36.11%)
5 votes (13.88%)
2 votes (5.55%)
11 votes (30.55%)
3 votes (8.33%)
6 votes (16.66%)
5 votes (13.88%)
11 votes (30.55%)
8 votes (22.22%)

36 members have voted

Ace2
Ace2
Joined: Oct 2, 2017
  • Threads: 25
  • Posts: 1571
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
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 108
  • Posts: 5356
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 ?
link to original post




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
Ace2
Joined: Oct 2, 2017
  • Threads: 25
  • Posts: 1571
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 ?
link to original post




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

link to original post

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
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 108
  • Posts: 5356
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 ?
link to original post




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

link to original post

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
link to original post



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
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1418
  • Posts: 24200
January 25th, 2022 at 12:59:40 PM permalink
797.88



I ask a related question in Ask the Wizard #358.

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
It's not whether you win or lose; it's whether or not you had a good bet.
Ace2
Ace2
Joined: Oct 2, 2017
  • Threads: 25
  • Posts: 1571
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...


link to original post

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
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 108
  • Posts: 5356
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...


link to original post

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



link to original post


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
Ace2
Joined: Oct 2, 2017
  • Threads: 25
  • Posts: 1571
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...


link to original post

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



link to original post


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
link to original post

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
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 108
  • Posts: 5356
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
tuttigym
Joined: Feb 12, 2010
  • Threads: 10
  • Posts: 921
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 ?
link to original post


Expected value= death by sleep deprivation and kidney failure.

Standard deviation= arthritis and thumb amputation from flipping

  • Jump to: