Tutorials › VEE Mathematical Statistics › Discrete Marginals by Summation

VEE Mathematical Statistics · Joint Distributions and Marginals · Tutorial 265 of 880

Discrete Marginals by Summation

Derive and check marginal pmfs by summing a joint probability function across the complete support of the other variable.

Intermediate 10 min read

What You'll Learn

  • Define the marginal pmf of either variable in a discrete pair.
  • Sum over the other variable’s complete support, including support-dependent restrictions.
  • Read row and column marginals from a joint probability table.
  • Normalize a joint pmf on a finite support before finding its marginals.
  • Evaluate marginal sums on infinite supports using geometric series.
  • Check marginals by verifying nonnegativity and total probability one.

Why Marginals Are Obtained by Summation

A joint probability function describes two discrete random variables together. A marginal probability mass function (pmf) describes just one of them, without specifying the value of the other. To find the probability that \(X\) equals a particular value, add the joint probabilities for every possible value of \(Y\) that can occur with it. The same reasoning gives the pmf of \(Y\).

The word every matters. The sum must cover the full support of the other variable, not merely the values that happen to be shown in a partial table or that seem most relevant. When the joint support is restricted, the valid values in the sum may depend on the value being held fixed.

Definition: For discrete random variables \(X\) and \(Y\) with joint pmf \(p_{X,Y}(x,y)=P(X=x,Y=y)\), the marginal pmfs are $$ p_X(x)=\sum_{y:\,(x,y)\text{ is in the joint support}} p_{X,Y}(x,y), \qquad p_Y(y)=\sum_{x:\,(x,y)\text{ is in the joint support}} p_{X,Y}(x,y). $$ A joint pmf is taken to be zero outside its support. Thus, either sum may equivalently include all values in the other variable’s support, with zero terms for invalid pairs.

The marginal pmf \(p_X\) gives the probability distribution of \(X\) alone; it does not retain which value of \(Y\) occurred. In a table with \(X\) as the row variable and \(Y\) as the column variable, add across each row to get \(p_X\), and down each column to get \(p_Y\). If the table uses the opposite row and column convention, follow the labels rather than relying on the table’s orientation.

Why the Summation Formula Holds

Fix a possible value \(x\). The event \(\{X=x\}\) is the disjoint union of the events \(\{X=x,Y=y\}\) over all possible values \(y\). No outcome can have two different values of \(Y\) at once, so these events do not overlap. Additivity of probability for disjoint events therefore gives the marginal formula.

$$ \{X=x\}=\bigcup_y \{X=x,Y=y\}, \qquad P(X=x)=\sum_y P(X=x,Y=y)=\sum_y p_{X,Y}(x,y). $$

For a finite support, this is an ordinary finite sum. For a countably infinite support, it is a series of nonnegative terms, and the sum is taken over the entire countable support. In either case, the result must be a valid pmf: its values are nonnegative and sum to one across the support of the marginal variable.

Key check: After finding a marginal, verify that each value is nonnegative and that summing the marginal over its support gives \(1\). The two marginal pmfs must each have total probability \(1\).

Marginals from a Joint Probability Table

A joint table often makes the summation direct, but it is still important to state which variable is being held fixed and which values are being added. The following example uses a complete table, so each row and column contains all joint probabilities for the corresponding marginal value.

Worked Example: Reading Both Marginals from a Complete Table

A hypothetical monitoring study records \(X\), the number of alerts on a sensor during a shift, and \(Y\), the number of alerts during a review period. The joint pmf is given below. Find both marginal pmfs and check their totals.

\(X \backslash Y\)\(y=0\)\(y=1\)\(y=2\)
\(x=0\)0.050.100.15
\(x=1\)0.100.200.10
\(x=2\)0.100.100.10

Method. Add across a row to find \(p_X(x)\), since the row fixes \(X\) while \(Y\) varies. Add down a column to find \(p_Y(y)\), since the column fixes \(Y\) while \(X\) varies.

For \(X\), the three row sums are \(p_X(0)=0.05+0.10+0.15=0.30\), \(p_X(1)=0.10+0.20+0.10=0.40\), and \(p_X(2)=0.10+0.10+0.10=0.30\).

For \(Y\), the column sums are \(p_Y(0)=0.05+0.10+0.10=0.25\), \(p_Y(1)=0.10+0.20+0.10=0.40\), and \(p_Y(2)=0.15+0.10+0.10=0.35\).

