Two discrete random variables X and Y are independent if X = x and Y = y are independent events for all x and y; that is, Pr(X = x, Y = y) = Pr(X = x) Pr(Y = y). Two continuous random variables X and Y, with joint probability density function f(x, y), are independent if f(x, y) = f1(x) f2(y), where f1 and f2 are the marginal probability density functions.