Given the size of the cube(L) and the size of a stick (r), and supposing the first head of the stick fell on some random point of the cube, what is the probability that the second head will also be inside of the cube.


I know that if first head of the stick is inside the box and farther than r away from the border, then both heads are inside box. But after that, some sticks may have one extreme outside of the box depending on the orientation. Also, if the stick is on a corner of the cube, the probability that the second head is outside the cube, would be larger, than if it was on the side. How can I calculate the probability that the second head is outside the box given that the first head is inside?



What is the probability that a stick will fall completely inside a cube?
I assume one end of the stick is dropped uniformly in the cube and the other end is chosen uniformly in a sphere of radius $r$ around the first. If $r < L$ then conditionally on the orientation ${\bf x}=(x\_1,x\_2,x\_3)$ with $|{\bf x}| = r$ of the stick the probability that it is inside the cube is $\left(1-\frac{|x\_1|}{L}\right)\left(1-\frac{|x\_2|}{L}\right)\left(1-\frac{|x\_3|}{L}\right)$. Integrating this over the sphere of radius $r$ gives a probability
$$
1 - \frac{3}{2}\frac{r}{L} + \frac{2}{\pi} \frac{r^2}{L^2} - \frac{1}{4\pi} \frac{r^3}{L^3} 
$$
for the stick to fall completely inside the cube. The formula for $L < r < \sqrt{3} L$ can be computed similarly.