Check. The \(X\) marginal sums to \(0.30+0.40+0.30=1.00\). The \(Y\) marginal sums to \(0.25+0.40+0.35=1.00\). The joint table also totals \(1.00\), as required for a joint pmf.

Common mistake avoided: A column sum is not \(p_X(x)\); it fixes a value of \(Y\), so it gives \(p_Y(y)\). Match the variable being held fixed to the marginal being calculated.

Restricted Supports and Variable Summation Limits

A joint support need not be rectangular. For example, a pair may allow only \(y\)-values from zero up to a limit that depends on \(x\). At a fixed \(x\), the marginal sum includes precisely the valid \(y\)-values for that \(x\). At a fixed \(y\), the valid \(x\)-values may have a different range. Writing those limits explicitly prevents omitted or extra terms.

Worked Example: Marginals on a Triangular Support

Suppose a joint pmf has support \(x=0,1,2\) and \(y=0,\ldots,2-x\), with \(p_{X,Y}(x,y)=c(x+1)\) at each valid pair. Find the normalizing constant \(c\), then derive both marginal pmfs.

Step 1: Normalize the joint pmf. When \(x=0\), there are three valid \(y\)-values, each with weight \(c\), for total weight \(3c\). When \(x=1\), there are two valid \(y\)-values, each with weight \(2c\), for total weight \(4c\). When \(x=2\), there is one valid \(y\)-value with weight \(3c\). Thus,

$$ 3c+4c+3c=1 \quad\Longrightarrow\quad c=\frac{1}{10}. $$

Step 2: Sum over \(y\) to find \(p_X\). At \(x=0\), three terms of size \(c\) give \(p_X(0)=3/10\). At \(x=1\), two terms of size \(2c\) give \(p_X(1)=4/10=2/5\). At \(x=2\), one term of size \(3c\) gives \(p_X(2)=3/10\).

Step 3: Sum over valid \(x\)-values to find \(p_Y\). If \(y=0\), all three \(x\)-values are valid, so \(p_Y(0)=c(1+2+3)=6/10=3/5\). If \(y=1\), only \(x=0,1\) are valid, so \(p_Y(1)=c(1+2)=3/10\). If \(y=2\), only \(x=0\) is valid, so \(p_Y(2)=c=1/10\).

Check. The \(X\) probabilities total \(3/10+4/10+3/10=1\), and the \(Y\) probabilities total \(6/10+3/10+1/10=1\). Both marginals are nonnegative and have total probability one.

Common mistake avoided: At \(y=1\), it would be incorrect to include \(x=2\), because \((2,1)\) is outside the joint support. A marginal sum follows the support, not an assumed rectangular range.

Marginals on Infinite Supports

When the support is countably infinite, the same definition applies, but the marginal is found using an infinite series. A frequently useful sum is the geometric series \(\sum_{k=0}^{\infty} r^k=1/(1-r)\), which holds when \(|r|<1\). The convergence condition matters: the formula cannot be used for a ratio whose absolute value is at least one.

Worked Example: Summing an Infinite Joint Support

For nonnegative integers \(x,y\), suppose \(p_{X,Y}(x,y)=c(1/3)^x(1/2)^y\). Find \(c\), derive \(p_X(x)\) and \(p_Y(y)\), and calculate \(P(X=2)\).

Step 1: Find the normalizing constant. Sum over all nonnegative \(x\) and \(y\). The geometric ratios \(1/3\) and \(1/2\) are both less than one, so the geometric-series formula applies:

$$ 1=c\left(\sum_{x=0}^{\infty}(1/3)^x\right) \left(\sum_{y=0}^{\infty}(1/2)^y\right) =c\left(\frac{1}{1-1/3}\right)\left(\frac{1}{1-1/2}\right) =c\left(\frac{3}{2}\right)(2)=3c. $$

Therefore \(c=1/3\).

Step 2: Sum over \(y\) to obtain \(p_X(x)\). Hold \(x\) fixed and sum over every nonnegative integer \(y\):

$$ p_X(x)=\sum_{y=0}^{\infty}\frac{1}{3}(1/3)^x(1/2)^y =\frac{1}{3}(1/3)^x\left(\frac{1}{1-1/2}\right) =\frac{2}{3}(1/3)^x,\qquad x=0,1,2,\ldots. $$

