- #1
Povilas M
- 9
- 1
Hi,
I am trying to write a function which would take two arguments:
-> number of bits (which are a binary 0 or 1 value) N
-> and acceptable number of mismatching bits M
The function would statistically determine the probability of having M or less mismatching bits when randomly generating two N long bit arrays and comparing them. Difference between 1001 and 1011 would be 1 for example as only the third bit differs. My testing indicates a bell curve is formed around N/2, but I've not done maths for years, it's hard for me to figure the formula out...
Thanks a lot
I am trying to write a function which would take two arguments:
-> number of bits (which are a binary 0 or 1 value) N
-> and acceptable number of mismatching bits M
The function would statistically determine the probability of having M or less mismatching bits when randomly generating two N long bit arrays and comparing them. Difference between 1001 and 1011 would be 1 for example as only the third bit differs. My testing indicates a bell curve is formed around N/2, but I've not done maths for years, it's hard for me to figure the formula out...
Thanks a lot