This applet shows a discrete sample space as a rectangle with a grid of \(N_x\) by \(N_y\) dots. The underlying probability space is the uniform distribution on this finite set of points. Two events \(A\) and \(B\) are shown as smaller rectangles. The events \(A\) and \(B\) can be moved by dragging the interiors, and the sizes of the events (proportional to the probabilities) can be changed by dragging the corners. The probabilities \(P(A)\), \(P(B)\), \((P(A)\) intersect \(B\)), \(P(A | B)\), and \(P(B | A)\) are shown. The grid sizes \(N_x\) and \(N_y\) can be changed with text boxes.