Consider a uniform distribution created by a random number generator. The distribution looks like a square with a length of 1 and a height of 1. The random number generator creates any number between 0 and 1. Find the following probabilities:

AP(0 <= X <= 0.4)
BP(0.4 <= X <= 1)
CP(X > 0.6)
DP(X <= 0.6)
EP(0.23 <= X <= 0.76)

Verified Answer :

The rigorous way to do this would be to compute a few integrals, but less work is usually better. Each of these probabilities correspond to the areas of rectangles. Each rectangle will have a height of 1, and the probability of interest will tell you everything you need to know about their lengths.

\(\mathbb P(0\le X\le0.4)\implies \text{length}=0.4\implies\mathbb P(0\le X\le0.4)=0.4\times1=0.4\)

\(\mathbb P(0.4\le X\le1)\implies \text{length}=0.6\implies\mathbb P(0\le X\le0.4)=0.6\)

Alternatively, you can use the fact that \(\mathbb P(0.4\le X\le 1)=1-\mathbb P(0\le X\le 0.4)\) to get the same result.

\(\mathbb P(X>0.6)=\mathbb P(0.60.6)=0.4\)

\(\mathbb P(X\le0.6)\implies \text{length}=0.6\implies\mathbb P(X\le0.6)=0.6\)

\(\mathbb P(0.23\le X\le0.76)\implies \text{length}=0.76-0.23=0.53\implies\mathbb P(0.23\le X\le0.76)=0.53\)