Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-08-13 11:40:28

russellhq
Member
Registered: 2011-08-13
Posts: 6

Tricky Coin Flipping Probability Problem

Say I'm offered to play a game where a coin is flipped 100 times, and after each flip if it's heads I win a dollar and if it's tails I lose a dollar. And if I make it to the end without losing all my money , I win 50 dollars.

I only have 15 dollars, should I play the game?

Ie what is the probability I will go broke?

Offline

#2 2011-08-13 13:43:44

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi russellhq;


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2011-08-13 21:04:16

russellhq
Member
Registered: 2011-08-13
Posts: 6

Re: Tricky Coin Flipping Probability Problem

Is it possible to expand on your answer? I'd like to know how it's worked out.

Offline

#4 2011-08-13 21:08:16

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi russellhq;

To start there is a problem with this problem. In 100 tosses of a coin you can not be down by 15. You must be down by an even number on an even number of tosses.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2011-08-14 05:48:39

russellhq
Member
Registered: 2011-08-13
Posts: 6

Re: Tricky Coin Flipping Probability Problem

Hi bobbym, what I am interested is the probability I can be down 15 at any point during the 100 flips.  I'm sure this must be possible, it's just a case of how many times it's possible.

e.g. if I lost the first 15 games, I would not be able to continue.

Offline

#6 2011-08-14 08:00:44

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi;

Yes, I know that. My point is that 99 or 100 has to be the same. If it has not happened by 99 tosses...

Your problem is called a random walk and although I have been scanning the literature for most of the night there is no formula for it.

I could compute it exactly using a markov chain but that would mean constructing a 115 x 115 matrix. It would be far too big to post and I can not figure a way to make it smaller.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2011-08-14 12:05:31

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Tricky Coin Flipping Probability Problem

So ... if you don't lose all your $15 during the game you win $50? Sounds great to me!

Simulation sounds good to me. You could even do it in a spreadsheet.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#8 2011-08-14 18:46:15

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Tricky Coin Flipping Probability Problem

Hi,


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#9 2011-08-14 19:23:34

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi gAr;


That is a great result! I got stuck right here:

http://oeis.org/search?q=1%2C15%2C135%2 … &go=Search

The 5th one does not agree with yours. I think his is wrong! I could not fix it. Anyway, thanks for providing that! I can get a little rest now.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2011-08-14 23:31:27

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Tricky Coin Flipping Probability Problem

Hi bobbym,

Yes, I too am happy with the result!
Starting with small examples works wonders!
You see, I started with 4 dolars, the tree diagram I used was sort of a pascal's triangle truncated on the left.
And I was lucky to see that 4th convolution of catalan numbers was in the oeis.

I also tried to find the probability of ending with 'n' dollars, but it's more difficult. May be some kind of infinite series.

I'm not sure whether that link is the series related to ours. No further detail is available there?

You are welcome!


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#11 2011-08-14 23:39:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi gAr;

It is not related but I had hoped it was. His fifth term does not match his description so I thought if I fixed it up it might.

Also, tons of literature said nothing about this type of problem.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#12 2011-08-14 23:47:15

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Tricky Coin Flipping Probability Problem

Hi bobbym,

Sometimes I feel that trying it ourselves yields results faster than searching!

Now we know the solution for this kind. Starting with 'n' dollars means taking the nth convolution of the catalan g.f!
I'm now trying for a closed form for the nth term in that g.f...


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#13 2011-08-14 23:59:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi;

Okay, I am looking at it too.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2011-08-15 00:06:42

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Tricky Coin Flipping Probability Problem

Hi bobbym,

It's okay, found it!

It's there in page 217 and 377 of "concrete mathematics".
They call it Lambert's equation.


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#15 2011-08-15 00:15:31

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi gAr;

I have the second edition. I can not find the formula on either 217 or 377. What chapter heading is it?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2011-08-15 00:20:45

gAr
Member
Registered: 2011-01-09
Posts: 3,482

Re: Tricky Coin Flipping Probability Problem

