tag:blogger.com,1999:blog-6314876008291942531.post4101168068878161611..comments2024-01-14T00:36:43.430-08:00Comments on Antonio Gulli's coding playground: Biased coin into a unbiased coinUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6314876008291942531.post-57352601763257337132012-10-09T07:56:24.207-07:002012-10-09T07:56:24.207-07:00Let's define:
head = 0 with p = 0.4
tail = 1 ...Let's define:<br /><br />head = 0 with p = 0.4<br />tail = 1 with p = 0.6<br /><br />We say:<br /><br />0&0 with p = 0.16<br />0&1 with p = 0.24<br />1&0 with p = 0.24<br />1&1 with p = 0.36<br /><br />Solution:<br /><br />Toss the coin two times. If you get 0&1 you say 0, if you get 1&0 you say 1, else toss again.<br />Claudio Corsihttps://www.blogger.com/profile/13435215356783747956noreply@blogger.com