Skip to main content

calculus and analysis - Solve this probability problem symbolically



Consider a unit square, Pick two points P and Q uniformly at random inside the square, What is the probability that |PQ|>1?



I tried solve this problem


Integrate[Boole[(x1-x2)^2+(y1-y2)^2>1],{x1,0,1},{y1,0,1},{x2,0,1},{y2,0,1}]


above code with NIntegrate given 0.025074 , but I want a symbolically result as except is $\frac{19}{6}-\pi$ .



Answer



This is not quick (includes J.M. comment):


pdf = UniformDistribution[2];
td = TransformedDistribution[(x - y)^2, {x, y} \[Distributed] pdf];
zd = TransformedDistribution[
a + b, {a \[Distributed] td, b \[Distributed] td}];

then



ans = 1 - FullSimplify[CDF[zd,1]]

yields the desired result.


enter image description here


Comments