My Math Forum Simulating a coin toss with probability of heads 1/π and tails 1 - 1/π using a die

 Probability and Statistics Basic Probability and Statistics Math Forum

 July 14th, 2015, 01:39 PM #1 Newbie   Joined: Jul 2015 From: Ontario Posts: 1 Thanks: 0 Simulating a coin toss with probability of heads 1/π and tails 1 - 1/π using a die How could you simulate a biased coin that has P(Heads) = 1/π and P(Tails) = 1 - 1/π . Using a fair six sided die? thanks. Struggling with this question.
 July 21st, 2015, 04:39 AM #2 Senior Member   Joined: Mar 2015 From: Universe 2.71828i3.14159 Posts: 122 Thanks: 43 Math Focus: Area of Circle Look up for von Neuman's method. There is a simple equation for generating such simulations (I couldn't remember, google it).
 July 21st, 2015, 04:55 AM #3 Global Moderator     Joined: Nov 2006 From: UTC -5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms Write out $1/\pi$ in base-6 and start rolling dice until the last die rolled doesn't match the relevant digit. (Either subtract 1 from each roll, or count 6s as 0s.) Since $$1/\pi=0.152431022133341414113121401254\ldots$$ you can stop if you roll a 0 or 2-5 on the first roll, or a 1 on the first roll and 0-4 on the second roll, or 1 and 5 on the first two rolls and 0-1 or 3-5 on the third, etc. If you end up on the low side call it heads, otherwise tails.

 Tags 1 or π, coin, die, heads, probability, simulating, tails, toss

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post Sammy2121 Probability and Statistics 2 January 23rd, 2015 02:36 AM Risotto17 Advanced Statistics 4 January 25th, 2012 11:09 PM johnmath Advanced Statistics 6 July 1st, 2010 11:49 PM slyone Algebra 2 September 5th, 2008 04:05 PM slyone Advanced Statistics 1 September 4th, 2008 06:13 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top