Joint probability distribution
Part of a series on statistics 
Probability theory 

Given two random variables that are defined on the same probability space,^{[1]} the joint probability distribution is the corresponding probability distribution on all possible pairs of outputs. The joint distribution can just as well be considered for any given number of random variables. The joint distribution encodes the marginal distributions, i.e. the distributions of each of the individual random variables and the conditional probability distributions, which deal with how the outputs of one random variable are distributed when given information on the outputs of the other random variable(s).
In the formal mathematical setup of measure theory, the joint distribution is given by the pushforward measure, by the map obtained by pairing together the given random variables, of the sample space's probability measure.
In the case of realvalued random variables, the joint distribution, as a particular multivariate distribution, may be expressed by a multivariate cumulative distribution function, or by a multivariate probability density function together with a multivariate probability mass function. In the special case of continuous random variables, it is sufficient to consider probability density functions, and in the case of discrete random variables, it is sufficient to consider probability mass functions.
Examples
Draws from an urn
Each of two urns contains twice as many red balls as blue balls, and no others, and one ball is randomly selected from each urn, with the two draws independent of each other. Let [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math] be discrete random variables associated with the outcomes of the draw from the first urn and second urn respectively. The probability of drawing a red ball from either of the urns is 2/3, and the probability of drawing a blue ball is 1/3. The joint probability distribution is presented in the following table:
A=Red  A=Blue  P(B)  

B=Red  (2/3)(2/3)=4/9  (1/3)(2/3)=2/9  4/9+2/9=2/3 
B=Blue  (2/3)(1/3)=2/9  (1/3)(1/3)=1/9  2/9+1/9=1/3 
P(A)  4/9+2/9=2/3  2/9+1/9=1/3 
Each of the four inner cells shows the probability of a particular combination of results from the two draws; these probabilities are the joint distribution. In any one cell the probability of a particular combination occurring is (since the draws are independent) the product of the probability of the specified result for A and the probability of the specified result for B. The probabilities in these four cells sum to 1, as with all probability distributions.
Moreover, the final row and the final column give the marginal probability distribution for A and the marginal probability distribution for B respectively. For example, for A the first of these cells gives the sum of the probabilities for A being red, regardless of which possibility for B in the column above the cell occurs, as 2/3. Thus the marginal probability distribution for [math]\displaystyle{ A }[/math] gives [math]\displaystyle{ A }[/math]'s probabilities unconditional on [math]\displaystyle{ B }[/math], in a margin of the table.
Coin flips
Consider the flip of two fair coins; let [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math] be discrete random variables associated with the outcomes of the first and second coin flips respectively. Each coin flip is a Bernoulli trial and has a Bernoulli distribution. If a coin displays "heads" then the associated random variable takes the value 1, and it takes the value 0 otherwise. The probability of each of these outcomes is 1/2, so the marginal (unconditional) density functions are
 [math]\displaystyle{ P(A)=1/2 \quad \text{for} \quad A\in \{0, 1\}; }[/math]
 [math]\displaystyle{ P(B)=1/2 \quad \text{for} \quad B\in \{0, 1\}. }[/math]
The joint probability mass function of [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math] defines probabilities for each pair of outcomes. All possible outcomes are
 [math]\displaystyle{ (A=0,B=0), (A=0,B=1), (A=1,B=0), (A=1,B=1). }[/math]
Since each outcome is equally likely the joint probability mass function becomes
 [math]\displaystyle{ P(A,B)=1/4 \quad \text{for} \quad A,B\in\{0,1\}. }[/math]
Since the coin flips are independent, the joint probability mass function is the product of the marginals:
 [math]\displaystyle{ P(A,B)=P(A)P(B) \quad \text{for} \quad A,B \in\{0,1\}. }[/math]
Rolling a dice
Consider the roll of a fair dice and let [math]\displaystyle{ A=1 }[/math] if the number is even (i.e. 2, 4, or 6) and [math]\displaystyle{ A=0 }[/math] otherwise. Furthermore, let [math]\displaystyle{ B=1 }[/math] if the number is prime (i.e. 2, 3, or 5) and [math]\displaystyle{ B=0 }[/math] otherwise.
1  2  3  4  5  6  

A  0  1  0  1  0  1 
B  0  1  1  0  1  0 
Then, the joint distribution of [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math], expressed as a probability mass function, is
 [math]\displaystyle{ \mathrm{P}(A=0,B=0)=P\{1\}=\frac{1}{6},\quad \quad \mathrm{P}(A=1,B=0)=P\{4,6\}=\frac{2}{6}, }[/math]
 [math]\displaystyle{ \mathrm{P}(A=0,B=1)=P\{3,5\}=\frac{2}{6},\quad \quad \mathrm{P}(A=1,B=1)=P\{2\}=\frac{1}{6}. }[/math]
