Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

In Professor Boneh's online Cryptography course at Coursera, I am a little puzzled by his definition of a statistical test where he writes:

A(x) = iff |#0(x) - #1(x)| <= 10.√n

Now, if – as an example – we were to perform this test on a string of $100$ bits, then $10$ multiplied by the square root of $100$ is… $100$. But if we had a hundred $0$s in this string and no $1$s then A would output $1$, i.e. would judge the string as random.

Am I perhaps misunderstanding something?

share|improve this question
Your understanding of what the formula means seems right to me. This test is designed with much more than 100 bits in mind, and I would say aims at having an extremely low false-positive rate. –  fgrieu Apr 5 '14 at 13:30
An extremely low false positive rate; when I attempt to estimate the probability of a false positive of a truly random long string, I get something on the order of $10^{-88}$ –  poncho Apr 5 '14 at 13:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.