Week 9: Inequalities and Identities; Joint and Marginal Distributions
Week 9: Inequalities and Identities; Joint and Marginal Distributions
Reading: Casella & Berger (C&B) §3.6 and §4.1
| Lecture | Date | Topics | C&B |
|---|---|---|---|
| 9.1 | Tue. Nov. 24 | Chebychev’s Inequality and other probability inequalities; recursion relations; Stein’s Lemma; the $\chi^2$ identity; Hwang’s identities. Random vectors; joint pmfs and pdfs; marginal distributions | §3.6, §4.1 |
There is no class on Thursday, Nov. 26 (Thanksgiving).
Notation.
- $\mu = \mathrm{E}X$ and $\sigma^2 = \mathrm{Var}\, X$. $Z$ denotes a $\mathrm{n}(0, 1)$ random variable.
- $X_{\alpha, \beta}$ denotes a gamma($\alpha$, $\beta$) random variable, and $\chi^2_p$ a chi squared random variable with $p$ degrees of freedom.
- $I_A(x)$ is the indicator function of the set $A$: 1 if $x \in A$ and 0 otherwise.
- $(X, Y)$ is a bivariate random vector. $f_{X,Y}(x, y)$, or simply $f(x, y)$, is its joint pmf or pdf. The marginal pmfs or pdfs are $f_X(x)$ and $f_Y(y)$.
Inequalities and Identities
Statistical theory is full of inequalities and identities.
- Marshall and Olkin (1979) collect inequalities based on majorization.
- Hardy, Littlewood, and Pólya (1952) is a compendium of classic inequalities.
- This section covers inequalities and identities that come from probabilistic arguments.
- Those that rely on properties of numbers and functions (Hölder, Cauchy–Schwarz, Jensen) come in §4.7.
Way of thinking. When an exact answer is out of reach, there are two moves.
- Bound it: throw away part of an integral, and what is left is smaller (Chebychev).
- Trade it: integration by parts (or shifting a summation index) turns one expectation into another that is easier to compute (Stein, Hwang).
1. Probability inequalities
The most famous, and perhaps most useful, probability inequality is Chebychev’s Inequality. Its usefulness comes from its wide applicability. As with many important results, its proof is almost trivial.
Theorem 3.6.1 (Chebychev’s Inequality). Let $X$ be a random variable and let $g(x)$ be a nonnegative function. Then, for any $r > 0$,
\[P\big( g(X) \ge r \big) \le \frac{\mathrm{E}g(X)}{r}.\]Proof.
\[\begin{aligned} \mathrm{E}g(X) &= \int_{-\infty}^{\infty} g(x) f_X(x)\, dx \\ &\ge \int_{\lbrace x : g(x) \ge r \rbrace} g(x) f_X(x)\, dx && (g \text{ is nonnegative}) \\ &\ge r \int_{\lbrace x : g(x) \ge r \rbrace} f_X(x)\, dx \\ &= r P\big( g(X) \ge r \big). && (\text{definition}) \end{aligned}\]Rearranging now produces the desired inequality. $\square$
- The same proof without integrals. For every $x$, $g(x) \ge r\, I_{\lbrace g \ge r \rbrace}(x)$: if $g(x) \ge r$ the right side is $r$, and otherwise it is $0 \le g(x)$. Taking expectations of both sides (expectation preserves $\le$, Theorem 2.2.5) gives $\mathrm{E}g(X) \ge r P(g(X) \ge r)$. This version covers discrete, continuous, and mixed $X$ at once.
- Two steps lose information. The first $\ge$ drops the part of $\mathrm{E}g(X)$ where $g(X) < r$; the second replaces $g(x)$ by its lower bound $r$ where $g(x) \ge r$. The bound is tight only if both losses are zero, that is, if $g(X)$ takes only the values 0 and $r$ (see the attainment example below).
- With $g(x) = \lvert x \rvert$, this is Markov’s Inequality, $P(\lvert X \rvert \ge r) \le \mathrm{E}\lvert X \rvert / r$. C&B state it in Miscellanea 3.8.2 (Lemma 3.8.3) for $Y \ge 0$: $P(Y \ge r) \le \mathrm{E}Y/r$, with equality if and only if $P(Y = r) = p = 1 - P(Y = 0)$ for some $0 < p \le 1$.
- With $g(x) = e^{tx}$ for $t > 0$ and $r = e^{ta}$, it gives the mgf bound $P(X \ge a) \le e^{-at} M_X(t)$ (Exercise 3.45), since $X \ge a \iff e^{tX} \ge e^{ta}$. This bound needs the mgf to exist, but it decays exponentially in $a$ when it does.
Example 3.6.2 (Illustrating Chebychev). The most widespread use of Chebychev’s Inequality involves means and variances. Let $g(x) = (x - \mu)^2/\sigma^2$, where $\mu = \mathrm{E}X$ and $\sigma^2 = \mathrm{Var}\, X$. For convenience write $r = t^2$. Then
\[P\left( \frac{(X - \mu)^2}{\sigma^2} \ge t^2 \right) \le \frac{1}{t^2} \mathrm{E}\frac{(X - \mu)^2}{\sigma^2} = \frac{1}{t^2}.\]Doing some obvious algebra, we get the inequality
\[P(\lvert X - \mu \rvert \ge t\sigma) \le \frac{1}{t^2}\]and its companion
\[P(\lvert X - \mu \rvert < t\sigma) \ge 1 - \frac{1}{t^2},\]which gives a universal bound on the deviation $\lvert X - \mu \rvert$ in terms of $\sigma$. For example, taking $t = 2$, we get
\[P(\lvert X - \mu \rvert \ge 2\sigma) \le \frac{1}{2^2} = .25,\]so there is at least a 75% chance that a random variable will be within $2\sigma$ of its mean (no matter what the distribution of $X$).
- The bound is informative only for $t > 1$; for $t \le 1$ it says $P \le 1/t^2 \ge 1$, which is true of every probability.
- “Universal” is the point: the same $1/t^2$ holds for the binomial, the gamma, a distribution estimated from data, or one we know nothing about except its mean and variance. In Chapter 5 this gives the Weak Law of Large Numbers: applied to a sample mean with variance $\sigma^2/n$, it shows $P(\lvert \bar{X}_n - \mu \rvert \ge \varepsilon) \le \sigma^2/(n\varepsilon^2) \to 0$.
Chebychev cannot be improved without more assumptions. Fix $t \ge 1$ and let $X$ take three values:
\[P(X = \mu - t\sigma) = P(X = \mu + t\sigma) = \frac{1}{2t^2}, \qquad P(X = \mu) = 1 - \frac{1}{t^2}.\]By symmetry $\mathrm{E}X = \mu$, and $\mathrm{Var}\, X = (t\sigma)^2 \cdot \frac{1}{t^2} = \sigma^2$. Here $P(\lvert X - \mu \rvert \ge t\sigma) = \frac{1}{t^2}$ exactly, so the bound is attained. Among all distributions with mean $\mu$ and variance $\sigma^2$, $1/t^2$ is therefore the best possible bound. Ghosh and Meeden (1977; C&B Theorem 3.8.2) show that for the mean $\bar{X}_n$ of $n$ iid observations the Chebychev bound can be attained only when $n = 1$ (for $t \ge 1$) or $n = 2$ (for $t = 1$), and never when $n \ge 3$.
While Chebychev’s Inequality is widely applicable, it is necessarily conservative (see Exercise 3.46 and Miscellanea 3.8.2). In particular, we can often get tighter bounds for specific distributions.
Example 3.6.3 (A normal probability inequality). If $Z$ is standard normal, then
\[P(\lvert Z \rvert \ge t) \le \sqrt{\frac{2}{\pi}} \frac{e^{-t^2/2}}{t}, \quad \text{for all } t > 0. \tag{3.6.1}\]Compare this with Chebychev’s Inequality. For $t = 2$, Chebychev gives $P(\lvert Z \rvert \ge 2) \le .25$, but $\sqrt{2/\pi}\, e^{-2}/2 = .054$, a vast improvement. To prove (3.6.1), write
\[\begin{aligned} P(Z \ge t) &= \frac{1}{\sqrt{2\pi}} \int_t^{\infty} e^{-x^2/2}\, dx \\ &\le \frac{1}{\sqrt{2\pi}} \int_t^{\infty} \frac{x}{t} e^{-x^2/2}\, dx && \left( \text{since } x/t > 1 \text{ for } x > t \right) \\ &= \frac{1}{\sqrt{2\pi}} \frac{e^{-t^2/2}}{t}, \end{aligned}\]and use the fact that $P(\lvert Z \rvert \ge t) = 2P(Z \ge t)$. The trick is the same as in Chebychev: insert a factor $x/t \ge 1$ on the region of integration, which makes the integral larger and, here, also makes it computable because $x e^{-x^2/2}$ has the antiderivative $-e^{-x^2/2}$. A lower bound on $P(\lvert Z \rvert \ge t)$ can be established in a similar way (Exercise 3.47):
\[P(\lvert Z \rvert \ge t) \ge \sqrt{\frac{2}{\pi}} \frac{t}{1 + t^2} e^{-t^2/2}.\]The two bounds differ by the factor $t^2/(1 + t^2) \to 1$, so for large $t$ the normal tail is $P(Z \ge t) \approx \phi(t)/t$, where $\phi$ is the n(0, 1) pdf.
Bounds that use the shape of the distribution. Many other probability inequalities exist, and almost all of them are similar in spirit to Chebychev’s. Tighter bounds need more assumptions. One such assumption is unimodality (Miscellanea 3.8.2, Pukelsheim 1994).
Theorem 3.8.5 (Vysochanskii–Petunin Inequality). Let $X$ have a unimodal pdf, let $\alpha$ be any point, and let $\xi^2 = \mathrm{E}(X - \alpha)^2$. Then
\[P(\lvert X - \alpha \rvert > \varepsilon) \le \begin{cases} \dfrac{4\xi^2}{9\varepsilon^2}, & \varepsilon \ge \sqrt{8/3}\, \xi, \\[2ex] \dfrac{4\xi^2}{3\varepsilon^2} - \dfrac{1}{3}, & \varepsilon \le \sqrt{8/3}\, \xi. \end{cases}\]With $\alpha = \mu$ and $\varepsilon = 3\sigma$, this gives $P(\lvert X - \mu \rvert > 3\sigma) \le \frac{4}{81} < .05$ for every unimodal distribution: the three-sigma rule. Chebychev alone gives only $\frac{1}{9} = .111$. (The related Gauss Inequality, C&B Theorem 3.8.4, measures deviations from the mode instead of an arbitrary point.)
For $Z \sim$ n(0, 1), the table compares the bounds with the exact value of $P(\lvert Z \rvert \ge t)$. Chebychev and Vysochanskii–Petunin are applied with $\mu = 0$, $\sigma = 1$, and $\varepsilon = t$. Each column uses more information about the distribution than the one before.
| $t$ | Chebychev, $1/t^2$ (mean, variance) | Vysochanskii–Petunin (also unimodal) | Normal bound (3.6.1) (the exact pdf) | Exact $P(\lvert Z \rvert \ge t)$ |
|---|---|---|---|---|
| 1 | 1 | 1 | .484 | .317 |
| 1.5 | .444 | .259 | .173 | .134 |
| 2 | .25 | .111 | .054 | .046 |
| 3 | .111 | .049 | .0030 | .0027 |
- Chebychev uses only the mean and variance, so it must hold for every distribution with that mean and variance. That generality costs a factor of 5 at $t = 2$ and 40 at $t = 3$.
- Unimodality alone cuts the Chebychev bound by more than half for $t \ge 1.64$.
- The normal bound uses the shape of the pdf and is within 20% of the exact value by $t = 2$.
Check your understanding.
-
Let $X \sim$ exponential(1), so $\mu = \sigma = 1$. Compare the Chebychev bound on $P(\lvert X - \mu \rvert \ge 2\sigma)$ with the exact probability.
Show answer
Chebychev gives $P(\lvert X - 1 \rvert \ge 2) \le \frac{1}{4} = .25$. Exactly, since $X > 0$, $\lvert X - 1 \rvert \ge 2$ means $X \ge 3$, and $P(X \ge 3) = e^{-3} = .050$. The bound is 5 times too large. The exponential pdf is unimodal, so Vysochanskii–Petunin applies with $\alpha = \mu$; since $2 \ge \sqrt{8/3} = 1.63$, it gives $\frac{4}{9 \cdot 4} = .111$.
-
Let $X \ge 0$ with $\mathrm{E}X = 10$. Use Markov’s Inequality to bound $P(X \ge 50)$, and give a distribution for which the bound is attained.
Show answer
$P(X \ge 50) \le \mathrm{E}X / 50 = .2$. It is attained when $X$ takes only the values 0 and 50: $P(X = 50) = .2$ and $P(X = 0) = .8$, which has $\mathrm{E}X = 10$ and $P(X \ge 50) = .2$.
2. Identities
In this section we present a sampling of various identities that can be useful not only in establishing theorems but also in easing numerical calculations.
Recursion relations. An entire class of identities can be thought of as “recursion relations,” a few of which we have already seen. Recall that if $X$ is Poisson($\lambda$), then
\[P(X = x + 1) = \frac{\lambda}{x + 1} P(X = x), \tag{3.6.2}\]allowing us to calculate Poisson probabilities recursively starting from $P(X = 0) = e^{-\lambda}$. For example, with $\lambda = 2$: $P(X = 0) = e^{-2} = .1353$, then $P(X = 1) = 2(.1353) = .2707$, $P(X = 2) = \frac{2}{2}(.2707) = .2707$, $P(X = 3) = \frac{2}{3}(.2707) = .1804$. No factorials or large powers are computed, which matters for large $x$. Relations like (3.6.2) exist for almost all discrete distributions (see Exercise 3.48). Sometimes they exist in a slightly different form for continuous distributions.
Theorem 3.6.4. Let $X_{\alpha, \beta}$ denote a gamma($\alpha$, $\beta$) random variable with pdf $f(x \mid \alpha, \beta)$, where $\alpha > 1$. Then for any constants $a$ and $b$,
\[P(a < X_{\alpha, \beta} < b) = \beta\big( f(a \mid \alpha, \beta) - f(b \mid \alpha, \beta) \big) + P(a < X_{\alpha - 1, \beta} < b). \tag{3.6.3}\]Proof. By definition,
\[\begin{aligned} P(a < X_{\alpha, \beta} < b) &= \frac{1}{\Gamma(\alpha)\beta^{\alpha}} \int_a^b x^{\alpha - 1} e^{-x/\beta}\, dx \\ &= \frac{1}{\Gamma(\alpha)\beta^{\alpha}} \left[ -x^{\alpha - 1} \beta e^{-x/\beta} \Big\rvert_a^b + \int_a^b (\alpha - 1) x^{\alpha - 2} \beta e^{-x/\beta}\, dx \right], \end{aligned}\]where we have done an integration by parts with $u = x^{\alpha - 1}$ and $dv = e^{-x/\beta}\, dx$. Continuing, we have
\[P(a < X_{\alpha, \beta} < b) = \beta\big( f(a \mid \alpha, \beta) - f(b \mid \alpha, \beta) \big) + \frac{(\alpha - 1)}{\Gamma(\alpha)\beta^{\alpha - 1}} \int_a^b x^{\alpha - 2} e^{-x/\beta}\, dx.\]Using the fact that $\Gamma(\alpha) = (\alpha - 1)\Gamma(\alpha - 1)$, we see that the last term is $P(a < X_{\alpha - 1, \beta} < b)$. $\square$
- If $\alpha$ is an integer, repeated use of (3.6.3) will eventually lead to an integral that can be evaluated analytically (when $\alpha = 1$, the exponential distribution). Thus, we can easily compute these gamma probabilities. This is the same calculation as the gamma–Poisson relationship (3.3.9) in the Week 7 notes.
-
Example. For $\alpha = 3$, $\beta = 1$, $a = 1$, $b = 2$, with $f(x \mid 3, 1) = \frac{1}{2} x^2 e^{-x}$ and $f(x \mid 2, 1) = x e^{-x}$, two steps of (3.6.3) give
\[\begin{aligned} P(1 < X_{3,1} < 2) &= \Big( \tfrac{1}{2} e^{-1} - 2e^{-2} \Big) + \Big( e^{-1} - 2e^{-2} \Big) + \Big( e^{-1} - e^{-2} \Big) \\ &= -.0867 + .0972 + .2325 = .2430 . \end{aligned}\]The first term is negative because the gamma(3, 1) pdf is larger at 2 than at 1 (its mode is at 2).
There is an entire class of identities that rely on integration by parts. The first of these is attributed to Charles Stein, who used it in his work on estimation of multivariate normal means (Stein 1973, 1981).
Lemma 3.6.5 (Stein’s Lemma). Let $X \sim \mathrm{n}(\theta, \sigma^2)$, and let $g$ be a differentiable function satisfying $\mathrm{E}\lvert g’(X) \rvert < \infty$. Then
\[\mathrm{E}\big[ g(X)(X - \theta) \big] = \sigma^2 \mathrm{E}g'(X).\]Proof. The left-hand side is
\[\mathrm{E}\big[ g(X)(X - \theta) \big] = \frac{1}{\sqrt{2\pi}\, \sigma} \int_{-\infty}^{\infty} g(x)(x - \theta) e^{-(x - \theta)^2/(2\sigma^2)}\, dx.\]Use integration by parts with $u = g(x)$ and $dv = (x - \theta) e^{-(x - \theta)^2/(2\sigma^2)}\, dx$, so that $v = -\sigma^2 e^{-(x - \theta)^2/(2\sigma^2)}$, to get
\[\mathrm{E}\big[ g(X)(X - \theta) \big] = \frac{1}{\sqrt{2\pi}\, \sigma} \left[ -\sigma^2 g(x) e^{-(x - \theta)^2/(2\sigma^2)} \Big\rvert_{-\infty}^{\infty} + \sigma^2 \int_{-\infty}^{\infty} g'(x) e^{-(x - \theta)^2/(2\sigma^2)}\, dx \right].\]The condition on $g’$ is enough to ensure that the first term is 0, and what remains on the right-hand side is $\sigma^2 \mathrm{E}g’(X)$. $\square$
- Where the identity comes from. The normal pdf satisfies $\frac{d}{dx} f(x) = -\frac{x - \theta}{\sigma^2} f(x)$. Integration by parts moves the derivative from $f$ to $g$, and this property turns the factor $(x - \theta)$ into $\sigma^2$.
- The boundary term. For a polynomial $g$, $g(x) e^{-(x - \theta)^2/(2\sigma^2)} \to 0$ as $x \to \pm\infty$ because the exponential decays faster than any polynomial grows; this covers all the moment calculations below. For general $g$ with only $\mathrm{E}\lvert g’(X) \rvert < \infty$, a careful proof writes $g(x) - g(\theta) = \int_{\theta}^x g’(u)\, du$ and exchanges the order of integration (Stein 1981).
- Why statisticians care. The identity turns $\mathrm{E}[g(X)(X - \theta)]$, which involves the unknown $\theta$, into $\sigma^2 \mathrm{E}g’(X)$, which can be estimated from data without knowing $\theta$. Stein used this to show that the sample mean of a multivariate normal with dimension $\ge 3$ can be beaten by a shrinkage estimator. The converse also holds: if $\mathrm{E}[g(Z) Z] = \mathrm{E}g’(Z)$ for all suitable $g$, then $Z \sim \mathrm{n}(0, 1)$. This characterization is the starting point of Stein’s method for proving normal approximations.
Example 3.6.6 (Higher-order normal moments). Stein’s Lemma makes calculation of higher-order moments quite easy. For example, if $X \sim \mathrm{n}(\theta, \sigma^2)$, then
\[\begin{aligned} \mathrm{E}X^3 &= \mathrm{E}X^2(X - \theta + \theta) \\ &= \mathrm{E}X^2(X - \theta) + \theta \mathrm{E}X^2 \\ &= 2\sigma^2 \mathrm{E}X + \theta \mathrm{E}X^2 && (g(x) = x^2,\ g'(x) = 2x) \\ &= 2\sigma^2\theta + \theta(\sigma^2 + \theta^2) \\ &= 3\theta\sigma^2 + \theta^3. \end{aligned}\]The same steps with $g(x) = x^n$ give a recursion for all the moments: $\mathrm{E}X^n (X - \theta) = n\sigma^2 \mathrm{E}X^{n - 1}$, so
\[\mathrm{E}X^{n + 1} = \theta\, \mathrm{E}X^n + n\sigma^2\, \mathrm{E}X^{n - 1}, \qquad n = 1, 2, \dots,\]starting from $\mathrm{E}X^0 = 1$ and $\mathrm{E}X = \theta$. For $n = 2$ this is the computation above.
Similar integration-by-parts identities exist for many distributions (see Exercise 3.49 and Hudson 1978). One can also get useful identities by exploiting properties of a particular distribution, as the next theorem shows.
Theorem 3.6.7. Let $\chi^2_p$ denote a chi squared random variable with $p$ degrees of freedom. For any function $h(x)$,
\[\mathrm{E}h(\chi^2_p) = p\, \mathrm{E}\left( \frac{h(\chi^2_{p+2})}{\chi^2_{p+2}} \right), \tag{3.6.4}\]provided the expectations exist.
Proof. The phrase “provided the expectations exist” is a lazy way of avoiding specification of conditions on $h$. In general, reasonable functions will satisfy (3.6.4). We have
\[\begin{aligned} \mathrm{E}h(\chi^2_p) &= \frac{1}{\Gamma(p/2) 2^{p/2}} \int_0^{\infty} h(x) x^{(p/2) - 1} e^{-x/2}\, dx \\ &= \frac{1}{\Gamma(p/2) 2^{p/2}} \int_0^{\infty} \left( \frac{h(x)}{x} \right) x^{((p + 2)/2) - 1} e^{-x/2}\, dx, \end{aligned}\]where we have multiplied the integrand by $x/x$. Now write
\[\Gamma\left( \frac{p}{2} \right) 2^{p/2} = \frac{\Gamma((p + 2)/2) 2^{(p + 2)/2}}{p},\]so we have
\[\mathrm{E}h(\chi^2_p) = \frac{p}{\Gamma((p + 2)/2) 2^{(p + 2)/2}} \int_0^{\infty} \left( \frac{h(x)}{x} \right) x^{((p + 2)/2) - 1} e^{-x/2}\, dx = p\, \mathrm{E}\left( \frac{h(\chi^2_{p+2})}{\chi^2_{p+2}} \right). \qquad \square\]- This is the kernel technique from the Week 7 and Week 8 notes in a new form: $x \cdot x^{(p/2) - 1} e^{-x/2}$ is a $\chi^2_{p+2}$ kernel, so multiplying by $x$ moves us up two degrees of freedom.
Some moment calculations are very easy with (3.6.4). For example, the mean of a $\chi^2_p$ is
\[\mathrm{E}\chi^2_p = p\, \mathrm{E}\left( \frac{\chi^2_{p+2}}{\chi^2_{p+2}} \right) = p\, \mathrm{E}(1) = p,\]and the second moment is
\[\mathrm{E}(\chi^2_p)^2 = p\, \mathrm{E}\left( \frac{(\chi^2_{p+2})^2}{\chi^2_{p+2}} \right) = p\, \mathrm{E}(\chi^2_{p+2}) = p(p + 2).\]So $\mathrm{Var}\, \chi^2_p = p(p + 2) - p^2 = 2p$, as we found from the gamma formulas.
The identity can also be read from right to left. Apply (3.6.4) with $p - 2$ in place of $p$ (for $p > 2$) and $h(x) = 1$:
\[1 = \mathrm{E}(1) = (p - 2)\, \mathrm{E}\left( \frac{1}{\chi^2_p} \right), \qquad \text{so} \qquad \mathrm{E}\left( \frac{1}{\chi^2_p} \right) = \frac{1}{p - 2}, \quad p > 2.\](For $p \le 2$ the expectation is infinite: the $\chi^2_p$ pdf behaves like $x^{(p/2) - 1}$ near 0, and $\int_0 x^{(p/2) - 2}\, dx$ diverges.) This negative moment appears in Chapter 5 as the mean of an $F$ distribution.
We close our section on identities with some discrete analogs of the previous identities. A general version of the two identities in Theorem 3.6.8 is due to Hwang (1982).
Theorem 3.6.8 (Hwang). Let $g(x)$ be a function with $-\infty < \mathrm{E}g(X) < \infty$ and $-\infty < g(-1) < \infty$. Then:
-
(a) If $X \sim$ Poisson($\lambda$),
\[\mathrm{E}\big( \lambda g(X) \big) = \mathrm{E}\big( X g(X - 1) \big). \tag{3.6.5}\] -
(b) If $X \sim$ negative binomial($r$, $p$),
\[\mathrm{E}\big( (1 - p) g(X) \big) = \mathrm{E}\left( \frac{X}{r + X - 1} g(X - 1) \right). \tag{3.6.6}\]
Proof. We will prove part (a), saving part (b) for Exercise 3.50. We have
\[\begin{aligned} \mathrm{E}\big( \lambda g(X) \big) &= \sum_{x=0}^{\infty} \lambda g(x) \frac{e^{-\lambda} \lambda^x}{x!} = \sum_{x=0}^{\infty} g(x) \frac{e^{-\lambda} \lambda^{x+1}}{x!} \frac{(x + 1)}{(x + 1)} \\ &= \sum_{x=0}^{\infty} (x + 1) g(x) \frac{e^{-\lambda} \lambda^{x+1}}{(x + 1)!}. \end{aligned}\]Now transform the summation index, writing $y = x + 1$. As $x$ goes from 0 to $\infty$, $y$ goes from 1 to $\infty$. Thus
\[\begin{aligned} \mathrm{E}\big( \lambda g(X) \big) &= \sum_{y=1}^{\infty} y g(y - 1) \frac{e^{-\lambda} \lambda^y}{y!} \\ &= \sum_{y=0}^{\infty} y g(y - 1) \frac{e^{-\lambda} \lambda^y}{y!} && (\text{added term is } 0) \\ &= \mathrm{E}\big( X g(X - 1) \big), \end{aligned}\]since this last sum is a Poisson($\lambda$) expectation. $\square$
- The added $y = 0$ term is $0 \cdot g(-1) \cdot e^{-\lambda}$, which is 0 only because $g(-1)$ is finite. That is the reason for the condition $-\infty < g(-1) < \infty$.
- The shift $y = x + 1$ is the discrete counterpart of integration by parts: in both, a factor ($x$, or $x - \theta$) is traded for a change in the argument of $g$ ($g(x - 1)$, or $g’(x)$). The Poisson pmf plays the role of the normal pdf through (3.6.2): $x P(X = x) = \lambda P(X = x - 1)$.
- Hwang (1982) used his identity in a manner similar to Stein, proving results about multivariate estimators of Poisson means. It also gives moments, as the next example shows.
Example 3.6.9 (Higher-order Poisson moments). For $X \sim$ Poisson($\lambda$), take $g(x) = x^2$ and use (3.6.5):
\[\mathrm{E}(\lambda X^2) = \mathrm{E}\big( X(X - 1)^2 \big) = \mathrm{E}(X^3 - 2X^2 + X).\]Therefore, the third moment of a Poisson($\lambda$) is
\[\begin{aligned} \mathrm{E}X^3 &= \lambda \mathrm{E}X^2 + 2\mathrm{E}X^2 - \mathrm{E}X \\ &= \lambda(\lambda + \lambda^2) + 2(\lambda + \lambda^2) - \lambda \\ &= \lambda^3 + 3\lambda^2 + \lambda. \end{aligned}\]For the negative binomial, the mean can be calculated by taking $g(x) = r + x$ in (3.6.6):
\[\mathrm{E}\big( (1 - p)(r + X) \big) = \mathrm{E}\left( \frac{X}{r + X - 1} (r + X - 1) \right) = \mathrm{E}X,\]so, rearranging, we get $(\mathrm{E}X)\big( (1 - p) - 1 \big) = -r(1 - p)$, or
\[\mathrm{E}X = \frac{r(1 - p)}{p}.\]Other moments can be calculated similarly.
Check your understanding.
-
Let $X \sim \mathrm{n}(0, \sigma^2)$. Use Stein’s Lemma to find $\mathrm{E}X^4$.
Show answer
Take $\theta = 0$ and $g(x) = x^3$, so $g’(x) = 3x^2$. Then
\[\mathrm{E}X^4 = \mathrm{E}\big[ X^3 (X - 0) \big] = \sigma^2 \mathrm{E}(3X^2) = 3\sigma^4.\]Compare with Homework 3, Problem 8, where $\mathrm{E}X^4 = 3$ for $\sigma = 1$ came from integration by parts done by hand.
-
Let $X \sim$ Poisson($\lambda$). Use Hwang’s identity (3.6.5) with $g(x) = x$ to find $\mathrm{E}X^2$ and $\mathrm{Var}\, X$.
Show answer
$\mathrm{E}(\lambda X) = \mathrm{E}\big( X(X - 1) \big)$, so $\lambda^2 = \mathrm{E}X^2 - \lambda$, that is, $\mathrm{E}X^2 = \lambda + \lambda^2$, and $\mathrm{Var}\, X = \lambda + \lambda^2 - \lambda^2 = \lambda$. Compare the “shift the index” computation of $\mathrm{E}X(X - 1)$ in the Week 7 notes: Hwang’s identity packages that trick.
-
Use (3.6.4) to find $\mathrm{E}(\chi^2_p)^3$.
Show answer
Take $h(x) = x^3$ in (3.6.4), and use the second moment $q(q + 2)$ of a chi squared random variable with $q = p + 2$ degrees of freedom:
\[\mathrm{E}(\chi^2_p)^3 = p\, \mathrm{E}(\chi^2_{p+2})^2 = p(p + 2)(p + 4).\]
Multiple Random Variables
Way of thinking. A joint distribution is a distribution on the plane. Probabilities are sums or double integrals over regions, so draw the region before writing limits of integration. A marginal is obtained by summing or integrating out the other variable. The joint distribution determines the marginals, but the marginals do not determine the joint distribution.
In previous chapters we discussed probability models that involve only one random variable (univariate models). In an experiment it would be very unusual to observe only one numerical value. A health study records weight, height, temperature, and blood pressure on each person, and records them for many people. Each measurement is a random variable, and we need probability models that describe several random variables at once: multivariate models. For the first several sections we will discuss mainly bivariate models, involving two random variables.
3. Random vectors and joint pmfs
Recall that in Definition 1.4.1 a random variable was defined to be a function from a sample space $S$ into the real numbers. A random vector is defined similarly.
Definition 4.1.1. An $n$-dimensional random vector is a function from a sample space $S$ into $\mathbb{R}^n$, $n$-dimensional Euclidean space.
Example 4.1.2 (Sample space for dice). Consider the experiment of tossing two fair dice. The sample space has 36 equally likely points (Example 1.3.10). The sample point $(3, 3)$ denotes the outcome in which both dice show a 3, and $(4, 1)$ the outcome in which the first die shows a 4 and the second a 1. With each sample point associate two numbers,
\[X = \text{sum of the two dice} \qquad \text{and} \qquad Y = \lvert \text{difference of the two dice} \rvert .\]For $(3, 3)$, $X = 6$ and $Y = 0$. For $(4, 1)$, $X = 5$ and $Y = 3$, and these are also the values for $(1, 4)$. This defines the bivariate random vector $(X, Y)$.
Probabilities of events defined in terms of $(X, Y)$ are defined through the corresponding events in $S$. The only two sample points with $X = 5$ and $Y = 3$ are $(4, 1)$ and $(1, 4)$, so
\[P(X = 5, Y = 3) = P\big( \lbrace (4, 1), (1, 4) \rbrace \big) = \frac{2}{36} = \frac{1}{18}.\](Read the comma as “and.”) Similarly, $P(X = 6, Y = 0) = \frac{1}{36}$, since only $(3, 3)$ gives these values, and $P(X = 7, Y \le 4) = \frac{4}{36} = \frac{1}{9}$, since only $(4, 3)$, $(3, 4)$, $(5, 2)$, and $(2, 5)$ give $X = 7$ and $Y \le 4$.
The random vector $(X, Y)$ above is a discrete random vector: it has only countably many (here, finitely many) possible values. For a discrete random vector, the function $f(x, y) = P(X = x, Y = y)$ can be used to compute the probability of any event defined in terms of $(X, Y)$.
Definition 4.1.3. Let $(X, Y)$ be a discrete bivariate random vector. Then the function $f(x, y)$ from $\mathbb{R}^2$ into $\mathbb{R}$ defined by $f(x, y) = P(X = x, Y = y)$ is called the joint probability mass function or joint pmf of $(X, Y)$. If it is necessary to stress that $f$ is the joint pmf of the vector $(X, Y)$ rather than of some other vector, the notation $f_{X,Y}(x, y)$ will be used.
For the dice, $(X, Y)$ has 21 possible values. Table 4.1.1 lists $f(x, y)$ for each.
| $y \backslash x$ | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | $\frac{1}{36}$ | $\frac{1}{36}$ | $\frac{1}{36}$ | $\frac{1}{36}$ | $\frac{1}{36}$ | $\frac{1}{36}$ | |||||
| 1 | $\frac{1}{18}$ | $\frac{1}{18}$ | $\frac{1}{18}$ | $\frac{1}{18}$ | $\frac{1}{18}$ | ||||||
| 2 | $\frac{1}{18}$ | $\frac{1}{18}$ | $\frac{1}{18}$ | $\frac{1}{18}$ | |||||||
| 3 | $\frac{1}{18}$ | $\frac{1}{18}$ | $\frac{1}{18}$ | ||||||||
| 4 | $\frac{1}{18}$ | $\frac{1}{18}$ | |||||||||
| 5 | $\frac{1}{18}$ |
Table 4.1.1. Values of the joint pmf $f(x, y)$; blank cells are 0.
- The diagonal $y = 0$ has probability $\frac{1}{36}$ per cell (one sample point, a double), and every other cell has $\frac{2}{36}$ (two sample points, $(a, b)$ and $(b, a)$).
- $X$ and $Y$ always have the same parity, since $a + b$ and $\lvert a - b \rvert$ differ by an even number. That is why the table is a checkerboard.
- The joint pmf is defined for all $(x, y) \in \mathbb{R}^2$, not just the 21 pairs in the table: $f(x, y) = 0$ for every other $(x, y)$.
Probabilities and expectations from the joint pmf. For any $A \subset \mathbb{R}^2$,
\[P\big( (X, Y) \in A \big) = \sum_{(x, y) \in A} f(x, y).\]Since $f(x, y)$ is nonzero for at most countably many points, this is a countable sum even if $A$ is uncountable. For example, $A = \lbrace (x, y) : x = 7,\ y \le 4 \rbrace$ is a half-infinite line, but the only points of $A$ with $f > 0$ are $(7, 1)$ and $(7, 3)$, so $P(X = 7, Y \le 4) = \frac{1}{18} + \frac{1}{18} = \frac{1}{9}$, as computed from the sample space. Working with the joint pmf is usually simpler than going back to $S$.
Expectations are computed as in the univariate case. For a real-valued function $g(x, y)$, $g(X, Y)$ is a random variable and
\[\mathrm{E}g(X, Y) = \sum_{(x, y) \in \mathbb{R}^2} g(x, y) f(x, y).\]Example 4.1.4 (Continuation of Example 4.1.2). With $g(x, y) = xy$, summing $xy f(x, y)$ over the 21 points of Table 4.1.1 gives
\[\mathrm{E}XY = (2)(0)\tfrac{1}{36} + (4)(0)\tfrac{1}{36} + \cdots + (8)(4)\tfrac{1}{18} + (7)(5)\tfrac{1}{18} = \frac{245}{18} = 13\tfrac{11}{18}.\]The expectation operator keeps the properties of Theorem 2.2.5. For functions $g_1(x, y)$ and $g_2(x, y)$ and constants $a$, $b$, $c$,
\[\mathrm{E}\big( a g_1(X, Y) + b g_2(X, Y) + c \big) = a \mathrm{E}g_1(X, Y) + b \mathrm{E}g_2(X, Y) + c, \tag{4.1.1}\]and these properties follow from the properties of sums exactly as in the univariate case (Exercise 4.2).
What makes a function a joint pmf. $f(x, y) \ge 0$ for every $(x, y)$, since it is a probability, and
\[\sum_{(x, y) \in \mathbb{R}^2} f(x, y) = P\big( (X, Y) \in \mathbb{R}^2 \big) = 1.\]Conversely, any nonnegative function on $\mathbb{R}^2$ that is nonzero for at most countably many $(x, y)$ and sums to 1 is the joint pmf of some bivariate discrete random vector. So we can define a probability model for $(X, Y)$ by writing down $f(x, y)$, without ever constructing the sample space.
Example 4.1.5 (Joint pmf for dice). Define $f(x, y)$ by
\[f(0, 0) = f(0, 1) = \frac{1}{6}, \qquad f(1, 0) = f(1, 1) = \frac{1}{3},\]and $f(x, y) = 0$ for any other $(x, y)$. Then $f$ is nonnegative and sums to 1, so it is the joint pmf of some $(X, Y)$, and, for example, $P(X = Y) = f(0, 0) + f(1, 1) = \frac{1}{2}$. Many sample spaces and functions lead to this joint pmf. One: toss two fair dice, and let $X = 0$ if the first die shows at most 2 and $X = 1$ otherwise, and $Y = 0$ if the second die shows an odd number and $Y = 1$ otherwise (Exercise 4.3).
4. Marginal distributions
Even in a model for the vector $(X, Y)$, we may want probabilities or expectations that involve only one of the variables, such as $P(X = 2)$. $X$ is itself a random variable with pmf $f_X(x) = P(X = x)$. In this context we call $f_X(x)$ the marginal pmf of $X$, to emphasize that it is the pmf of $X$ within a model that gives the joint distribution of $(X, Y)$.
Theorem 4.1.6. Let $(X, Y)$ be a discrete bivariate random vector with joint pmf $f_{X,Y}(x, y)$. Then the marginal pmfs of $X$ and $Y$, $f_X(x) = P(X = x)$ and $f_Y(y) = P(Y = y)$, are given by
\[f_X(x) = \sum_{y \in \mathbb{R}} f_{X,Y}(x, y) \qquad \text{and} \qquad f_Y(y) = \sum_{x \in \mathbb{R}} f_{X,Y}(x, y).\]Proof. We prove the result for $f_X(x)$; the proof for $f_Y(y)$ is similar. For any $x \in \mathbb{R}$, let $A_x = \lbrace (x, y) : -\infty < y < \infty \rbrace$, the vertical line in the plane with first coordinate $x$. Then
\[\begin{aligned} f_X(x) &= P(X = x) \\ &= P(X = x, -\infty < Y < \infty) && \big( P(-\infty < Y < \infty) = 1 \big) \\ &= P\big( (X, Y) \in A_x \big) && (\text{definition of } A_x) \\ &= \sum_{(x, y) \in A_x} f_{X,Y}(x, y) = \sum_{y \in \mathbb{R}} f_{X,Y}(x, y). && \square \end{aligned}\]- In a table such as Table 4.1.1, the marginal of $X$ is the column sums and the marginal of $Y$ is the row sums. They are written in the table’s margins, hence the name.
Example 4.1.7 (Marginal pmf for dice). For each value of $Y$, sum Table 4.1.1 across that row:
\[f_Y(0) = f_{X,Y}(2, 0) + f_{X,Y}(4, 0) + f_{X,Y}(6, 0) + f_{X,Y}(8, 0) + f_{X,Y}(10, 0) + f_{X,Y}(12, 0) = \frac{6}{36} = \frac{1}{6}.\]Similarly,
\[f_Y(1) = \frac{5}{18}, \quad f_Y(2) = \frac{2}{9}, \quad f_Y(3) = \frac{1}{6}, \quad f_Y(4) = \frac{1}{9}, \quad f_Y(5) = \frac{1}{18}.\]These sum to 1, as they must, since these are the only six possible values of $Y$.
The marginal pmf of $X$ or $Y$ is the same as the pmf defined in Chapter 1. It can be used for any probability or expectation that involves only $X$ or only $Y$.
Example 4.1.8 (Dice probabilities). From the marginal pmf of $Y$,
\[P(Y < 3) = f_Y(0) + f_Y(1) + f_Y(2) = \frac{1}{6} + \frac{5}{18} + \frac{2}{9} = \frac{2}{3}, \qquad \mathrm{E}Y^3 = 0^3 f_Y(0) + \cdots + 5^3 f_Y(5) = 20\tfrac{11}{18}.\]But a probability or expectation that involves both $X$ and $Y$, such as $\mathrm{E}XY$, needs the joint pmf.
The marginals do not determine the joint distribution. Many different joint distributions have the same marginals, so it is hopeless to recover $f_{X,Y}$ from $f_X$ and $f_Y$ alone.
Example 4.1.9 (Same marginals, different joint pmf). Define a joint pmf by
\[f(0, 0) = \frac{1}{12}, \qquad f(1, 0) = \frac{5}{12}, \qquad f(0, 1) = f(1, 1) = \frac{3}{12},\]and $f(x, y) = 0$ for all other values. The marginal pmf of $Y$ is $f_Y(0) = f(0, 0) + f(1, 0) = \frac{1}{2}$ and $f_Y(1) = f(0, 1) + f(1, 1) = \frac{1}{2}$. The marginal pmf of $X$ is $f_X(0) = \frac{1}{3}$ and $f_X(1) = \frac{2}{3}$. The joint pmf of Example 4.1.5 is different, yet it has exactly the same marginals: $f_X(0) = \frac{1}{6} + \frac{1}{6} = \frac{1}{3}$ and $f_Y(0) = \frac{1}{6} + \frac{1}{3} = \frac{1}{2}$. The joint pmf carries information, about how $X$ and $Y$ are related, that the marginals do not. For instance, $P(X = Y)$ is $\frac{1}{2}$ under Example 4.1.5 but $\frac{1}{12} + \frac{3}{12} = \frac{1}{3}$ here.
5. Joint pdfs
For random vectors whose components are continuous random variables, the distribution is usually described by a density, as in the univariate case.
Definition 4.1.10. A function $f(x, y)$ from $\mathbb{R}^2$ into $\mathbb{R}$ is called a joint probability density function or joint pdf of the continuous bivariate random vector $(X, Y)$ if, for every $A \subset \mathbb{R}^2$,
\[P\big( (X, Y) \in A \big) = \iint_A f(x, y)\, dx\, dy.\]A joint pdf is used just like a univariate pdf, except that the integrals are double integrals over sets in the plane. The notation $\iint_A$ means that the limits of integration are set so that the function is integrated over all $(x, y) \in A$. Expectations are defined as in the discrete case with integrals replacing sums: for real-valued $g(x, y)$,
\[\mathrm{E}g(X, Y) = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} g(x, y) f(x, y)\, dx\, dy. \tag{4.1.2}\]The joint pdf is defined for all $(x, y) \in \mathbb{R}^2$. It may equal 0 on a large set $A$ if $P((X, Y) \in A) = 0$, but it is still defined there. The marginal pdfs of $X$ and $Y$ are defined as in the discrete case with integrals replacing sums:
\[f_X(x) = \int_{-\infty}^{\infty} f(x, y)\, dy, \quad -\infty < x < \infty, \qquad f_Y(y) = \int_{-\infty}^{\infty} f(x, y)\, dx, \quad -\infty < y < \infty. \tag{4.1.3}\]Any function $f(x, y)$ with $f(x, y) \ge 0$ for all $(x, y) \in \mathbb{R}^2$ and
\[\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f(x, y)\, dx\, dy = 1\]is the joint pdf of some continuous bivariate random vector $(X, Y)$.

Figure. Regions for Examples 4.1.11 (left) and 4.1.12 (right). On the right, $A$ and $B$ denote the parts of $\lbrace x + y \ge 1 \rbrace$ and $\lbrace x + y < 1 \rbrace$ inside the support $\lbrace 0 < x < y \rbrace$. Script: figs/week9_joint.py.
Example 4.1.11 (Calculating joint probabilities, I). Define a joint pdf by
\[f(x, y) = \begin{cases} 6xy^2, & 0 < x < 1 \text{ and } 0 < y < 1, \\ 0, & \text{otherwise}. \end{cases}\](From now on, $f(x, y) = 0$ is understood for $(x, y)$ values not mentioned in the definition.) Clearly $f \ge 0$. Since $f$ is 0 off the unit square, the integral over the plane equals the integral over the square:
\[\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f(x, y)\, dx\, dy = \int_0^1 \int_0^1 6xy^2\, dx\, dy = \int_0^1 3x^2 y^2 \Big\rvert_0^1\, dy = \int_0^1 3y^2\, dy = y^3 \Big\rvert_0^1 = 1.\]Now consider $P(X + Y \ge 1)$. With $A = \lbrace (x, y) : x + y \ge 1 \rbrace$, this is $P((X, Y) \in A)$. Since $f$ is 0 off the unit square, we integrate only over the part of $A$ inside the square: the triangle bounded by $x = 1$, $y = 1$, and $x + y = 1$ (shaded in the left panel of the figure). Writing it in a form that gives limits of integration,
\[A \cap (0, 1)^2 = \lbrace (x, y) : x + y \ge 1,\ 0 < x < 1,\ 0 < y < 1 \rbrace = \lbrace (x, y) : 1 - y \le x < 1,\ 0 < y < 1 \rbrace .\]Hence
\[P(X + Y \ge 1) = \iint_A f(x, y)\, dx\, dy = \int_0^1 \int_{1 - y}^1 6xy^2\, dx\, dy = \int_0^1 3y^2 \big( 1 - (1 - y)^2 \big)\, dy = \int_0^1 (6y^3 - 3y^4)\, dy = \frac{3}{2} - \frac{3}{5} = \frac{9}{10}.\]The contours show why the answer is so large: the density is concentrated near the corner $(1, 1)$.
For the marginal pdf of $X$: if $x \ge 1$ or $x \le 0$, $f(x, y) = 0$ for all $y$, so $f_X(x) = 0$. For $0 < x < 1$, $f(x, y)$ is nonzero only for $0 < y < 1$, so
\[f_X(x) = \int_0^1 6xy^2\, dy = 2xy^3 \Big\rvert_0^1 = 2x, \qquad 0 < x < 1.\]This marginal pdf can be used for probabilities involving only $X$, for example,
\[P\left( \frac{1}{2} < X < \frac{3}{4} \right) = \int_{1/2}^{3/4} 2x\, dx = \frac{9}{16} - \frac{4}{16} = \frac{5}{16}.\]Example 4.1.12 (Calculating joint probabilities, II). Let $f(x, y) = e^{-y}$, $0 < x < y < \infty$. Although $e^{-y}$ does not involve $x$, $f(x, y)$ is a function of $x$, because the set where $f$ is nonzero depends on $x$. An indicator function makes this explicit:
\[f(x, y) = e^{-y} I_{\lbrace (u, v) : 0 < u < v < \infty \rbrace}(x, y).\]To compute $P(X + Y \ge 1)$ directly, we would integrate over $A$ in the right panel of the figure. This region is unbounded, with sides on the lines $x = y$, $x + y = 1$, and $x = 0$, and it would have to be split into at least two parts to write limits of integration. The complement is easier. Its part of the support is the triangle $B$, bounded by $x = y$, $x + y = 1$, and $x = 0$, on which $0 < x < \frac{1}{2}$ and $x < y < 1 - x$. So
\[\begin{aligned} P(X + Y \ge 1) &= 1 - P(X + Y < 1) = 1 - \int_0^{1/2} \int_x^{1 - x} e^{-y}\, dy\, dx \\ &= 1 - \int_0^{1/2} \big( e^{-x} - e^{-(1 - x)} \big)\, dx = 2e^{-1/2} - e^{-1} = .845 . \end{aligned}\]This illustrates that it is almost always helpful to graph the sets of interest when choosing limits of integration.
The joint cdf. The distribution of $(X, Y)$ can also be described by the joint cdf
\[F(x, y) = P(X \le x, Y \le y), \qquad (x, y) \in \mathbb{R}^2 .\]The joint cdf is usually not handy for a discrete random vector. For a continuous bivariate random vector, as in the univariate case,
\[F(x, y) = \int_{-\infty}^{x} \int_{-\infty}^{y} f(s, t)\, dt\, ds,\]and the bivariate Fundamental Theorem of Calculus gives
\[\frac{\partial^2 F(x, y)}{\partial x\, \partial y} = f(x, y) \tag{4.1.4}\]at continuity points of $f(x, y)$. This is useful when an expression for $F(x, y)$ can be found: the mixed partial derivative gives the joint pdf. For example, in Example 4.1.11, $F(x, y) = x^2 y^3$ for $0 < x, y < 1$, and $\frac{\partial^2}{\partial x\, \partial y} x^2 y^3 = 6xy^2$.
Check your understanding.
-
Use Table 4.1.1 to find the marginal pmf value $f_X(7)$, and check it against the distribution of the sum of two dice.
Show answer
Column $x = 7$ has entries at $y = 1, 3, 5$, each $\frac{1}{18}$, so $f_X(7) = \frac{3}{18} = \frac{1}{6}$. Directly, 6 of the 36 outcomes have sum 7: $(1, 6), (2, 5), \dots, (6, 1)$.
-
Let $f(x, y) = 2$ for $0 < x < y < 1$. Find the marginal pdfs, and check whether $f(x, y) = f_X(x) f_Y(y)$.
Show answer
Draw the triangle first. For $0 < x < 1$, $y$ runs from $x$ to 1, so $f_X(x) = \int_x^1 2\, dy = 2(1 - x)$. For $0 < y < 1$, $x$ runs from 0 to $y$, so $f_Y(y) = \int_0^y 2\, dx = 2y$. The product $4(1 - x)y$ is not constant on the triangle, and it is positive on the part of the unit square with $x > y$, where $f = 0$. So $f \ne f_X f_Y$. In §4.2, $f = f_X f_Y$ will be the definition of independence; here the support $\lbrace x < y \rbrace$ already ties $X$ to $Y$.
-
In Example 4.1.11, find $P(X < Y)$.
Show answer
$P(X < Y) = \int_0^1 \int_0^y 6xy^2\, dx\, dy = \int_0^1 3y^4\, dy = \frac{3}{5}$.
Summary of Week 9
Inequalities (§3.6.1):
- Chebychev: $P(g(X) \ge r) \le \mathrm{E}g(X)/r$ for $g \ge 0$. Proof: $g(X) \ge r\, I_{\lbrace g(X) \ge r \rbrace}$, then take expectations.
- Special cases: Markov, $P(\lvert X \rvert \ge r) \le \mathrm{E}\lvert X \rvert/r$; mean–variance, $P(\lvert X - \mu \rvert \ge t\sigma) \le 1/t^2$; mgf, $P(X \ge a) \le e^{-at} M_X(t)$ for $t > 0$.
- Chebychev is attained by a three-point distribution, so it cannot be improved using only $\mu$ and $\sigma^2$. More assumptions give tighter bounds: unimodality (Vysochanskii–Petunin, the three-sigma rule $4/81$), or the exact pdf (normal tail (3.6.1), $P(\lvert Z \rvert \ge t) \le \sqrt{2/\pi}\, e^{-t^2/2}/t$).
Identities (§3.6.2):
| Identity | Distribution | Statement | Source of the trick |
|---|---|---|---|
| (3.6.2) | Poisson($\lambda$) | $P(X = x + 1) = \frac{\lambda}{x + 1} P(X = x)$ | ratio of pmfs |
| (3.6.3) | gamma($\alpha$, $\beta$) | $P(a < X_{\alpha, \beta} < b) = \beta( f(a) - f(b) ) + P(a < X_{\alpha - 1, \beta} < b)$ | integration by parts |
| Stein (Lemma 3.6.5) | $\mathrm{n}(\theta, \sigma^2)$ | $\mathrm{E}[g(X)(X - \theta)] = \sigma^2 \mathrm{E}g’(X)$ | integration by parts |
| (3.6.4) | $X \sim \chi^2_p$ | $\mathrm{E}h(X) = p\, \mathrm{E}[h(Y)/Y]$, where $Y \sim \chi^2_{p+2}$ | kernel of the $p + 2$ chi squared |
| Hwang (3.6.5) | Poisson($\lambda$) | $\mathrm{E}[\lambda g(X)] = \mathrm{E}[X g(X - 1)]$ | shift of summation index |
| Hwang (3.6.6) | negative binomial($r$, $p$) | $\mathrm{E}[(1 - p) g(X)] = \mathrm{E}\big[ \frac{X}{r + X - 1} g(X - 1) \big]$ | shift of summation index |
- Moments from identities: $\mathrm{E}X^{n+1} = \theta \mathrm{E}X^n + n\sigma^2 \mathrm{E}X^{n-1}$ (normal); $\mathrm{E}(\chi^2_p)^k = p(p + 2) \cdots (p + 2k - 2)$; $\mathrm{E}(1/\chi^2_p) = 1/(p - 2)$; $\mathrm{E}X^3 = \lambda^3 + 3\lambda^2 + \lambda$ (Poisson).
Joint and marginal distributions (§4.1):
| Discrete | Continuous | |
|---|---|---|
| Joint | pmf $f(x, y) = P(X = x, Y = y)$ | pdf $f(x, y)$, a density (not a probability) |
| $P((X, Y) \in A)$ | $\sum_{(x, y) \in A} f(x, y)$ | $\iint_A f(x, y)\, dx\, dy$ |
| $\mathrm{E}g(X, Y)$ | $\sum g(x, y) f(x, y)$ | $\iint g(x, y) f(x, y)\, dx\, dy$ |
| Marginal of $X$ | $f_X(x) = \sum_y f(x, y)$ | $f_X(x) = \int f(x, y)\, dy$ |
| Valid if | $f \ge 0$, sums to 1 | $f \ge 0$, integrates to 1 |
- The joint distribution determines the marginals; the marginals do not determine the joint distribution (Example 4.1.9).
- Draw the support and the region before writing limits; integrate over the complement when it is simpler (Example 4.1.12).
- Joint cdf $F(x, y) = P(X \le x, Y \le y)$, and $\partial^2 F/\partial x\, \partial y = f$ at continuity points (4.1.4).
Practice Problems
From C&B §3.7 and §4.8:
- Inequalities: 3.44, 3.45(a), 3.46, 3.47.
- Identities: 3.48 (binomial), 3.49(a), 3.50.
- Joint and marginal distributions: 4.1, 4.2, 4.3, 4.4(a–c), 4.5.
Next week (Dec. 1, 3): conditional distributions and independence (§4.2), bivariate transformations (§4.3), and the rest of Chapter 4.