Since this question doesn't have a precise answer, send a simple description of a method that would work.
If anyone writes a program, try to solve this: What is the probability of two line segments intersecting when their endpoints are chosen randomly from a 4x4 grid (shared endpoints and endpoints on lines are considered intersecting)? Zero length lines are not to be considered.
Extension: How would you solve the 3-D case?
Source: Reader Sudipta Das.