Step 3: Sum over \(x\) to obtain \(p_Y(y)\). Hold \(y\) fixed and sum over every nonnegative integer \(x\):

$$ p_Y(y)=\sum_{x=0}^{\infty}\frac{1}{3}(1/3)^x(1/2)^y =\frac{1}{3}(1/2)^y\left(\frac{1}{1-1/3}\right) =\frac{1}{2}(1/2)^y,\qquad y=0,1,2,\ldots. $$

Step 4: Calculate the requested probability. Substitute \(x=2\) in the marginal: \(P(X=2)=p_X(2)=(2/3)(1/3)^2=2/27\).

Check. Summing \(p_X\) gives \((2/3)\sum_{x=0}^{\infty}(1/3)^x=(2/3)(3/2)=1\). Summing \(p_Y\) gives \((1/2)\sum_{y=0}^{\infty}(1/2)^y=(1/2)(2)=1\). The normalizing constant and both marginals are consistent.

Common mistake avoided: Summing over only a few small \(y\)-values would omit positive probability and produce an incomplete \(p_X(x)\). The full infinite support is handled by the convergent series.

A Reliable Calculation Procedure

For exam problems, make the support and the variable being fixed explicit before doing arithmetic. This is especially useful when the support is restricted or the joint pmf includes an unknown normalizing constant.

1
Write the support.
List valid pairs \((x,y)\), or state the ranges of \(x\) and \(y\). Note whether one range depends on the other variable.
2
Normalize if necessary.
If the joint pmf has an unknown constant, sum its weights over every valid pair and set the result equal to \(1\).
3
Hold one variable fixed.
For \(p_X(x)\), fix \(x\) and sum over valid \(y\). For \(p_Y(y)\), fix \(y\) and sum over valid \(x\).
4
Check each marginal.
Confirm nonnegative values and sum the marginal over its full support to verify that it totals \(1\).

Common Exam Traps

  • Stopping at a partial sum. A marginal includes all possible values of the other variable. An infinite support requires an infinite sum, not a selected finite prefix.
  • Ignoring support restrictions. Do not include pairs outside the joint support, even if their coordinates lie within the separate ranges of \(X\) and \(Y\).
  • Summing in the wrong direction. To find \(p_X(x)\), hold \(x\) fixed and sum over \(y\); to find \(p_Y(y)\), hold \(y\) fixed and sum over \(x\).
  • Forgetting to normalize first. If a proposed joint pmf contains an unknown constant, marginal calculations made before finding that constant will not be probabilities yet.
  • Checking only one marginal. Each marginal must sum to one. A correct total for one does not by itself establish that the other was summed correctly.
Key takeaway: A marginal probability is obtained by adding the joint probabilities over every valid value of the other variable. The support determines the summation limits, and the final marginal must itself be a pmf.

Check Your Understanding

For each problem, write the relevant support and show which joint probabilities are included in the marginal sum.

  1. A joint table has \(X=0,1,2\) and \(Y=0,1\). Its rows, in order of increasing \(X\), are \((0.12,0.08)\), \((0.18,0.22)\), and \((0.10,0.30)\). Find \(p_X(1)\) and \(p_Y(0)\). (Answer: \(p_X(1)=0.40,\ p_Y(0)=0.40\))
  2. On the support \(x=0,1,2\), \(y=0,1\), let \(p_{X,Y}(x,y)=c(x+2)\). Find \(c\) and \(p_Y(1)\). (Answer: \(c=1/18,\ p_Y(1)=1/2\))
  3. For nonnegative integers \(x,y\), let \(p_{X,Y}(x,y)=c(1/4)^x(1/3)^y\). Find \(c\) and \(p_X(2)\). (Answer: \(c=1/2,\ p_X(2)=3/64\))
  4. The support consists of \((0,0),(0,1),(1,0),(1,1),(2,0)\), with joint probabilities proportional to \(x+2y+1\). Find the normalizing constant \(c\) in \(p_{X,Y}(x,y)=c(x+2y+1)\), and find \(p_Y(0)\). (Answer: \(c=1/13,\ p_Y(0)=6/13\))
  5. A joint pmf has support \(x=0,1,2\) and \(y=0,\ldots,2-x\), with \(p_{X,Y}(x,y)=c(x+1)\). Find \(p_X(1)\) and \(p_Y(1)\). (Answer: \(p_X(1)=2/5,\ p_Y(1)=3/10\))
Clinical Biostats