# What's the probability of drawing a number from [0,1]?

The question that I have is more or less equal to this one. However, it is slightly different, and since I wasn't able to completely follow the answer, I decided to post a new question: So I draw two numbers from $$[0,1]$$ and want their sum to be greater or equal to $$0.5$$.

It is not stated in the question what should be the probability distribution. I assume the random variables are independent and identically distributed.

What I didn't understand from the top-rated answer to the question given in the link is the transition of the second last to the last integral:

$$\int_0^1f(x)\left(\int_{1-x}^1f(y)\,\mathrm dy\right)\,\mathrm dx=\int_0^1f(x)\big(1-F(1-x)\big)\,\mathrm dx$$

Anyways, I am pretty sure for my problem I just have to change the lower bound of the second last integral from $$1-x$$ to $$0.5 - x$$. But what would be the last transition then? I know the integral over the probability density function $$f(y)$$ equals the cumulative distribution function $$F(y)$$. But that's about where my statistical knowledge leaves me.

I appreciate any help, thx in advance!

• Do you understand that here $\int_{1-x}^1f(y)dy=F(1)-F(1-x)=1-F(1-x)$? Nov 25, 2018 at 13:47
• yeah, I think so. The first equation is just a property of the cumulative distribution function: \int_{a}^{b} f(x) dx = F(b) - F(a). And F(b) = 1. So that explains this equation. But how do I continue with my problem? I would say I end up with the formula int_{0}^{1} f(x) (1-F(0.5-x)) dx, since y = 0.5-x. And what if I now assume a uniform distribution? the probability density f(x) = 1/(b-a) in the interval [a,b]. ...
– Luk
Nov 25, 2018 at 14:10

It is more convenient here to use $$P(X+Y\geq0.5)=1-P(X+Y<0.5)$$ and calculate $$P(X+Y<0.5)$$.

If $$[x+y<0.5]$$ denotes the function $$\mathbb R^2\to\mathbb R$$ that takes value $$1$$ if $$x+y<0.5$$ and takes value $$0$$ otherwise then:$$P(X+Y<0.5)=\mathbb E[X+Y<0.5]=\int_0^1\int_0^1[x+y<0.5]f(x)f(y)dydx=$$$$\int_0^{0.5}\int_0^{0.5-x}f(x)f(y)dydx=\int_0^{0.5}f(x)\left(\int_0^{0.5-x}f(y)dy\right)dx=\int_0^{0.5}f(x)F(0.5-x)dx$$so that$$P(X+Y\geq0.5)=1-\int_0^{0.5}f(x)F(0.5-x)dx$$

Observe that: $$\int_0^{0.5-x}f(y)dy=F(0.5-x)-F(0)=F(0.5-x)$$where the first equality is purely based on the definition of a PDF.

• ahh, allright, thx so much drhab!!! Just to be sure: Say I assume a uniform distribution: This would yield for P(X + Y < 0.5): int_{0}^{0.5} (1*(0.5-x)) dx which eventually solves to 0.00125. Is that correct?
– Luk
Nov 25, 2018 at 14:22
• By uniform distribution: $\int_0^{0.5}(0.5-x)dx=[0.5x-0.5x^2]_0^{0.5}=[0.5^2-0.5^3]-0=0.125$ Nov 25, 2018 at 15:37
• allright. thx so much!
– Luk
Nov 25, 2018 at 17:41