We all know that if a random variable is continuous distributed, the point probability of is 0. For example, , where means a uniform distribution with support in . Then for any .

However, it is not that easy to understand why . The confusion always comes from programming. The following is the C code to generate a random number from .

#include<stdio.h>
#include<stdlib.h>
void main()
{printf("%f\n", (float)(abs(rand()) % 1001) * 0.001f);
}

the output is

“0.041000

Press any key to continue_”

Or in matlab, which is simpler:

>> rand
ans =
0.8147

In R:

> runif(1)
[1] 0.5685145

What happened now? We drew a sample from and 0.5685145 is what we find. So 0.5685145 did happened in our experiment, but why ? Doesn’t it contradict the concept of maximum likelihood?

The answer lies on the limitation of computer hardware. We can’t never get a real sample from using any computer. Recall that , 0.5685145 is a rational number! If we sample a number from , it will always be an irrational number, because . We will never know what will be like, we can’t write it down, we can’t even tell it apart from any other irrational number. In other words, .

### Like this:

Like Loading...