Unbias a random generator: Difference between revisions
Content added Content deleted
(→{{header|Euphoria}}: Euphoria example added) |
(Smaller equations.) |
||
Line 1: | Line 1: | ||
{{task}}Given a weighted one bit generator of random numbers where the probability of a one occuring, <math>P_1</math>, is not the same as <math>P_0</math>, the probability of a zero occuring, the probability of the occurrence of a one followed by a zero is <math>P_1 |
{{task}}Given a weighted one bit generator of random numbers where the probability of a one occuring, <math>P_1</math>, is not the same as <math>P_0</math>, the probability of a zero occuring, the probability of the occurrence of a one followed by a zero is <math>P_1</math> × <math>P_0</math>. This is the same as the probability of a zero followed by a one: <math>P_0</math> × <math>P_1</math>. |
||
'''Task Details''' |
'''Task Details''' |