Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2007, 04:53 PM
dibsy dibsy is offline
Member
 
Join Date: Jul 2005
Posts: 35
Default Robot Flipping Coins

someone walks into your room and dumps a huge bag of quarters all over the floor. they spread them out so no quarters are on top of any other quarters. a robot then comes into the room and is programmed such that if it sees a head, it flips it to tails. if it sees a tail, it throws it in the air. the robot moves around randomly forever. will there be a convergence in distribution of heads vs. tails?
Reply With Quote
  #2  
Old 05-07-2007, 05:26 PM
bigpooch bigpooch is offline
Senior Member
 
Join Date: Sep 2003
Location: Hong Kong
Posts: 1,330
Default Re: Robot Flipping Coins

Yes. If p=probability("tail in the limit as the number of
flips approaches infinity"), p=(1-p)+p(1/2) or p=1-(p/2), so
p=2/3.
Reply With Quote
  #3  
Old 05-08-2007, 04:38 PM
imfatandugly imfatandugly is offline
Senior Member
 
Join Date: Jul 2005
Posts: 267
Default Re: Robot Flipping Coins

[ QUOTE ]
someone walks into your room and dumps a huge bag of quarters all over the floor. they spread them out so no quarters are on top of any other quarters. a robot then comes into the room and is programmed such that if it sees a head, it flips it to tails. if it sees a tail, it throws it in the air. the robot moves around randomly forever. will there be a convergence in distribution of heads vs. tails?

[/ QUOTE ]
I would say with probability 1 there will be all heads in the room if the robot does this forever and there is a finite amount of coins.
I dont see how this could not be the case.
If there are infinately many coins.......
Reply With Quote
  #4  
Old 05-08-2007, 05:02 PM
neverforgetlol neverforgetlol is offline
Senior Member
 
Join Date: Oct 2005
Posts: 6,048
Default Re: Robot Flipping Coins

law of large numbers?
Reply With Quote
  #5  
Old 05-08-2007, 05:58 PM
dibsy dibsy is offline
Member
 
Join Date: Jul 2005
Posts: 35
Default Re: Robot Flipping Coins

That was what I came up with, but apparently it's not the right solution..
Reply With Quote
  #6  
Old 05-08-2007, 06:36 PM
BruceZ BruceZ is offline
Senior Member
 
Join Date: Sep 2002
Posts: 4,078
Default Re: Robot Flipping Coins

[ QUOTE ]
someone walks into your room and dumps a huge bag of quarters all over the floor. they spread them out so no quarters are on top of any other quarters. a robot then comes into the room and is programmed such that if it sees a head, it flips it to tails. if it sees a tail, it throws it in the air. the robot moves around randomly forever. will there be a convergence in distribution of heads vs. tails?

[/ QUOTE ]

Let h[n] denote the average fraction of heads after the nth flip, and t[n] denote the average fraction of tails after the nth flip, so that

h[n] + t[n] = 1.

Then note that all of the heads after the nth flip come from the tails remaining after flip n-1, so we have

h[n] = 0.5*t[n-1].

Combining these equations gives

h[n] = 0.5 - 0.5*h[n-1].

Setting h[n] = h[n-1] shows that if this converges, it must converge to h[n] = 1/3 and t[n] = 2/3.

To verify this, you can use Excel. Set A1 to the starting fraction of heads, and set B1 to the starting fraction of tails 1 - A1. Then set A2 = 0.5*B1, and B2 = 1 - A2. Copy these 2 formulas down the column, and you will see that for any starting fractions, column A converges to 1/3, and column B converges to 2/3. Note that we can also write the formula for tails explicitly as t[n] = h[n-1] + 0.5*t[n-1], or B2 = A1 + 0.5*B1.
Reply With Quote
  #7  
Old 05-08-2007, 10:24 PM
BruceZ BruceZ is offline
Senior Member
 
Join Date: Sep 2002
Posts: 4,078
Default Re: Robot Flipping Coins

[ QUOTE ]
That was what I came up with, but apparently it's not the right solution..

[/ QUOTE ]

There is an alternate "trick" solution depending on your reading of the problem. When the robot changes a head to a tail, if it then "sees" the resulting tail, it will flip that coin randomly. So it flips both heads AND tails randomly, so this results in an answer of an equal number of heads and tails. Note that this interpretation requires that the robot looks at the coin after changing it from heads to tails, but does not look at the coin after flipping it randomly, since otherwise it would only ever process a single coin.
Reply With Quote
  #8  
Old 05-09-2007, 12:55 AM
imfatandugly imfatandugly is offline
Senior Member
 
Join Date: Jul 2005
Posts: 267
Default Re: Robot Flipping Coins

[ QUOTE ]
[ QUOTE ]
someone walks into your room and dumps a huge bag of quarters all over the floor. they spread them out so no quarters are on top of any other quarters. a robot then comes into the room and is programmed such that if it sees a head, it flips it to tails. if it sees a tail, it throws it in the air. the robot moves around randomly forever. will there be a convergence in distribution of heads vs. tails?

[/ QUOTE ]


I would say with probability 1 there will be all heads in the room if the robot does this forever and there is a finite amount of coins.
I dont see how this could not be the case.
If there are infinately many coins.......

[/ QUOTE ]

I misread the problem, thought that robot leaves heads alone if it picks it up and flips if he picks up tails. Anyways thought about it a bunch and came up with a very rigorous solution.


I have a thorough proof, that also say what h(n) is given h(0)=a, that is (# of heads on the floor starting off )/( # of coins ) =a

Let h(n)= # of heads / # of coins after n tosses.
t(n)= # of tails / # of coins after n tosses.

Also Let h(0)=a.

Now as noted t(n+1)= h(n) + (1-h(n))/2= (1+h(n) )/2
h(n) = ( 1- h(n) ) /2

notice since 0<h(n),t(n)<1 then 0<h(n+1),t(n+1)<1.

Now lets compute h(n), given h(0)=a.
h(1)= (1-a)/2
h(2)= (3+a)/4
h(3)= (5-a)/8
h(4)= (8+a)/16

we prove by induction that h(n)= 1-1/2+1/4+- 1/2^n + (-1)^n a/2^n=
2/3(1-(1/2)^(n+1) ) + (-1)^n a/2^n

for n=1 this is clear.
h(1)=1/2-a/2=(1-a)/2


suppose this is true for k=1,...,n
h(n+1)=(1-h(n))/2=(1-2/3(1-(1/2)^(n+1) ) + (-1)^n a/2^n)/2=
2/3(1-(1/2)^(n+2) ) + (-1)^n a/2^(n+1)

Using Ihop or whatever the hell that guys name is for limits we see that if h(0)=a then Lim n->infinity h(n) = 2/3.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.