another non-deterministic coin computer
I’ve been stuck on a problem a while. Its to do with the average of the smaller of two randomly selected numbers between 0 and 1. That is, if you repeatedly generate two random numbers between 0 and 1, but each time select the smaller one, then the average of all the smaller ones will be 1/3.
There are various ways to calculate this although i don’t really follow any of them that well and yesterday when debby was hogging the computer after vain attempts to work out the formula on paper I resorted to programming my casio using the ran# function (which conveniently generates a real number between 0 and 1) I confirmed it was indeed 1/3.
1/3 = 1/4 + 1/16 + 1/64… etc and there are various ways of getting the answer ( i presume ) by justifications of this series. I thought of a coin computer solution which I still haven’t worked out exactly but it goes something like this:
( 1 ) You can generate a real number between 0 and 1 by flipping a coin, each flip narrows the interval by half
( 2 ) If you’ve got two coins then you can generate two numbers at once
( 3 ) As you are only interested in the smaller number if the coins land heads/tails ie 0/1 then you can ignore the 1 and you only need to flip 1 coin from now on.
As i’ve described it, this process will generate a series of real numbers which have average 1/3. That’s interesting enough, but I think it should be possible to refine further to actually output the average ( which is 1/3 ) in one go, but here’s where I get stuck.