These probabilities necessarily sum to 1, since the probability of some combination of [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math] occurring is 1.
Marginal probability distribution
If more than one random variable is defined in a random experiment, it is important to distinguish between the joint probability distribution of X and Y and the probability distribution of each variable individually. The individual probability distribution of a random variable is referred to as its marginal probability distribution. In general, the marginal probability distribution of X can be determined from the joint probability distribution of X and other random variables.
If the joint probability density function of random variable X and Y is [math]\displaystyle{ f_{X,Y}(x,y) }[/math] , the marginal probability density function of X and Y, which defines the marginal distribution, is given by:
[math]\displaystyle{ f_{X}(x)= \int f_{X,Y}(x,y) \; dy }[/math]
[math]\displaystyle{ f_{Y}(y)= \int f_{X,Y}(x,y) \; dx }[/math]
where the first integral is over all points in the range of (X,Y) for which X=x and the second integral is over all points in the range of (X,Y) for which Y=y.^{[2]}
Joint cumulative distribution function
For a pair of random variables [math]\displaystyle{ X,Y }[/math], the joint cumulative distribution function (CDF) [math]\displaystyle{ F_{XY} }[/math] is given by^{[3]}^{:p. 89}
[math]\displaystyle{ F_{X,Y}(x,y) = \operatorname{P}(X\leq x,Y\leq y) }[/math] 

( ) 
where the righthand side represents the probability that the random variable [math]\displaystyle{ X }[/math] takes on a value less than or equal to [math]\displaystyle{ x }[/math] and that [math]\displaystyle{ Y }[/math] takes on a value less than or equal to [math]\displaystyle{ y }[/math].
For [math]\displaystyle{ N }[/math] random variables [math]\displaystyle{ X_1,\ldots,X_N }[/math], the joint CDF [math]\displaystyle{ F_{X_1,\ldots,X_N} }[/math] is given by
[math]\displaystyle{ F_{X_1,\ldots,X_N}(x_1,\ldots,x_N) = \operatorname{P}(X_1 \leq x_1,\ldots,X_N \leq x_N) }[/math] 

( ) 
Interpreting the [math]\displaystyle{ N }[/math] random variables as a random vector [math]\displaystyle{ \mathbf{X} = (X_1,\ldots,X_N)^T }[/math] yields a shorter notation:
 [math]\displaystyle{ F_{\mathbf{X}}(\mathbf{x}) = \operatorname{P}(X_1 \leq x_1,\ldots,X_N \leq x_N) }[/math]
Joint density function or mass function
Discrete case
The joint probability mass function of two discrete random variables [math]\displaystyle{ X, Y }[/math] is:
[math]\displaystyle{ p_{X,Y}(x,y) = \mathrm{P}(X=x\ \mathrm{and}\ Y=y) }[/math] 

( ) 
or written in terms of conditional distributions
 [math]\displaystyle{ p_{X,Y}(x,y) = \mathrm{P}(Y=y \mid X=x) \cdot \mathrm{P}(X=x) = \mathrm{P}(X=x \mid Y=y) \cdot \mathrm{P}(Y=y) }[/math]
where [math]\displaystyle{ \mathrm{P}(Y=y \mid X=x) }[/math] is the probability of [math]\displaystyle{ Y = y }[/math] given that [math]\displaystyle{ X = x }[/math].
The generalization of the preceding twovariable case is the joint probability distribution of [math]\displaystyle{ n\, }[/math] discrete random variables [math]\displaystyle{ X_1, X_2, \dots,X_n }[/math] which is:
[math]\displaystyle{ p_{X_1,\ldots,X_n}(x_1,\ldots,x_n) = \mathrm{P}(X_1=x_1\text{ and }\dots\text{ and }X_n=x_n) }[/math] 

( ) 
or equivalently
 [math]\displaystyle{ \begin{align} p_{X_1,\ldots,X_n}(x_1,\ldots,x_n) & = \mathrm{P}(X_1=x_1) \cdot \mathrm{P}(X_2=x_2\mid X_1=x_1) \\ & \cdot \mathrm{P}(X_3=x_3\mid X_1=x_1,X_2=x_2) \\ & \dots \\ & \cdot P(X_n=x_n\mid X_1=x_1,X_2=x_2,\dots,X_{n1}=x_{n1}). \end{align} }[/math].
