## Poll

 I love math! 21 votes (46.66%) Math is great. 14 votes (31.11%) My religion is mathology. 6 votes (13.33%) Women didn't speak to me until I was 30. 2 votes (4.44%) Total eclipse reminder -- 04/08/2024 12 votes (26.66%) I steal cutlery from restaurants. 3 votes (6.66%) I should just say what's on my mind. 6 votes (13.33%) Who makes up these awful names for pandas? 5 votes (11.11%) I like to touch my face. 12 votes (26.66%) Pork chops and apple sauce. 10 votes (22.22%)

45 members have voted

GM Joined: Jun 16, 2021
• Posts: 47
January 26th, 2022 at 8:23:37 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 ?

If we use the normal approximation to the binomial distribution, we get that the expected value of the check is about sqrt(2n/π)≈0.7978845*sqrt(n) and the standard deviation is about sqrt((π-2)n/π)≈0.6028103*sqrt(n). For n=1000000, this gives expected value \$797.8845 and standard deviation \$602.8103. The values I calculated without approximation are \$797.8843 and \$602.8105.

A related question (it is easy if you look at it at the right way): show that the expected value of the check is the same for n flips and for n-1 flips, if n is even.
Ace2 Joined: Oct 2, 2017
• Posts: 2387
January 26th, 2022 at 8:44:57 AM permalink
Thanks GM, that is the correct answer for the check amount. Still reviewing your SD answer, which is very close to mine

The average check amount is (1,000,000 * 2 / π)^.5 = \$797.88

I described this method back in April (link below). At that time the Wizard’s reply was that I was “overthinking this”, but since then he published a pdf and Ask the Wizard problem using this method

The average settlement amount is a very useful number. For instance, let’s say you’re going to Vegas for the weekend and expect to play 600 blackjack hands at \$100 per hand. Your expectation is to lose \$300 +/- 2,800, but that -\$300 is basically meaningless…it’s a very long term average of results. But take \$2,800 * (2/π)^.5 to get an average settlement amount of about \$2,200 and that is much more useful information…it tells you that your result for the weekend will probably resemble something like -\$2,500 or +\$1,900. As mentioned, I originally posted about the average settlement amount earlier to get a practical figure like this
It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 5748
January 26th, 2022 at 10:51:18 AM permalink
Quote: GM

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 ?

If we use the normal approximation to the binomial distribution, we get that the expected value of the check is about sqrt(2n/π)≈0.7978845*sqrt(n) and the standard deviation is about sqrt((π-2)n/π)≈0.6028103*sqrt(n). For n=1000000, this gives expected value \$797.8845 and standard deviation \$602.8103. The values I calculated without approximation are \$797.8843 and \$602.8105.

A related question (it is easy if you look at it at the right way): show that the expected value of the check is the same for n flips and for n-1 flips, if n is even.

Shows you how much I know, at least when it comes to normal distributions.

Is there an online source that shows how you came up with those mean and SD values?
Ace2 Joined: Oct 2, 2017
• Posts: 2387
January 27th, 2022 at 4:32:26 PM permalink
Quote: ThatDonGuy

Quote: GM

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 ?

If we use the normal approximation to the binomial distribution, we get that the expected value of the check is about sqrt(2n/π)≈0.7978845*sqrt(n) and the standard deviation is about sqrt((π-2)n/π)≈0.6028103*sqrt(n). For n=1000000, this gives expected value \$797.8845 and standard deviation \$602.8103. The values I calculated without approximation are \$797.8843 and \$602.8105.

A related question (it is easy if you look at it at the right way): show that the expected value of the check is the same for n flips and for n-1 flips, if n is even.

Shows you how much I know, at least when it comes to normal distributions.

Is there an online source that shows how you came up with those mean and SD values?

The normal distribution has a height of 1/(2π)^.5 at x=0, so that’s it’s mean value. For the coin flip problem, we are only looking at one side of the distribution (since we don’t care if it’s + or -) but we are now saying that one side is the entire distribution. It still has to total 1, so the mean becomes 2 * 1/(2π)^.5 = (2/π)^.5

(2π)^.5 also appears in Stirling’s formula for factorials :
(2πn)^.5 * (n/e)^n. Probably appears in many places
Last edited by: Ace2 on Jan 27, 2022
It’s all about making that GTA
ThatDonGuy Joined: Jun 22, 2011
• Posts: 5748
January 27th, 2022 at 5:06:56 PM permalink
Quote: Ace2

Quote: ThatDonGuy

Shows you how much I know, at least when it comes to normal distributions.

Is there an online source that shows how you came up with those mean and SD values?

