TrueFlip / prizecounter

44 stars 25 forks source link

Issue on probability #3

Open kwiky opened 6 years ago

kwiky commented 6 years ago

You take a 4 length hexa string from blockchain and take the modulo 50 of it. 0000 => ffff means 0 => 65535 So each number appears 65536/49 = 1337.46938776 times

OK but ... it means than some numbers appears one more time than others !

On 65536 tosses Occurence where number 1 to 22 appears : 1338 times => Probability 2.04162597656% Occurence where number 23 to 49 appears : 1337 times => Probability 2.04010009766%

If we round 1337.46938776 to 1337 and look where we stop in hexa to have each number the same chance 1337*49 = 65513 = ffe9

Don't look over this ffe9 hexa because the last 23 give one more chance to numbers 1 to 22

On 65513 tosses Occurence where number 1 to 49 appears : 1337 times => Probability 2.04081632653% = 100/49

lifekiss26 commented 6 years ago

Thank

On Dec 13, 2017 10:23 PM, "Steve Grosbois" notifications@github.com wrote:

You take a 4 length hexa string from blockchain and take the modulo 50 of it. 0000 => ffff means 0 => 65535 So each number appears 65536/50 = 1310.72 times

OK but ... it means than some numbers appears one more time than others !

On 65536 tosses Occurence where number 0 to 35 appears : 1311 times => Probability 2.00042724609% Occurence where number 36 to 49 appears : 1310 times => Probability 1.99890136719%

If we round 1310.72 to 1310 and look where we stop in hexa to have each number the same chance 1310*50 = 65500 = ffdc

Don't look over this ffdc hexa because the last 35 give one more chance to numbers 0 to 35

On 65500 tosses Occurence where number 0 to 49 appears : 1310 times => Probability 2%

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TrueFlip/prizecounter/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AbY9Pct7imXMcmfJQrpOYf8QRtokTh9Kks5s__MJgaJpZM4RAwul .

rescueremedy commented 6 years ago

Thnx

Riazbodani commented 6 years ago

Thanks

KTH777 commented 6 years ago

Thanks