This identity is known as the chain rule of probability.
Since these are probabilities, in the twovariable case
 [math]\displaystyle{ \sum_i \sum_j \mathrm{P}(X=x_i\ \mathrm{and}\ Y=y_j) = 1,\, }[/math]
which generalizes for [math]\displaystyle{ n\, }[/math] discrete random variables [math]\displaystyle{ X_1, X_2, \dots , X_n }[/math] to
 [math]\displaystyle{ \sum_{i} \sum_{j} \dots \sum_{k} \mathrm{P}(X_1=x_{1i},X_2=x_{2j}, \dots, X_n=x_{nk}) = 1.\; }[/math]
Continuous case
The joint probability density function [math]\displaystyle{ f_{X,Y}(x,y) }[/math] for two continuous random variables is defined as the derivative of the joint cumulative distribution function (see Eq.1):
[math]\displaystyle{ f_{X,Y}(x,y) = \frac{\partial^2 F_{X,Y}(x,y)}{\partial x \partial y} }[/math] 

( ) 
This is equal to:
 [math]\displaystyle{ f_{X,Y}(x,y) = f_{Y\mid X}(y\mid x)f_X(x) = f_{X\mid Y}(x\mid y)f_Y(y) }[/math]
where [math]\displaystyle{ f_{Y\mid X}(y\mid x) }[/math] and [math]\displaystyle{ f_{X\mid Y}(x\mid y) }[/math] are the conditional distributions of [math]\displaystyle{ Y }[/math] given [math]\displaystyle{ X=x }[/math] and of [math]\displaystyle{ X }[/math] given [math]\displaystyle{ Y=y }[/math] respectively, and [math]\displaystyle{ f_X(x) }[/math] and [math]\displaystyle{ f_Y(y) }[/math] are the marginal distributions for [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] respectively.
The definition extends naturally to more than two random variables:
[math]\displaystyle{ f_{X_1,\ldots,X_n}(x_1,\ldots,x_n) = \frac{\partial^n F_{X_1,\ldots,X_n}(x_1,\ldots,x_n)}{\partial x_1 \ldots \partial x_n} }[/math] 

( ) 
Again, since these are probability distributions, one has
 [math]\displaystyle{ \int_x \int_y f_{X,Y}(x,y) \; dy \; dx= 1 }[/math]
respectively
 [math]\displaystyle{ \int_{x_1} \ldots \int_{x_n} f_{X_1,\ldots,X_n}(x_1,\ldots,x_n) \; dx_n \ldots \; dx_1 = 1 }[/math]
Mixed case
The "mixed joint density" may be defined where one or more random variables are continuous and the other random variables are discrete. With one variable of each type
 [math]\displaystyle{ \begin{align} f_{X,Y}(x,y) = f_{X \mid Y}(x \mid y)\mathrm{P}(Y=y)= \mathrm{P}(Y=y \mid X=x) f_X(x). \end{align} }[/math]
One example of a situation in which one may wish to find the cumulative distribution of one random variable which is continuous and another random variable which is discrete arises when one wishes to use a logistic regression in predicting the probability of a binary outcome Y conditional on the value of a continuously distributed outcome [math]\displaystyle{ X }[/math]. One must use the "mixed" joint density when finding the cumulative distribution of this binary outcome because the input variables [math]\displaystyle{ (X,Y) }[/math] were initially defined in such a way that one could not collectively assign it either a probability density function or a probability mass function. Formally, [math]\displaystyle{ f_{X,Y}(x,y) }[/math] is the probability density function of [math]\displaystyle{ (X,Y) }[/math] with respect to the product measure on the respective supports of [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math]. Either of these two decompositions can then be used to recover the joint cumulative distribution function:
 [math]\displaystyle{ \begin{align} F_{X,Y}(x,y)&=\sum\limits_{t\le y}\int_{s=\infty}^x f_{X,Y}(s,t)\;ds. \end{align} }[/math]
The definition generalizes to a mixture of arbitrary numbers of discrete and continuous random variables.
Additional properties
Joint distribution for independent variables
In general two random variables [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] are independent if and only if the joint cumulative distribution function satisfies
 [math]\displaystyle{ F_{X,Y}(x,y) = F_X(x) \cdot F_Y(y) }[/math]
Two discrete random variables [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] are independent if and only if the joint probability mass function satisfies
 [math]\displaystyle{ P(X = x \ \mbox{and} \ Y = y ) = P( X = x) \cdot P( Y = y) }[/math]
for all [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math].
While the number of independent random events grows, the related joint probability value decreases rapidly to zero, according to a negative exponential law.
Similarly, two absolutely continuous random variables are independent if and only if
 [math]\displaystyle{ f_{X,Y}(x,y) = f_X(x) \cdot f_Y(y) }[/math]
