Chapter 2 Exercises
Casella & Berger, Statistical Inference (2nd ed.)
How to use these solutions
- Textbook: George Casella & Roger L. Berger, Statistical Inference, Second Edition (CRC 2024 reprint; the body text matches the 2001 second edition).
- Range: Chapter 2, §2.5 Exercises 2.1–2.40.
- Pages: printed 62–67, PDF 93–98 (approximately PDF page = printed page + 31).
- Companion notes:
ch02-notes.qmd. Miscellanea §2.6 is used for Exercises 2.29 and 2.37.
Exercise 2.1
Find the pdf of \(Y\) and verify that it integrates to 1.
(a) \(Y=X^3\), \(f_X(x)=42x^5(1-x)\), \(0<x<1\). The map \(g\) is strictly increasing on \((0,1)\), \(g^{-1}(y)=y^{1/3}\), \(dy^{-1}/dy=(1/3)y^{-2/3}\), and \(\mathcal{Y}=(0,1)\). \[ f_Y(y)=42\,y^{5/3}(1-y^{1/3})\cdot\frac13 y^{-2/3}=14 y(1-y^{1/3}),\qquad 0<y<1. \] \(\int_0^1 14y\,dy-\int_0^1 14 y^{4/3}\,dy=7-14\cdot(3/7)=1\).
(b) \(Y=4X+3\), \(f_X(x)=7e^{-7x}\), \(x>0\). Then \(g^{-1}(y)=(y-3)/4\), \(|J|=1/4\), and \(\mathcal{Y}=(3,\infty)\). \[ f_Y(y)=\frac74\exp\bigl(-7(y-3)/4\bigr),\qquad y>3. \] This is a location–scale exponential, so the integral is 1.
(c) \(Y=X^2\), \(f_X(x)=30x^2(1-x)^2\), \(0<x<1\). On the support, \(g\) is strictly increasing (\(x>0\)), \(g^{-1}(y)=\sqrt{y}\), \(|J|=1/(2\sqrt{y})\), and \(\mathcal{Y}=(0,1)\). \[ f_Y(y)=30y(1-\sqrt{y})^2\cdot\frac{1}{2\sqrt{y}}=15\sqrt{y}\,(1-\sqrt{y})^2,\qquad 0<y<1. \] Set \(u=\sqrt{y}\), \(dy=2u\,du\). Then \(\int_0^1 15u(1-u)^2\cdot 2u\,du=30\int_0^1(u^2-2u^3+u^4)\,du=30(1/3-1/2+1/5)=1\).
Exercise 2.2
Find the pdf of \(Y\).
(a) \(Y=X^2\), \(X\sim\mathrm{uniform}(0,1)\). The same monotone case as 2.1(c) gives \[ f_Y(y)=\frac{1}{2\sqrt{y}},\qquad 0<y<1. \]
(b) \(Y=-\log X\), \(f_X(x)=\frac{(n+m+1)!}{n!m!}x^n(1-x)^m\), \(0<x<1\). The map \(g\) is decreasing, \(g^{-1}(y)=e^{-y}\), \(|J|=e^{-y}\), and \(\mathcal{Y}=(0,\infty)\). \[ f_Y(y)=\frac{(n+m+1)!}{n!m!}e^{-ny}(1-e^{-y})^m e^{-y} =\frac{(n+m+1)!}{n!m!}e^{-(n+1)y}(1-e^{-y})^m,\quad y>0. \]
(c) \(Y=e^X\), \(f_X(x)=\frac{x}{\sigma^2}\exp(-x^2/(2\sigma^2))\), \(x>0\) (Weibull / Rayleigh kernel). Then \(g^{-1}(y)=\log y\), \(|J|=1/y\), and \(\mathcal{Y}=(1,\infty)\). \[ f_Y(y)=\frac{\log y}{\sigma^2 y}\exp\bigl(-(\log y)^2/(2\sigma^2)\bigr),\qquad y>1. \]
Exercise 2.3
Geometric \(f_X(x)=(1/3)(2/3)^x\), \(x=0,1,\ldots\). Find the pmf of \(Y=X/(X+1)\).
The map \(g(x)=x/(x+1)\) is strictly increasing on \(\{0,1,\ldots\}\), with range \(\{0,1/2,2/3,3/4,\ldots\}\). The inverse is \(x=y/(1-y)\). Thus for \(y=k/(k+1)\), \(k=0,1,2,\ldots\), \[ f_Y\Bigl(\frac{k}{k+1}\Bigr)=f_X(k)=\frac13\Bigl(\frac23\Bigr)^k. \] The pmf is \(0\) at all other points.
Exercise 2.4
A Laplace-type density: \(f(x)=\frac12\lambda e^{-\lambda x}\) (\(x\ge 0\)), \(f(x)=\frac12\lambda e^{\lambda x}\) (\(x<0\)).
(a) \(f\ge 0\), and \[ \int_{-\infty}^0\frac\lambda2 e^{\lambda x}\,dx+\int_0^\infty\frac\lambda2 e^{-\lambda x}\,dx=\frac12+\frac12=1. \]
(b) For \(t<0\): \(F(t)=\int_{-\infty}^t\frac\lambda2 e^{\lambda x}\,dx=\frac12 e^{\lambda t}\). For \(t\ge 0\): \(F(t)=\frac12+\int_0^t\frac\lambda2 e^{-\lambda x}\,dx=1-\frac12 e^{-\lambda t}\).
(c) If \(t\le 0\) then \(P(|X|<t)=0\). If \(t>0\), \[ P(|X|<t)=F(t-)-F(-t)=\bigl(1-\tfrac12 e^{-\lambda t}\bigr)-\tfrac12 e^{-\lambda t}=1-e^{-\lambda t}. \]
Exercise 2.5
Use Theorem 2.1.8 to find the pdf of \(Y=\sin^2 X\) in Example 2.1.2, and compare with differentiating (2.1.6).
\(X\sim\mathrm{uniform}(0,2\pi)\), so \(f_X=1/(2\pi)\). On each monotone piece the solutions of \(\sin^2 x=y\) are \[ x_j=\arcsin\sqrt{y},\quad \pi-\arcsin\sqrt{y},\quad \pi+\arcsin\sqrt{y},\quad 2\pi-\arcsin\sqrt{y}. \] Each \(|dx/dy|\) equals \(1/(2\sqrt{y(1-y)})\). Adding the four branches, \[ f_Y(y)=\frac{4}{2\pi}\cdot\frac{1}{2\sqrt{y(1-y)}}=\frac{1}{\pi\sqrt{y(1-y)}},\qquad 0<y<1. \] This is \(\mathrm{beta}(1/2,1/2)\) (the arcsine law).
From (2.1.6): \(x_1=\arcsin\sqrt{y}\), \(x_2=\pi-\arcsin\sqrt{y}\), \[ F_Y(y)=2\cdot\frac{x_1}{2\pi}+2\cdot\frac{\pi-x_2}{2\pi}=\frac{2}{\pi}\arcsin\sqrt{y}. \] Differentiating: \(F_Y'(y)=\frac{1}{\pi\sqrt{y(1-y)}}\), which matches.
Exercise 2.6
Find the pdf of \(Y\) and verify that it integrates to 1.
(a) \(f_X(x)=\frac12 e^{-|x|}\), \(Y=|X|^3\). For \(y>0\) one has \(x=\pm y^{1/3}\) and \(|dx/dy|=(1/3)y^{-2/3}\). \[ f_Y(y)=2\cdot\frac12 e^{-y^{1/3}}\cdot\frac13 y^{-2/3}=\frac13 y^{-2/3}e^{-y^{1/3}},\qquad y>0. \] Set \(u=y^{1/3}\), \(dy=3u^2\,du\). Then \(\int_0^\infty\frac13 u^{-2}e^{-u}\cdot 3u^2\,du=\int_0^\infty e^{-u}\,du=1\).
(b) \(f_X(x)=\frac38(x+1)^2\), \(-1<x<1\), \(Y=1-X^2\). Then \(\mathcal{Y}=(0,1)\), \(x=\pm\sqrt{1-y}\), and \(|dx/dy|=1/(2\sqrt{1-y})\). \[ \begin{aligned} f_Y(y)&=\frac38\bigl(1+\sqrt{1-y}\bigr)^2\cdot\frac{1}{2\sqrt{1-y}} +\frac38\bigl(1-\sqrt{1-y}\bigr)^2\cdot\frac{1}{2\sqrt{1-y}}\\ &=\frac{3}{8\sqrt{1-y}}\bigl(1+(1-y)\bigr)=\frac{3(2-y)}{8\sqrt{1-y}},\qquad 0<y<1. \end{aligned} \] Set \(u=\sqrt{1-y}\). Then \(\int_0^1\frac{3(2-y)}{8\sqrt{1-y}}\,dy=\frac38\int_0^1(1+u^2)\cdot 2\,du=\frac34\cdot\frac43=1\).
(c) \(Y=1-X^2\) on \(X\le 0\) (so \(Y\in[0,1]\)) and \(Y=1-X\) on \(X>0\) (so \(Y\in(0,1)\)). The range is \((0,1)\), not \((0,2)\): the branch \(Y=1-X\) is never used for \(X\le 0\). For \(0<y<1\) the preimages are \(x=-\sqrt{1-y}\) and \(x=1-y\in(0,1)\): \[ f_Y(y)=\frac38(1-\sqrt{1-y})^2\cdot\frac{1}{2\sqrt{1-y}}+\frac38(2-y)^2. \] (The second term is the density of \(X\) at \(1-y>0\).) These two pieces integrate to \(1/8+7/8=1\).
Exercise 2.7
\(f_X(x)=\frac29(x+1)\), \(-1\le x\le 2\); \(Y=X^2\).
(a) The printed density is \(f_X(x)=\frac29(x+1)\) on \([-1,2]\) (the constant \(9/2\) does not integrate to 1). The range of \(Y=X^2\) is \([0,4]\). For \(0<y<1\) both branches \(x=\pm\sqrt{y}\) lie in the support. \[ f_Y(y)=\frac29(\sqrt{y}+1)\frac{1}{2\sqrt{y}}+\frac29(-\sqrt{y}+1)\frac{1}{2\sqrt{y}}=\frac{2}{9\sqrt{y}},\qquad 0<y<1. \] For \(1<y<4\) only \(x=\sqrt{y}\in(1,2)\) is available, \[ f_Y(y)=\frac29(\sqrt{y}+1)\frac{1}{2\sqrt{y}}=\frac19\bigl(1+y^{-1/2}\bigr). \] The two pieces integrate to \(4/9+5/9=1\).
(b) Take \(A_0=\emptyset\), \(A_1=(-2,0)\), \(A_2=(0,2)\). Then \(A_1\cap\mathcal{X}=(-1,0)\) and \(A_2\cap\mathcal{X}=(0,2)\). On \(A_1\), \(g_1^{-1}(y)=-\sqrt{y}\) lands in \(\mathcal{X}\) only for \(y\in(0,1)\); on \(A_2\), \(g_2^{-1}(y)=\sqrt{y}\) lands in \(\mathcal{X}\) for \(y\in(0,4)\). Summing over pieces (terms whose image does not contain \(y\) vanish automatically) recovers (a). The common-\(\mathcal{Y}\) wording of Theorem 2.1.8 may be relaxed: for each \(y\), sum only over those \(i\) for which \(g_i^{-1}(y)\in A_i\cap\mathcal{X}\).
Exercise 2.8
Verify each cdf and find \(F_X^{-1}(y)\).
Use (2.1.13) throughout: \(F^{-1}(y)=\inf\{x:F(x)\ge y\}\).
(a) \(F(x)=0\) for \(x<0\) and \(1-e^{-x}\) for \(x\ge 0\). The function is right-continuous and nondecreasing, with endpoint limits \(0\) and \(1\), so it is the cdf of an exponential\((1)\). \(F^{-1}(y)=-\log(1-y)\), \(0<y<1\).
(b) For \(x<0\): \(e^x/2\); for \(0\le x<1\): \(1/2\); for \(x\ge 1\): \(1-e^{1-x}/2\). The left limit is \(0\), the right limit is \(1\), the function is right-continuous, and it is flat on \([0,1)\). \[ F^{-1}(y)=\begin{cases} \log(2y), & 0<y\le 1/2,\\ 1-\log\bigl(2(1-y)\bigr), & 1/2<y<1. \end{cases} \] At \(y=1/2\) one has \(\inf\{x:F\ge 1/2\}=0\).
(c) \(F(x)=e^x/4\) for \(x<0\) and \(1-e^{-x}/4\) for \(x\ge 0\). At \(0\) the left limit is \(1/4\) and the right-hand value is \(F(0)=3/4\), so there is a jump of \(1/2\). The function is still right-continuous and nondecreasing, hence a valid cdf. \[ F^{-1}(y)=\begin{cases} \log(4y), & 0<y\le 1/4,\\ 0, & 1/4<y\le 3/4,\\ -\log\bigl(4(1-y)\bigr), & 3/4<y<1. \end{cases} \] On the jump interval the generalized inverse takes the jump point \(0\), so (2.1.13) still applies.
Exercise 2.9
\(f(x)=(x-1)/2\), \(1<x<3\). Find a monotone \(u\) such that \(u(X)\sim U(0,1)\).
By the probability integral transform take \(u=F_X\) (continuous and strictly increasing on the support). \[ F_X(x)=\int_1^x\frac{t-1}{2}\,dt=\frac{(x-1)^2}{4},\qquad 1<x<3. \] Hence \(Y=(X-1)^2/4\sim\mathrm{uniform}(0,1)\).
Exercise 2.10
Discrete \(X\), \(Y=F_X(X)\). Show that \(Y\) is stochastically larger than \(U\sim U(0,1)\).
(a)(b) Let \(x_0\) be a jump point and \(y_0=F_X(x_0)\). Because \(F\) is right-continuous and attains the top of the jump at \(x_0\), one has \(Y=F_X(X)\le y_0\) if and only if \(X\le x_0\), so \(P(Y\le y_0)=F_X(x_0)=y_0\). For all sufficiently small \(\varepsilon>0\), the interval \((y_0,y_0+\varepsilon]\) contains no value of \(Y\) (the next jump has not yet occurred), hence \(F_Y(y_0+\varepsilon)=y_0<y_0+\varepsilon\). Thus \(F_Y(y)\le y\) for every \(y\in(0,1)\), with a strict inequality at some points. Equivalently \(P(Y>y)=1-F_Y(y)\ge 1-y=P(U>y)\), and the inequality is strict for some \(y\).
Exercise 2.11
Standard normal: \(EX^2\); density, mean, and variance of \(Y=|X|\).
(a) Directly: \(EX^2=\mathrm{Var}\,X=1\) (since \(EX=0\)). By Examples 2.1.7 / 2.1.9, \(Y=X^2\sim\chi^2_1\), so \(EY=1\).
(b) \(Y=|X|\) is a folded normal. For \(y>0\) the two branches are \(\pm y\) with \(|dx/dy|=1\), \[ f_Y(y)=\sqrt{\frac{2}{\pi}}e^{-y^2/2},\qquad y>0. \] \[ EY=\sqrt{\frac{2}{\pi}}\int_0^\infty y e^{-y^2/2}\,dy=\sqrt{\frac{2}{\pi}}, \qquad EY^2=EX^2=1,\qquad \mathrm{Var}\,Y=1-\frac{2}{\pi}. \]
Exercise 2.12
\(X\sim U(0,\pi/2)\), a right triangle with fixed adjacent side \(d\), and \(Y=d\tan X\). Find the distribution of \(Y\) and \(EY\).
The map \(g(x)=d\tan x\) is strictly increasing on \((0,\pi/2)\), \(g^{-1}(y)=\arctan(y/d)\), \(|J|=d/(d^2+y^2)\), and \(\mathcal{Y}=(0,\infty)\). With \(f_X=2/\pi\), \[ f_Y(y)=\frac{2}{\pi}\cdot\frac{d}{d^2+y^2},\qquad y>0 \] (a half-Cauchy with scale \(d\)). \[ EY=\frac{2d}{\pi}\int_0^\infty\frac{y}{d^2+y^2}\,dy=\infty \] (the integral diverges logarithmically). The expectation does not exist.
Exercise 2.13
Independent coin tosses; \(X=\) length of the initial run of heads or tails.
\(X=k\) if and only if the first \(k\) tosses agree and toss \(k+1\) differs (or, viewing an infinite sequence, the face changes at trial \(k+1\)). Accounting for both faces, \[ P(X=k)=p^k(1-p)+(1-p)^k p,\qquad k=1,2,\ldots. \] (For \(k=1\): \(p(1-p)+(1-p)p=2p(1-p)\), i.e. the second toss differs from the first.) \[ EX=\sum_{k=1}^\infty k\bigl[p^k(1-p)+p(1-p)^k\bigr] =(1-p)\cdot\frac{p}{(1-p)^2}+p\cdot\frac{1-p}{p^2} =\frac{p}{1-p}+\frac{1-p}{p}. \] When \(p=1/2\), \(EX=2\).
Exercise 2.14
The tail-integral formula for a nonnegative random variable.
(a) \(X\ge 0\) continuous. Write \(EX=\int_0^\infty x f(x)\,dx\) and \(x=\int_0^x dt\). Fubini gives \[ EX=\int_0^\infty\int_t^\infty f(x)\,dx\,dt=\int_0^\infty\bigl(1-F_X(t)\bigr)\,dt. \] (If \(X\) is absolutely integrable then Fubini applies; otherwise both sides are \(\infty\).)
(b) \(X\) takes values in the nonnegative integers. \[ EX=\sum_{k=1}^\infty k P(X=k)=\sum_{k=1}^\infty\sum_{j=0}^{k-1}P(X=k)=\sum_{j=0}^\infty P(X>j)=\sum_{j=0}^\infty\bigl(1-F_X(j)\bigr). \] Part (b) is the discrete counterpart of (a): the integral of the survival function becomes a sum.
Exercise 2.15
\(E(X\vee Y)=EX+EY-E(X\wedge Y)\).
Pointwise, \(X+Y=(X\vee Y)+(X\wedge Y)\) (the larger plus the smaller). Taking expectations yields the identity. Independence is not required, nor is anything beyond existence; if either side is infinite the equality is read in the extended reals.
Exercise 2.16
\(P(T>t)=ae^{-\lambda t}+(1-a)e^{-\mu t}\). Find \(ET\).
\(T\ge 0\) is continuous and \(1-F_T(t)=P(T>t)\). By 2.14(a), \[ ET=\int_0^\infty\bigl(ae^{-\lambda t}+(1-a)e^{-\mu t}\bigr)\,dt=\frac{a}{\lambda}+\frac{1-a}{\mu}. \]
Exercise 2.17
Find the medians of the two densities.
(a) \(f(x)=3x^2\), \(0<x<1\). Then \(F(m)=m^3=1/2\), so \(m=2^{-1/3}\).
(b) Cauchy: \(F(m)=\frac12+\frac1\pi\arctan m\). Then \(F(m)=1/2\Leftrightarrow m=0\).
Exercise 2.18
Continuous \(X\): \(E|X-a|\) is minimized at a median.
Let \(m\) be a median, so \(F(m)=1/2\). For \(a>m\), \[ E|X-a|-E|X-m| =\int_m^a\bigl(F(x)- (1-F(x))\bigr)\,dx =\int_m^a(2F(x)-1)\,dx\ge 0, \] because \(F(x)\ge 1/2\) for \(x\ge m\). The case \(a<m\) is symmetric. Hence the minimum is attained at \(m\). (If \(F\) is flat on a median interval, every point of that interval is a minimizer.)
Exercise 2.19
Differentiate in \(a\) to show that \(E(X-a)^2\) is minimized at \(a=EX\).
Assume \(EX^2<\infty\), so \(E|X-a|^2<\infty\) for every \(a\). Write \[ \psi(a)=\int(x-a)^2 f_X(x)\,dx. \] Difference quotients are dominated by an integrable multiple of \(2(|x|+|a|+1)^2 f\) (using \(EX^2<\infty\)). Theorem 2.4.3 therefore gives \[ \psi'(a)=-2E(X-a),\qquad \psi''(a)=2>0. \] Thus \(\psi'(a)=0\Leftrightarrow a=EX\), and the critical point is a minimum. The needed assumptions are that \(X\) has a density (or at least that \(E(X-a)^2\) may be differentiated in \(a\)) and that \(EX^2<\infty\).
Exercise 2.20
Keep having children until the first daughter. Expected number of children.
Assume independent births with \(P(\text{girl})=p=1/2\). The number of children \(X\) is geometric\((p)\) (trial-count version, as in Example 1.5.4). \(EX=1/p=2\).
Exercise 2.21
For monotone \(g\), prove \(Eg(X)=EY\) with \(Y=g(X)\).
Continuous and increasing: \(f_Y(y)=f_X(g^{-1}(y))\,(g^{-1})'(y)\), so \[ EY=\int_{\mathcal{Y}} y f_X(g^{-1}(y))(g^{-1})'(y)\,dy. \] Set \(x=g^{-1}(y)\), \(y=g(x)\), \(dy=g'(x)\,dx\). Then \((g^{-1})'(y)\,g'(x)=1\), and the integral becomes \(\int g(x)f_X(x)\,dx\). If \(g\) is decreasing then \(|J|=-(g^{-1})'\), the limits reverse, and the signs cancel. Discrete: monotonicity makes \(g^{-1}(y)\) a singleton, so \(EY=\sum g(x)f_X(x)\).
Exercise 2.22
\(f(x)=\frac{4}{\beta^3\sqrt{\pi}}x^2 e^{-x^2/\beta^2}\), \(x>0\).
(a) Set \(u=(x/\beta)^2\), \(x=\beta u^{1/2}\), \(dx=(\beta/2)u^{-1/2}\,du\). \[ \int_0^\infty x^2 e^{-x^2/\beta^2}\,dx=\frac{\beta^3}{2}\int_0^\infty u^{1/2}e^{-u}\,du=\frac{\beta^3}{2}\Gamma(3/2)=\frac{\beta^3}{2}\cdot\frac12\Gamma(1/2)=\frac{\beta^3\sqrt{\pi}}{4}. \] Hence the normalizing constant is correct.
(b) The same substitution: \(EX=\frac{4}{\beta^3\sqrt{\pi}}\cdot\frac{\beta^4}{2}\Gamma(2)=\frac{2\beta}{\sqrt{\pi}}\). \(EX^2=\frac{4}{\beta^3\sqrt{\pi}}\cdot\frac{\beta^5}{2}\Gamma(5/2)=\frac{3\beta^2}{2}\). \(\mathrm{Var}\,X=\frac{3\beta^2}{2}-\frac{4\beta^2}{\pi}\).
Exercise 2.23
\(f(x)=(1+x)/2\), \(-1<x<1\); \(Y=X^2\).
(a) For \(0<y<1\) the two branches are \(\pm\sqrt{y}\). \[ f_Y(y)=\frac{1+\sqrt{y}}{2}\cdot\frac{1}{2\sqrt{y}}+\frac{1-\sqrt{y}}{2}\cdot\frac{1}{2\sqrt{y}}=\frac{1}{2\sqrt{y}}. \]
(b) \(EY=\int_0^1 y\cdot\frac{1}{2\sqrt{y}}\,dy=\frac13\), \(EY^2=\int_0^1 y^2\cdot\frac{1}{2\sqrt{y}}\,dy=\frac15\), \(\mathrm{Var}\,Y=\frac15-\frac19=\frac{4}{45}\). Alternatively \(EY=EX^2=\int_{-1}^1 x^2(1+x)/2\,dx=1/3\).
Exercise 2.24
Means and variances of three distributions.
(a) \(f(x)=ax^{a-1}\), \(0<x<1\) (this is \(\mathrm{beta}(a,1)\)). \(EX=a/(a+1)\), \(EX^2=a/(a+2)\), \(\mathrm{Var}\,X=a/[(a+1)^2(a+2)]\).
(b) Discrete uniform on \(1,\ldots,n\): \(EX=(n+1)/2\), \(\mathrm{Var}\,X=(n^2-1)/12\).
(c) \(f(x)=\frac32(x-1)^2\), \(0<x<2\). With \(u=x-1\), \(EX=1\) and \(E(X-1)^2=\frac32\int_{-1}^1 u^4\,du=\frac35\). Directly, \(EX^2=\frac32\int_0^2 x^2(x-1)^2\,dx=\frac85\), so \(\mathrm{Var}\,X=\frac35\).
Exercise 2.25
Even density: same distribution as \(-X\), and a symmetric mgf.
(a) \(f_{-X}(x)=f_X(-x)|-1|=f_X(-x)=f_X(x)\), so \(X\) and \(-X\) are equal in distribution.
(b) \(M_X(-t)=E e^{-tX}=E e^{t(-X)}=M_{-X}(t)=M_X(t)\). Thus \(M_X\) is an even function, symmetric about \(0\).
Exercise 2.26
Densities symmetric about \(a\).
(a) \(n(a,\sigma^2)\); \(\mathrm{uniform}(a-h,a+h)\); Cauchy\((a)\) (or double exponential\((a,\sigma)\)).
(b) \(P(X\le a)=\int_{-\infty}^a f=\int_0^\infty f(a-u)\,du=\int_0^\infty f(a+u)\,du=P(X\ge a)\). In the continuous case both equal \(1/2\).
(c) If \(E|X|<\infty\), the density of \(X-a\) is even and absolutely integrable, so the odd integrand integrates to \(0\) and \(EX=a\).
(d) \(e^{-x}I_{[0,\infty)}\): there is no \(a\) such that \(f(a+\varepsilon)=f(a-\varepsilon)\) for every \(\varepsilon>0\) (one side is \(0\), or the two sides decay at different rates).
(e) Exponential\((1)\): mean \(1\), median \(\log 2<1\).
Exercise 2.27
Unimodal densities.
(a) \(n(0,1)\): unique mode at \(0\).
(b) \(\mathrm{uniform}(0,1)\): every point of the interval is a mode (the density is constant on the support, so the monotonicity in the problem holds and \(a\) may be any point of the support).
(c) The density decreases on both sides of the symmetry point \(a\), so \(a\) is a mode.
(d) \(e^{-x}\), \(x\ge 0\): decreasing on \([0,\infty)\), mode at \(0\).
Exercise 2.28
Skewness \(\alpha_3=\mu_3/(\mu_2)^{3/2}\) and kurtosis \(\alpha_4=\mu_4/\mu_2^2\).
(a) Symmetry about \(a\) means \(X-a\) and \(-(X-a)\) are equal in distribution. Odd-order central moments (when they exist) vanish, so \(\alpha_3=0\).
(b) Exponential\((1)\): \(\mu=1\), \(\mu_2=1\), \(\mu_3=E(X-1)^3=2\), hence \(\alpha_3=2>0\) (right-skewed).
(c) Standard normal: \(\mu_4=3\), \(\alpha_4=3\). \(\mathrm{uniform}(-1,1)\): \(\mu_2=1/3\), \(\mu_4=1/5\), \(\alpha_4=9/5=1.8\) (flatter). Laplace: \(\mu_2=2\), \(\mu_4=24\), \(\alpha_4=6\) (more peaked, heavier tails).
Exercise 2.29
Factorial moments: binomial, Poisson, and beta–binomial.
(a) Binomial: \(E[X(X-1)]=n(n-1)p^2\). Poisson: \(E[X(X-1)]=\lambda^2\).
(b) \(\mathrm{Var}\,X=E[X(X-1)]+EX-(EX)^2\). Binomial: \(n(n-1)p^2+np-n^2p^2=np(1-p)\). Poisson: \(\lambda^2+\lambda-\lambda^2=\lambda\).
(c) The textbook’s integer-parameter form is \[ P(Y=y)=\frac{a}{y+a}\frac{\binom{n}{y}\binom{a+b-1}{a}}{\binom{n+a+b-1}{y+a}},\qquad y=0,\ldots,n, \] which is equivalent to \(Y\mid P\sim\mathrm{binomial}(n,P)\) with \(P\sim\mathrm{beta}(a,b)\). The factorial moment is \[ E[Y(Y-1)]=n(n-1)E[P^2]=n(n-1)\frac{a(a+1)}{(a+b)(a+b+1)}. \] Also \(EY=n a/(a+b)\), so \[ \mathrm{Var}\,Y=n\frac{ab(a+b+n)}{(a+b)^2(a+b+1)}. \]
Exercise 2.30
mgfs of four distributions.
(a) \(M(t)=\frac{1}{c}\int_0^c e^{tx}\,dx=(e^{ct}-1)/(ct)\) (and \(M(0)=1\)).
(b) The density in the problem must be \(f(x)=2x/c^2\) in order to integrate to \(1\) on \((0,c)\) (the OCR reading \(2x^2/c\) is not a pdf). With the legitimate density \(2x/c^2\), \[ M(t)=\frac{2}{c^2}\int_0^c x e^{tx}\,dx=\frac{2(e^{ct}(ct-1)+1)}{c^2 t^2}. \] If one insists on the literal \(2x^2/c\), it is not a pdf.
(c) Double exponential: \(M(t)=e^{\alpha t}/(1-\beta^2 t^2)\), \(|t|<1/\beta\).
(d) Negative binomial (3.2.10): \(M(t)=\bigl(p/(1-(1-p)e^t)\bigr)^r\), \(t<-\log(1-p)\).
Exercise 2.31
Is there a distribution with \(M_X(t)=t/(1-t)\), \(|t|<1\)?
No. Every mgf satisfies \(M(0)=Ee^0=1\), but \(0/(1-0)=0\neq 1\).
Exercise 2.32
The first two derivatives of \(S(t)=\log M_X(t)\).
\(S'=M'/M\), \(S''=(M''M-(M')^2)/M^2\). Since \(M(0)=1\), \(M'(0)=EX\), and \(M''(0)=EX^2\), one has \(S'(0)=EX\) and \(S''(0)=EX^2-(EX)^2=\mathrm{Var}\,X\).
Exercise 2.33
Verify the mgfs of the Poisson, geometric, and normal, and obtain the moments.
(a) \(M(t)=\sum e^{tx}e^{-\lambda}\lambda^x/x!=\exp(\lambda(e^t-1))\). Then \(EX=M'(0)=\lambda\) and \(\mathrm{Var}\,X=\lambda\).
(b) \(P(X=x)=p(1-p)^x\), \(x=0,1,\ldots\). \(M(t)=p\sum((1-p)e^t)^x=p/(1-(1-p)e^t)\). Then \(EX=(1-p)/p\) and \(\mathrm{Var}\,X=(1-p)/p^2\).
(c) Completing the square: \(M(t)=\exp(\mu t+\sigma^2 t^2/2)\). Then \(EX=\mu\) and \(\mathrm{Var}\,X=\sigma^2\).
Exercise 2.34
\(n(0,1)\) and a three-point distribution share the first five moments.
\(X\sim n(0,1)\): odd moments vanish; \(EX^2=1\), \(EX^4=3\). \(Y\): \(P(Y=\pm\sqrt{3})=1/6\), \(P(Y=0)=2/3\). Odd moments vanish. \(EY^2=2\cdot(1/6)\cdot 3=1\), \(EY^4=2\cdot(1/6)\cdot 9=3\). The fifth moment is odd, so \(0=0\). Thus the moments agree for \(r=1,\ldots,5\).
Exercise 2.35
Complete Example 2.3.10.
(a) \(X_1\) satisfies \(\log X_1\sim n(0,1)\). Then \(EX_1^r=E\exp(r Z)=M_Z(r)=e^{r^2/2}\).
(b) Consider \(\int_0^\infty x^r f_1(x)\sin(2\pi\log x)\,dx\). Set \(y=\log x-r\), \(x=e^{y+r}\), \[ \int_{-\infty}^\infty e^{r(y+r)}\cdot\frac{1}{\sqrt{2\pi}}e^{-(y+r)^2/2}\sin(2\pi(y+r))\,dy. \] After simplification the integrand contains \(e^{-y^2/2}\sin(2\pi y)\) (because \(\sin(2\pi(y+r))=\sin(2\pi y)\)), which is odd, so the integral is \(0\).
Exercise 2.36
The lognormal has no mgf.
For \(t>0\), set \(u=\log x\), \[ M(t)=\int_{-\infty}^\infty\frac{1}{\sqrt{2\pi}}\exp\bigl(te^u-u^2/2\bigr)\,du. \] For \(t>0\), \(te^u\) dominates \(u^2/2\) as \(u\to+\infty\) and the integral diverges. For \(t<0\), \(te^u\to 0\) as \(u\to-\infty\) and \(te^u\to-\infty\) as \(u\to+\infty\), so the integrand is dominated by a multiple of \(e^{-u^2/2}\) and the integral is finite. Thus \(M(t)<\infty\) on \((-\infty,0]\) and \(M(t)=\infty\) for \(t>0\). There is still no mgf in a neighborhood of \(0\).
Exercise 2.37
McCullagh’s \(f_1=n(0,1)\) and \(f_2=f_1\bigl(1+\frac12\sin(2\pi x)\bigr)\).
(a) Superimposing a sine modulation of amplitude \(1/2\) on \(f_1\) produces peaks and troughs that are visible by eye.
(b) \(K_1(t)=t^2/2\), \(K_2(t)=t^2/2+\log\bigl(1+\frac12 e^{-2\pi^2}\sin(2\pi t)\bigr)\). Because \(e^{-2\pi^2}\approx 2.7\times 10^{-9}\), the two cgfs are visually indistinguishable.
(c) \(M_i=e^{K_i}\). Numerically the two mgfs are essentially equal; analytically \(M_2(t)=M_1(t)\bigl(1+\frac12 e^{-2\pi^2}\sin(2\pi t)\bigr)\), so they differ.
(d) Example 2.3.10 modulates a lognormal on the log scale; here a normal is modulated on the original scale. In the former case even all moments agree and there is no mgf; in the latter an mgf exists, so the laws are theoretically distinguishable but numerically almost inseparable. Characteristic functions separate them more cleanly (Waller 1995).
Exercise 2.38
Negative binomial mgf; \(Y=2pX\) tends to \(\chi^2_{2r}\) as \(p\downarrow 0\).
(a) \(M_X(t)=\bigl(p/(1-(1-p)e^t)\bigr)^r\), \(t<-\log(1-p)\).
(b) \(M_Y(t)=M_X(2pt)=\bigl(p/(1-(1-p)e^{2pt})\bigr)^r\). \[ \frac{p}{1-(1-p)e^{2pt}}=\frac{p}{1-(1-p)(1+2pt+O(p^2))}=\frac{p}{p-2p(1-p)t+O(p^2)}\to\frac{1}{1-2t}. \] Hence \(M_Y(t)\to(1-2t)^{-r}\) for \(|t|<1/2\), which is the mgf of \(\mathrm{gamma}(r,2)=\chi^2_{2r}\).
Exercise 2.39
Four derivatives; justify interchanging derivative and integral.
(a) Leibniz: \(\frac{d}{dx}\int_0^x e^{-\lambda t}\,dt=e^{-\lambda x}\). Finite limits, Theorem 2.4.1.
(b) \(\frac{d}{d\lambda}\int_0^\infty e^{-\lambda t}\,dt=\frac{d}{d\lambda}(\lambda^{-1})=-\lambda^{-2}\). Passing the derivative inside yields \(-\int_0^\infty t e^{-\lambda t}\,dt=-\lambda^{-2}\). Dominating function: on \(\lambda\ge\lambda_0>0\) one has \(t e^{-\lambda t}\le t e^{-\lambda_0 t}\), which is integrable.
(c) \(\frac{d}{dt}\int_t^1 x^{-2}\,dx=\frac{d}{dt}(t^{-1}-1)=-t^{-2}\). Leibniz endpoint term.
(d) \(\frac{d}{dt}\int_1^\infty(x-t)^{-2}\,dx\). For \(t\le t_0<1\), the \(t\)-derivative \(2(x-t)^{-3}\) of the integrand is dominated by the integrable function \(2(x-t_0)^{-3}\). Passing the derivative inside gives \(2\int_1^\infty(x-t)^{-3}\,dx=(1-t)^{-2}\). Directly, the original integral is \(\int_1^\infty(x-t)^{-2}\,dx=(1-t)^{-1}\), with the same derivative.
Exercise 2.40
Incomplete-beta representation of the binomial cdf.
Write \(F(p)\) for the left-hand side. Differentiating in \(p\) (a finite sum, so legitimate), \[ F'(p)=\sum_{k=0}^x\binom{n}{k}\bigl(k p^{k-1}(1-p)^{n-k}-(n-k)p^k(1-p)^{n-k-1}\bigr). \] Adjacent terms cancel (Pascal’s identity), leaving \[ F'(p)=-n\binom{n-1}{x}p^x(1-p)^{n-x-1}. \] Differentiating the right-hand side: first write \(I(p)=(n-x)\binom{n}{x}\int_0^{1-p}t^{n-x-1}(1-t)^x\,dt\), \[ I'(p)=-(n-x)\binom{n}{x}(1-p)^{n-x-1}p^x. \] Since \((n-x)\binom{n}{x}=n\binom{n-1}{x}\), one has \(F'=I'\). At \(p=0\) both sides equal \(1\) (or at \(p=1\) both sides equal \(0\) when \(x<n\)), so the two sides agree.
Integration by parts also works: set \(u=(1-t)^x\), \(dv=t^{n-x-1}dt\).