The normal distribution has a height of 1/(2π)^.5 at x=0, so that’s it’s mean value.

Er...huh? Isn't the mean of a normal distribution zero?

I can get sqrt(2/π) as the mean by dividing the integral over 0 to positive infinity of x f(x) dx by the integral over 0 to positive infinity of f(x) dx, where f(x) = 1 / sqrt(2π) * e^(-x%2/2), but I am looking for an easier way to get that number.

Oh, and while I'm in pedantic mode: "it's mean value" means "it is mean value." The word for "something belonging to it" - "its" - does not have an apostrophe.
Ace2 Joined: Oct 2, 2017
• Posts: 2387
January 28th, 2022 at 6:13:39 PM permalink
Quote: ThatDonGuy

Oh, and while I'm in pedantic mode: "it's mean value" means "it is mean value." The word for "something belonging to it" - "its" - does not have an apostrophe.

Are you kidding me?

Though I’ll admit that language skills are not my strong point, I do know the difference between its and it’s. My iPhone’s “autocorrect” probably did that.

I’m quite surprised you nitpicked that so allow me to make a constructive criticism.

Before I posted this basic coin flip problem, I triple-checked the wording, ensuring there was absolutely no ambiguity to what was being asked. The problem ends with:

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

I thought there was no possible way someone could misunderstand that question. But, I was wrong…you did not comprehend it and you answered that the expected value is zero (which is the answer to a different question). You didn’t actually “get it” until after I made a second post with a detailed example.

Last edited by: Ace2 on Jan 28, 2022
It’s all about making that GTA
aceside Joined: May 14, 2021
• Posts: 341
January 29th, 2022 at 2:52:53 PM 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 ?

It seems this is exactly the same problem as the one-dimensional random walk problem on Wikipedia. To find the exact solution, you need the Pascal's triangle to solve it, but usually the number N is large enough to guarantee the use of its limit. Is this right?
Standard deviation hasn't been considered very much. what is the S.D. limit when N approaches infinity? It seems a previous post says it is sqrt((π-2)n/π).
Wizard Joined: Oct 14, 2009
• Posts: 25448
January 29th, 2022 at 9:10:31 PM permalink
Quote: Ace2

I have tremendous respect for both of you, especially your math skills. There was obviously some miscommunication on this problem.

I'd like to suggest we pass the peace pipe.
“Extraordinary claims require extraordinary evidence.” -- Carl Sagan
TwelveOr21 Joined: Nov 18, 2018
• Posts: 70
January 29th, 2022 at 9:17:07 PM permalink
Quote: Wizard

I'd like to suggest we pass the peace pipe.

Is that a Futurama reference there ? :)

https://youtu.be/SCFkr7Wj9TQ?t=66
Ace2 Joined: Oct 2, 2017
• Posts: 2387
February 1st, 2022 at 2:28:41 PM 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 ?

In case anyone is interested, here is how the EV and SD are found via integration

The normal distribution is represented by the function (2π)^(-.5) * e^(-.5x^2).  To find the mean value of x on one side of the distribution, we must take the product of all probabilities (of one side) and their corresponding x values and then sum them. This is given by the integral from zero to infinity of: (2π)^(-.5) * e^(-.5x^2) * x  dx

There is an antiderivative for this integral as follows:

Let u = (-.5x^2) and substitute into above integral
du/dx = -x
-du = x dx

Now we can rewrite (2π)^(-.5) * e^u * x  dx as:
-(2π)^(-.5) * e^u du

For which the antiderivative is simply: -(2π)^(-.5) * e^u

Undoing the substitution gives us the antiderivative of:
-(2π)^(-.5) * e^(-.5x^2)

We are evaluating this from zero to infinity, which is:
0 - (-(2π)^(-.5)) = (2π)^(-.5)

Since this is for half of the distribution, multiply by 2 to get the mean value of: (2/π)^(.5) =~ 0.79788. Multiply by 1,000,000^.5 to get the expected check value of \$797.88

Now that we know the mean value of x (on one side) is (2/π)^(.5), we can calculate the variance by taking the integral from zero to infinity of:

(2π)^(-.5) * e^(-.5x^2) * (x - (2/π)^(.5))^2 dx

I don't believe there's a way to get an exact antiderivative for this function, so I used an integral calculator to get the answer of: (π - 2) / (2π)

That is the variance for half the distribution, so multiply by 2 to get the full variance of: (π - 2) / π

Therefore the standard deviation is ((π - 2) / π)^.5 =~ 0.60281. Multiply by 1,000,000^.5 to get the check’s SD of \$602.81
Last edited by: Ace2 on Feb 1, 2022
It’s all about making that GTA