for all [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math]. This means that acquiring any information about the value of one or more of the random variables leads to a conditional distribution of any other variable that is identical to its unconditional (marginal) distribution; thus no variable provides any information about any other variable.
Joint distribution for conditionally dependent variables
If a subset [math]\displaystyle{ A }[/math] of the variables [math]\displaystyle{ X_1,\cdots,X_n }[/math] is conditionally dependent given another subset [math]\displaystyle{ B }[/math] of these variables, then the probability mass function of the joint distribution is [math]\displaystyle{ \mathrm{P}(X_1,\ldots,X_n) }[/math]. [math]\displaystyle{ \mathrm{P}(X_1,\ldots,X_n) }[/math] is equal to [math]\displaystyle{ P(B)\cdot P(A\mid B) }[/math]. Therefore, it can be efficiently represented by the lowerdimensional probability distributions [math]\displaystyle{ P(B) }[/math] and [math]\displaystyle{ P(A\mid B) }[/math]. Such conditional independence relations can be represented with a Bayesian network or copula functions.
Covariance
When two or more random variables are defined on a probability space, it is useful to describe how they vary together; that is, it is useful to measure the relationship between the variables. A common measure of the relationship between two random variables is the covariance. Covariance is a measure of linear relationship between the random variables. If the relationship between the random variables is nonlinear, the covariance might not be sensitive to the relationship, which means, it does not relate the correlation between two variables.
The covariance between the random variable X and Y, denoted as cov(X,Y), is :
[math]\displaystyle{ \sigma_{XY}=E[(X\mu_x)(Y\mu_y)]=E(XY)\mu_x\mu_y }[/math]^{[4]}
Correlation
There is another measure of the relationship between two random variables that is often easier to interpret than the covariance.
The correlation just scales the covariance by the product of the standard deviation of each variable. Consequently, the correlation is a dimensionless quantity that can be used to compare the linear relationships between pairs of variables in different units. If the points in the joint probability distribution of X and Y that receive positive probability tend to fall along a line of positive (or negative) slope, ρ_{XY} is near +1 (or −1). If ρ_{XY} equals +1 or −1, it can be shown that the points in the joint probability distribution that receive positive probability fall exactly along a straight line. Two random variables with nonzero correlation are said to be correlated. Similar to covariance, the correlation is a measure of the linear relationship between random variables.
The correlation between random variable X and Y, denoted as
[math]\displaystyle{ \rho_{XY}=\frac{cov(X,Y)}{\sqrt{V(X)V(Y)}}=\frac{\sigma_{XY}}{\sigma_X\sigma_Y} }[/math]
Important named distributions
Named joint distributions that arise frequently in statistics include the multivariate normal distribution, the multivariate stable distribution, the multinomial distribution, the negative multinomial distribution, the multivariate hypergeometric distribution, and the elliptical distribution.
See also
 Bayesian programming
 Chow–Liu tree
 Conditional probability
 Copula (probability theory)
 Disintegration theorem
 Multivariate statistics
 Statistical interference
 Pairwise independent distribution
References
 ↑ Feller, William (1957) (in en). An introduction to probability theory and its applications, vol 1, 3rd edition. pp. 217–218. ISBN 9780471257080.
 ↑ Montgomery, Douglas C. (19 November 2013). Applied statistics and probability for engineers. Runger, George C. (Sixth ed.). Hoboken, NJ. ISBN 9781118539712. OCLC 861273897.
 ↑ Park,Kun Il (2018). Fundamentals of Probability and Stochastic Processes with Applications to Communications. Springer. ISBN 9783319680743.
 ↑ Montgomery, Douglas C. (19 November 2013). Applied statistics and probability for engineers. Runger, George C. (Sixth ed.). Hoboken, NJ. ISBN 9781118539712. OCLC 861273897.
External links
 Hazewinkel, Michiel, ed. (2001), "Joint distribution", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 9781556080104, https://www.encyclopediaofmath.org/index.php?title=p/j054260
 Hazewinkel, Michiel, ed. (2001), "Multidimensional distribution", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 9781556080104, https://www.encyclopediaofmath.org/index.php?title=p/m065120
 A modern introduction to probability and statistics : understanding why and how. Dekking, Michel, 1946. London: Springer. 2005. ISBN:9781852338961. OCLC 262680588.
 "Joint continuous density function". http://planetmath.org/?op=getobj&from=objects&id={{{id}}}.
 Mathworld: Joint Distribution Function
Original source: https://en.wikipedia.org/wiki/Joint probability distribution.
Read more 