Find the probability of distance of two points ,which are selected in $[0,a]$ closed interval, is less than $ka$ $k \lt 1$
What did I write :
$P(A)$ = (Area measure of set $A$)/(Area measure of set $\Omega$)
The sample space $\Omega = \{(x,y) : 0\le x \le a , 0 \le y \le a \}$
Probability set $A=\{(x,y) : |x-y|\lt ka\}$
Measure of $\Omega$ = $a.a=a^2$
I think I should calculate the area of the rectangle between two lines $y=x+ka$ and $y=x-ka$ and bounded with points $(-a,-ka)$, $(a,ka)$, $(-ka,-a)$ and $(ka,a)$
But I cannot obtain the true answer which is $k(2-k)$
Could someone please fix me please?
Thanks a lot
The region of $|y-x| \le ka$ looks similar to the picture that I have attached. We just have to use the total area to subtract away the area of the area of the two triangles.
$$\frac{a^2 - 2\cdot \frac12 (a-ka)^2}{a^2}=1-(1-k)^2=k(2-k)$$
Remark about your attempt:
$x$ or $y$ won't take negative values.