What is the probability of two random line segments crossing in a unit square? For the purposes of this question a random line segment is defined by connecting two random points inside the unit square, where a random point is found by generating two random numbers between 0 and 1, and taking them as the x and y co-ordinates. What is the probability of two such randomly generated line segments crossing?
 A: First decide whether you mean the line segments only, or the whole lines through the two points. Then the following method should lead you to the answer:
Generate four points at random. There are three ways to pair those points together, and the probability that the lines/line segments intersect will be $0$ or $\frac13$ or $\frac23$ or $1$, depending on whether the four points form a convex quadrilateral or a triangle with a fourth point in its interior.
So the overall probability can be deduced once you know the probability that four randomly chosen points from the unit square form a convex quadrilateral (or a triangle with a point inside). Not a trivial probability problem but I think it is known.
A: The answer appears to be 133/432 = approx 0.308.
If the four points form a convex quadrilateral, there is a 1/3 chance of the two line segments crossing. This is because, out of 3 possible pairings, the only one in which the line segments cross is one in which the diagonals of the quadrilateral are drawn.
The probability of four randomly chosen points forming a convex quadrilateral is equal to the chance of the fourth randomly chosen point falling outside the triangle that the first three points establish. This probability is basically the area outside of the triangle. Since the area of a randomly constructed triangle is 11/144 (see The expected area of a triangle formed by three points randomly chosen from the unit square), the area outside the triangle is 133/144.
Hence the desired probability is 1/3 * 133/144 = 133/432.
