POV-Ray : Newsgroups : povray.off-topic : Coin game Server Time
5 Nov 2024 12:41:30 EST (-0500)
  Coin game (Message 1 to 10 of 29)  
Goto Latest 10 Messages Next 10 Messages >>>
From: scott
Subject: Coin game
Date: 8 Jan 2009 06:32:14
Message: <4965e43e@news.povray.org>
Here's an interesting puzzle.

A game is played by repeatedly tossing a coin until it lands heads.  If it 
lands heads on the first try, you win $1 and the game is over.  If it lands 
heads on the 2nd try, you win $2 and the game is over.  On the 3rd try $4, 
and in general if you get the head on the nth try, you win $2^(n-1).

I simulated this game in C++ and after 1e6 goes the average win-per-go 
settles down quite nicely to $8.09 and stays there up to 1e8 goes.  Is that 
correct?  How much should you be willing to pay for each go?  Does it depend 
on how many goes you are going to have?


Post a reply to this message

From: Invisible
Subject: Re: Coin game
Date: 8 Jan 2009 08:22:19
Message: <4965fe0b$1@news.povray.org>
scott wrote:
> Here's an interesting puzzle.
> 
> A game is played by repeatedly tossing a coin until it lands heads.  If 
> it lands heads on the first try, you win $1 and the game is over.  If it 
> lands heads on the 2nd try, you win $2 and the game is over.  On the 3rd 
> try $4, and in general if you get the head on the nth try, you win 
> $2^(n-1).
> 
> I simulated this game in C++ and after 1e6 goes the average win-per-go 
> settles down quite nicely to $8.09 and stays there up to 1e8 goes.  Is 
> that correct?  How much should you be willing to pay for each go?  Does 
> it depend on how many goes you are going to have?

By "average" you mean "arithmetic mean"?

The probability of N tosses is 2^(-N). So the probability of winning 
2^(N-1) dollas is 2^(-N).

[This simple analysis ignores the fact that if, say, you tossed a coin 
100 times without getting any heads at all, almost any *real* human 
would question whether the coin is loaded...]

Just as the probability of individual scores have a probability 
distribution, so the average scores should have one. And, by the central 
limit theorum, I would suggest that these converge on being normally 
distributed for larger and larger numbers of turns.

But what would the mean and standard deviation be? I have no idea.


Post a reply to this message

From: scott
Subject: Re: Coin game
Date: 8 Jan 2009 09:20:12
Message: <49660b9c@news.povray.org>
> By "average" you mean "arithmetic mean"?

Yup, total amount won over all games divided by the number of games played.


Post a reply to this message

From: Invisible
Subject: Re: Coin game
Date: 8 Jan 2009 09:31:29
Message: <49660e41$1@news.povray.org>
Hmm. Tricky.

The number of heads given N tosses of the coin follows a Poisson 
distribution, and the number of tails before hitting a head follows a 
geometric distribution, but what the **** is the average score? A curios 
puzzle indeed...


Post a reply to this message

From: Tom Austin
Subject: Re: Coin game
Date: 8 Jan 2009 10:00:40
Message: <49661518$1@news.povray.org>
scott wrote:
> Here's an interesting puzzle.
> 
> A game is played by repeatedly tossing a coin until it lands heads.  If 
> it lands heads on the first try, you win $1 and the game is over.  If it 
> lands heads on the 2nd try, you win $2 and the game is over.  On the 3rd 
> try $4, and in general if you get the head on the nth try, you win 
> $2^(n-1).
> 
> I simulated this game in C++ and after 1e6 goes the average win-per-go 
> settles down quite nicely to $8.09 and stays there up to 1e8 goes.  Is 
> that correct?  How much should you be willing to pay for each go?  Does 
> it depend on how many goes you are going to have?
> 
> 

what kind of coin?
what kind of surface does it land on?
any pay out for it landing on its edge?


Post a reply to this message

From: scott
Subject: Re: Coin game
Date: 8 Jan 2009 10:28:07
Message: <49661b87@news.povray.org>
> what kind of coin?
> what kind of surface does it land on?
> any pay out for it landing on its edge?

