Random Number Picking

73 Views Asked by At

Take $4$ random numbers in the range of 0-255.

What is the chance that three of them fall into the lower 32 (0-31) and one falls into the higher 32 (224-255), OR one falls into the lower 32 and three fall into the higher 32?

The answer is $\left(\frac{1}{8}\right)^{3}$ (I've written a script that runs 1000 loops)

The question is: Why?

Thanks!

2

There are 2 best solutions below

0
On BEST ANSWER

What is the chance that three of them fall into the lower 32 (0-31) and one falls into the higher 32 (224-255), OR one falls into the lower 32 and three fall into the higher 32?

Disjoint events have additive probabilities.

The count for disjoint success events among a sequence of independent and identically distributed trials is a Multinomially Distributed Random Variable.

Thus the probability is $\bbox[lemonchiffon]{\tbinom 43 {(\tfrac{32}{256})}^3\tfrac{32}{256}+\tbinom 41 \tfrac{32}{256}{(\tfrac{32}{256})}^3}$, which simplifies to your answer.

That is all.

3
On

The possibility of one number falling into lower 32 is $\frac{32}{256}=\frac{1}{8}$. Same as for higher 32.

If we pick four numbers and the possibility of one falling into lower 32 and the rest falling into higher 32 is $4\cdot\left(\frac{1}{8}\right)^{4}$. The possibility of one falling into higher 32 and the rest into lower 32, is also the same.

Therefore you get the answers $4\cdot\left(\frac{1}{8}\right)^{4} + 4\cdot\left(\frac{1}{8}\right)^{4} = \left(\frac{1}{8}\right)^{3}$.