The joint probability function of two discrete random variables can be displayed graphically in a 3-dimensional bar chart that is closely related to a 2-dimensional bar chart for a single variable.
Maximum and minimum of three rolled dice
Consider rolls of three fair dice for which there is probability \(\frac 1 6\) for each value. We define \(X\) and \(Y\) to be the maximum and minimum of the three values. We now give (without proof) their the joint probability function.
\[ p(x,y) \;\;=\;\; \begin{cases} {\frac 1 {6^3}} & \quad\text{if }x = y \;\;\text{ and }\;\; 1 \le x,y \le 6 \\[0.4em] {\frac {x-y}{6^2}} & \quad\text{if } 1 \le y \lt x \le 6 \\[0.4em] 0 & \quad\text{otherwise} \end{cases} \]The diagram below shows a 3-dimensional bar chart of these probabilities.