Just assume there is a 50% chance of heads or tails.


Post a reply to this message

From: scott
Subject: Re: Coin game
Date: 8 Jan 2009 10:38:52
Message: <49661e0c$1@news.povray.org>
> Hmm. Tricky.
>
> The number of heads given N tosses of the coin follows a Poisson 
> distribution, and the number of tails before hitting a head follows a 
> geometric distribution, but what the **** is the average score? A curios 
> puzzle indeed...

How about if you assume initially the game is limited to a certain number of 
tosses, and if a head fails to show up within that limit you win nothing...


Post a reply to this message

From: Arttu Voutilainen
Subject: Re: Coin game
Date: 8 Jan 2009 10:46:59
Message: <49661ff3$1@news.povray.org>
scott wrote:
> Here's an interesting puzzle.
> 
> A game is played by repeatedly tossing a coin until it lands heads.  If
> it lands heads on the first try, you win $1 and the game is over.  If it
> lands heads on the 2nd try, you win $2 and the game is over.  On the 3rd
> try $4, and in general if you get the head on the nth try, you win
> $2^(n-1).
> 
> I simulated this game in C++ and after 1e6 goes the average win-per-go
> settles down quite nicely to $8.09 and stays there up to 1e8 goes.  Is
> that correct?  How much should you be willing to pay for each go?  Does
> it depend on how many goes you are going to have?
> 
> 

The probability to win at n:th round is (1/2)^n. If you win, you get
2^(n-1). So, the theoretical predicted win-per-go is
(1/2)^1*2^(0)+(1/2)^2*2^1+(1/2)^3*2^2.... witch is the same as 1/2 + 1/2
+ 1/2 + 1/2... => infinite.
So, if you are able to have an unlimited number of goes and the other
part of the game is able to pay you what ever it has to, it doesn't
matter how much you pay for the each round: you will eventually make profit.

At least that's how our maths book explained it to me like two months ago :)

-- Arttu Voutilainen


Post a reply to this message

From: Warp
Subject: Re: Coin game
Date: 8 Jan 2009 11:06:57
Message: <496624a1@news.povray.org>
scott <sco### [at] scottcom> wrote:
> A game is played by repeatedly tossing a coin until it lands heads.  If it 
> lands heads on the first try, you win $1 and the game is over.  If it lands 
> heads on the 2nd try, you win $2 and the game is over.  On the 3rd try $4, 
> and in general if you get the head on the nth try, you win $2^(n-1).

> I simulated this game in C++ and after 1e6 goes the average win-per-go 
> settles down quite nicely to $8.09 and stays there up to 1e8 goes.

  How did you implement it? What type of integers did you use to count the
amount of money? (Note that a 32-bit integer will overflow after only 32
tosses of the coin, which is perfectly within the realm of possibility.)

-- 
                                                          - Warp


Post a reply to this message

From: somebody
Subject: Re: Coin game
Date: 8 Jan 2009 11:10:38
Message: <4966257e$1@news.povray.org>
"scott" <sco### [at] scottcom> wrote in message news:4965e43e@news.povray.org...

> Here's an interesting puzzle.
>
> A game is played by repeatedly tossing a coin until it lands heads.  If it
> lands heads on the first try, you win $1 and the game is over.  If it
lands
> heads on the 2nd try, you win $2 and the game is over.  On the 3rd try $4,
> and in general if you get the head on the nth try, you win $2^(n-1).
>
> I simulated this game in C++ and after 1e6 goes the average win-per-go
> settles down quite nicely to $8.09 and stays there up to 1e8 goes.  Is
that
> correct?

No. More properly, it's useless. You won't be able to solve this empirically
as such. Most influential outcomes on payoff are least likely, which you
will not ever come across in finite time.

> How much should you be willing to pay for each go?

Infinite. Sum(n,0,inf)( (1/2)^n * 2^(n-1) ) = sum(n,0,inf)(1/2) = inf.

Of course it only makes sense to play if both you and the casino have
infinite time and infinite money.

> Does it depend on how many goes you are going to have?

No, each round of game is independent, is it not?


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.