Hi,

That's strange, mine's also second edition!

Anyway, see example 5, chapter 7.5 "Convolutions". I also see a few more names there: Raney's lemma, Raney's sequences, Fuss-Catalan number etc.


"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense"  - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

#17 2011-08-15 00:24:51

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi gAr;

Okay, thanks I got it!


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#18 2011-08-15 14:06:42

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: Tricky Coin Flipping Probability Problem

Define random variable X as the number of wins during the 100 trials. X=0,1,2,3,...,100

Prob{(100-X)-X>15} = Prob{X<43}

= 1/2 - 1/2 Prob(X=50) - Prob(X=49) - Prob(X=48) - Prob(X=47) - Prob(X=46) - Prob(X=45) - Prob(X=44) - Prob(X=43)

Excel can count the numerical answer after you apply binomial distribution formula to every point probability.


X'(y-Xβ)=0

Offline

#19 2011-08-15 14:31:48

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi;

Unfortunately the binomial distribution will not do the job. That was the first thing I tried. You will be overcounting the answer. For instance when you count the number of winners for 43 you will be recounting the number of winners for 42 etc.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2011-08-16 04:14:42

TMorgan
Member
Registered: 2011-04-13
Posts: 25

Re: Tricky Coin Flipping Probability Problem

Bobby,
  You mention not finding any literature on the subject of the drukard's walk. I remember reading about it years ago in the book One, Two, Three...Infinity by George Gamow. I don't know if he gives an equation for it but he does discuss the concept. It is also a great book for introducing many concepts of math and science. I recommend it for anyone interested in science, from high school age to adult. On Amazon the book got 38 reviews, and 35 of them are 5 stars (the max).

Offline

#21 2011-08-16 04:26:06

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi TMorgan;

Yes, that is a good book. I have had it for a long time.
As a kid when I first read how to find the treasure on the island I thought it was magic.

Unfortunately, gAr's Ramanujan like result is not in there.
That is what I meant by it not being in the literature.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#22 2011-08-16 14:34:49

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: Tricky Coin Flipping Probability Problem

bobbym wrote:

Hi;

Unfortunately the binomial distribution will not do the job. That was the first thing I tried. You will be overcounting the answer. For instance when you count the number of winners for 43 you will be recounting the number of winners for 42 etc.

How about Negative Binomial?


X'(y-Xβ)=0

Offline

#23 2011-08-16 15:33:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hoi George, Y;

Afraid not. As it stands gAr has the only solution.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#24 2011-08-16 16:46:40

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: Tricky Coin Flipping Probability Problem

George,Y wrote:

Define random variable X as the number of wins during the 100 trials. X=0,1,2,3,...,100

Prob{(100-X)-X>15} = Prob{X<43}

= 1/2 - 1/2 Prob(X=50) - Prob(X=49) - Prob(X=48) - Prob(X=47) - Prob(X=46) - Prob(X=45) - Prob(X=44) - Prob(X=43)

Excel can count the numerical answer after you apply binomial distribution formula to every point probability.

The numerical solution is 0.066605

Triple of that is 0.13321,which is almost the real solution.

Why?

Set R(t) as the total gains after t trials. The probability of R(100)-R(t)>0 or R(100)-R(t)<0 is the same if R(t)=-15 for the first time and is nearly 0.5 (considering the case R(100)=R(t)).

So just find the probability that R(100) ends up less than -15 and double it.

This is the typical solution for a Barrier Option like this in stochastic calculus.


X'(y-Xβ)=0

Offline

#25 2011-08-16 17:01:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Tricky Coin Flipping Probability Problem

Hi George,Y;

= 1/2 - 1/2 Prob(X=50) - Prob(X=49) - Prob(X=48) - Prob(X=47) - Prob(X=46) - Prob(X=45) - Prob(X=44) - Prob(X=43)

Please show your calculations. Exactly what are you doing for
1/2 Prob(X=50). I can then check with a an extended precision program that will give the exact answer. Then I can cross check with gAr's.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB