Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.