0
$\begingroup$

For a random whole number, n, between 0 and 4000 billion (don't know what that's called), is the probability that n is a multiple of 4096, 1/4096?

  • 0
    It sounds suspiciously specific but it's not homework, promise. It's a filesize checking thing.2012-07-11
  • 0
    Almost exactly $1/4096$. Is it $0$ to $4000$ billion inclusive (both ends), or exclusive? And is it US billion or British billion? The answers to the above questions make no practical difference to the answer.2012-07-11
  • 0
    Didn't know US and British billions were different. If it matters it's 4,000,000,000 x 1000. And 0 and 4000 billion both inclusive.2012-07-11
  • 1
    Traditionally, a British billion is $10^{12}$, not $10^9$. Most of my British contacts, which are not many, are using $10^9$2012-07-11
  • 0
    @Jayraj If it is for a practical application, can you be certain that your $n$ is really a random whole number? For instance, executable filesizes (and a few other formats) are frequently divisible by large powers of two, far more often than any random number.2012-07-12
  • 0
    @Ross: In the UK a *billion* has been $10^9$ officially (i.e. government usage) since 1974.2012-07-12

1 Answers 1

2

If one end (either $0$ or $4000$ billion) is included, the probability is exactly $\frac 1{4096}$ as $4096=2^{12}$ and 4000 billion has at least $14$ factors of $2$ (if billion = $10^9$). If both ends are excluded, there is an error of $1$ in $4000$ billion. If both ends are included, there is an error of about $1$ in $976562500$

Added: as both ends are included, the probability is $\frac {976562501}{4000000000001}$ which is not exactly $\frac 1{4096}$

  • 0
    Didn't understand "there is an error of 1 in 4000 billion". Could you please explain? Thanks2012-07-11
  • 0
    @Jayraj: If you count from 0 to 10, there are 11 numbers. The extra 1 in both the numerator and denominator accounts for the error. In fact, the error is much larger, see my edit.2012-07-11