Live data from Hacker News

Creating fair dice from random objects

arstechnica.com

1–10 of 28 posts

Re: Creating fair dice from random objects

#2
the title is a classic quant interview problem

the basic idea is that, because multiplication commutes, probability of A then B is the same as probability of B then A, so long as they are independent events (rolling objects typically meets this criteria)

so instead of using just A or just B, which might neither have 0.5 probability, you only count "A then B" and "B then A" as rolls

and this trivially extends to constructing a fair N-sided die out of any arbitrarily biased die for any N

Re: Creating fair dice from random objects

#5

the title is a classic quant interview problem the basic idea is that, because multiplication commutes, probability of A then B is the same as probability of B then A, so long as they are independent events (rolling objects typically meets this criteria) so instead of using just A or just B, which might neither have 0.5 probability, you only count "A then B" and "B then A" as rolls and this trivially extends to const…

That isn't what the article is about at all. It's not even what the first paragraph is about.

What they are doing is designing physical shapes that will have a specified probability of falling in different positions.

What you are talking about is post processing a biased random signal to get a less biased signal.

Re: Creating fair dice from random objects

#6
How to create a fair coin from an arbitrarily biased coin:

1. Toss the coin and remember the answer.

2. Toss the coin again, if it is different from your previous toss then your result from #1 is fair. Otherwise, go back to step 1.

If p is the probability of getting heads, there are four possible outcomes with their associated probabilities:

    TT -> (1 - p)^2   (rejected)
    HT -> p * (1 - p)
    TH -> (1 - p) * p
    TT -> p^2         (rejected)
Needless to say, p * (1 - p) and (1 - p) * p have an equal probability, so if we don't reject our two tosses, we have a fair outcome.

Re: Creating fair dice from random objects

#7
post #6

How to create a fair coin from an arbitrarily biased coin: 1. Toss the coin and remember the answer. 2. Toss the coin again, if it is different from your previous toss then your result from #1 is fair. Otherwise, go back to step 1. If p is the probability of getting heads, there are four possible outcomes with their associated probabilities: TT -> (1 - p)^2 (rejected) HT -> p * (1 - p) TH -> (1 - p) * p TT -> p^2 (re…

That's cute. intuitively, if two flips give different outcomes, it's fifty/fifty which would be first.

Re: Creating fair dice from random objects

#8

the title is a classic quant interview problem the basic idea is that, because multiplication commutes, probability of A then B is the same as probability of B then A, so long as they are independent events (rolling objects typically meets this criteria) so instead of using just A or just B, which might neither have 0.5 probability, you only count "A then B" and "B then A" as rolls and this trivially extends to const…

That isn't what the article is about at all. It's not even what the first paragraph is about. What they are doing is designing physical shapes that will have a specified probability of falling in different positions. What you are talking about is post processing a biased random signal to get a less biased signal.

And yet the person you replied to was quite clear that they are responding to the title.

Re: Creating fair dice from random objects

#9
post #6

How to create a fair coin from an arbitrarily biased coin: 1. Toss the coin and remember the answer. 2. Toss the coin again, if it is different from your previous toss then your result from #1 is fair. Otherwise, go back to step 1. If p is the probability of getting heads, there are four possible outcomes with their associated probabilities: TT -> (1 - p)^2 (rejected) HT -> p * (1 - p) TH -> (1 - p) * p TT -> p^2 (re…

Reference: https://en.wikipedia.org/wiki/Randomness_extractor#Von_Neuma...
Post reply on HN