A constructed shipping model records two things about each parcel, whether it travels by the standard or the express route and whether it receives an extra inspection. Knowing how often parcels go express and how often they are inspected does not in general tell you how often both happen to the same parcel. This lesson builds a table that gives a probability to every pair of recorded values, shows how to check that such a table is valid, and answers questions about both quantities by adding the right cells.
Key terms
Random vector
Definition Let and be random variables defined on the same sample space . The random vector assigns to each outcome in the ordered pair , so a single run of the experiment produces a value of each variable. It is a discrete random vector when and are both discrete, and then with probability its value is one of finitely or countably many pairs. In the same way, random variables on one sample space form a random vector . The order of the coordinates is part of the definition.
In plain words One trial produces several recorded numbers, and the random vector keeps them together in a fixed order, so you always know which number belongs to which variable.
Example In the parcel model, let for the standard route and for express, and let when the parcel gets no extra inspection and when it does. The random vector takes one of the four pairs , , and . The pair means the standard route with inspection, while means express without inspection. The numbers and are codes for categories, so every question about a parcel has to be translated into a statement about these codes.
Joint probability mass function
Definition Let and be discrete random variables on the same sample space. Their joint probability mass function, or joint PMF, is the function defined for all real numbers and by
where the comma means “and”, so the right side is the probability of the event . Every joint PMF has three properties. Each mass is nonnegative, only finitely or countably many pairs have positive mass, and the positive masses add to one,
where the sums run over the pairs with positive mass. Conversely, any function of two variables with these three properties is the joint PMF of some discrete random vector.
In plain words For any two numbers you name, the joint PMF reports how likely it is that equals the first and equals the second in the same trial. For a finite list of pairs, nonnegative masses and a total of one are the two checks to make.
Example The parcel model assigns the masses , , and . All four are nonnegative, and . Every other pair of numbers, such as or , has joint mass . The mass is the probability of standard routing together with inspection, which is a different event from express routing without inspection, whose mass is .
Joint probability table
Definition When and have finitely many possible values, their joint PMF can be written as a joint probability table with one row for each possible value of and one column for each possible value of . The cell in row and column holds , the probability that the row condition and the column condition hold in the same trial. Every outcome produces exactly one pair, so the cells stand for disjoint events, and together these events have probability . A table whose rows and columns list all possible values is therefore a valid joint PMF exactly when no entry is negative and the entries add to .
In plain words The table is the joint PMF laid out as a grid. Say which variable labels the rows, check the entries, and read each cell as a statement about both variables at once.
Example With on the rows and on the columns, the parcel model is
A second proposal with rows and also passes both checks, so it is a valid joint PMF as well. It describes a different model, in which express routing with inspection has probability instead of . A third proposal with rows and has total , so it is not a joint PMF on these four pairs. Dividing every entry by would give a valid table, but of a different model, and it would hide the mistake that produced the extra . A table with an entry such as fails even when its total is .
Joint support
Definition The joint support of a discrete random vector is the set of pairs with . If a pair lies in the joint support, then is a possible value of and is a possible value of , because , and likewise for . The converse fails in general. A possible value of and a possible value of can form a pair of joint mass , so the joint support can be a proper subset of the set of all such pairs.
In plain words The joint support lists the pairs that can actually happen together. Two values that are each possible on their own can still be impossible in combination, and the table shows this with a zero cell.
Example Toss a fair coin twice. Let be the number of heads on the first toss and the total number of heads. The four equally likely outcomes HH, HT, TH and TT give the pairs , , and .
The joint support has four pairs, although has two possible values and has three. The pair is impossible, since a head on the first toss means at least one head in total, and is impossible, since a tail on the first toss allows at most one head. Adding cells gives and , yet and not the product . Multiplying separate probabilities needs independence, and these two variables are not independent.
Event region
Definition Let be a discrete random vector and let be a set of pairs of real numbers. The event has probability
where only pairs of the joint support contribute. The events for different pairs are disjoint, so their probabilities add. The set is the event region, and in a table it is a set of cells. If contains no pair of the joint support, every term of the sum is , and so is the probability.
In plain words Translate the question into a set of cells, mark them, and add their entries. Marking the region first keeps you from counting a cell twice or leaving one out. Two different regions can have the same probability without being the same event.
Example In the parcel table, matching codes means the region , so . Express routing or inspection, including both, means every cell except , so its probability is , which is also . The two answers agree, but the events differ, since the cell lies in the second region and not in the first. The region for both conditions is the single cell , with probability . The region for exactly one condition is , with probability , and the region for neither is the cell , with probability . These three regions split the table, and . The union also agrees with inclusion-exclusion. The bottom row gives and the right column gives , and .
Function of a random pair
Definition Let be a discrete random vector and let be a real-valued function defined at every pair that can take. Then is a discrete random variable on the same sample space, and its PMF is
where the sum runs over the pairs of the joint support with . Each cell passes its whole mass to the value it produces, and cells that produce the same value are added. The values of need not be equally likely, and a value produced by more cells is not automatically more likely.
In plain words Write the new value in each cell, collect the cells by value, and add their probabilities. The answer depends on the masses of the cells, not on how many cells there are.
Example In the parcel model let , the number of the two conditions, express routing and inspection, that hold for the parcel. The value comes only from , the value from and , and the value only from .
The masses add to . The value collects two cells, yet the value is more likely. Another function is the maximum , which equals exactly on the region for express routing or inspection, so and .
Check yourself
- A joint table for two codes and , each or , has the row for and the row for , with columns for and . Find the probability that the codes differ and the PMF of . Is a sum of more likely than a sum of ?
Show the answer
The table is valid, since its entries are nonnegative and add to . The codes differ on the cells and , so . The sum is only at , it is at and , and it is only at . So , and , which add to . A sum of is more likely, because . The comparison rests on the added masses, not on the fact that two cells produce the value .
- Let for and , and for every other pair. Find the constant that makes a joint PMF, and then find .
Show the answer
The values of are , and in the row and , and in the row , with total . Normalization gives , so , and all six masses are positive. The event is the region , so
- Two tickets are drawn without replacement from a box with tickets labeled , and , and all six ordered pairs of different labels are equally likely. Let be the first label and the second. Describe the joint support, find and , and explain what is wrong with computing the first probability as .
Show the answer
The joint support is the set of the six pairs with and in and , each with mass . The pairs , and have mass , so . The event is the region , so .
Adding cells gives , and likewise from the cells and . Using their product as the joint mass would assume that the two draws are independent, and they are not. Drawing ticket first removes it from the box, so the second label cannot also be . The joint table gives the correct answer , and the product of the separate probabilities does not.