For two discrete random variables X and Y, the joint probability mass function is the function p such that p(xi, yj)=Pr(X = xi, Y = yj), for all i and j. The term applies also to the generalization of this to more than two random variables. For two variables, it may be called the bivariate and, for more than two, the multivariate probability mass function.