Skip to content

Commit ec1dc08

Browse files
authored
Merge pull request #91 from tomfaulkenberry/master
add [wald-mgf, wald-mean, wald-var]
2 parents 184fd81 + d79c1f0 commit ec1dc08

3 files changed

Lines changed: 272 additions & 0 deletions

File tree

P/wald-mean.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Thomas J. Faulkenberry"
6+
affiliation: "Tarleton State University"
7+
e_mail: "faulkenberry@tarleton.edu"
8+
date: 2020-09-13 12:00:00
9+
10+
title: "Mean of the Wald distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Wald distribution"
14+
theorem: "Mean"
15+
16+
sources:
17+
18+
proof_id: "P169"
19+
shortcut: "wald-mean"
20+
username: "tomfaulkenberry"
21+
---
22+
23+
**Theorem:** Let $X$ be a positive [random variable](/D/rvar) following a [Wald distribution](/D/wald):
24+
25+
$$ \label{eq:wald}
26+
X \sim \mathrm{Wald}(\gamma, \alpha) \; .
27+
$$
28+
29+
30+
Then, the [mean or expected value](/D/mean) of $X$ is
31+
32+
33+
$$ \label{eq:wald-mean}
34+
\mathrm{E}(X) = \frac{\alpha}{\gamma} \; .
35+
$$
36+
37+
38+
**Proof:** The mean or expected value $\mathrm{E}(X)$ is the first [moment](/D/mom) of $X$, so we can use the [moment-generating function of the Wald distribution](/P/wald-mgf) to calculate
39+
40+
$$ \label{eq:wald-moment}
41+
\mathrm{E}(X) = M_X'(0) \; .
42+
$$
43+
44+
First we differentiate $M_X(t) = \exp\left[\alpha \gamma - \sqrt{\alpha^2(\gamma^2-2t)}\right]$ with respect to $t$. Using the chain rule gives
45+
46+
$$ \label{eq:wald-mean-s1}
47+
\begin{split}
48+
M_X'(t) &= \exp\left[\alpha \gamma - \sqrt{\alpha^2(\gamma^2-2t)}\right] \cdot -\frac{1}{2}\left(\alpha^2(\gamma^2-2t)\right)^{-1/2}\cdot -2\alpha^2 \\
49+
&= \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right] \cdot \frac{\alpha^2}{\sqrt{\alpha^2(\gamma^2-2t)}} \\
50+
\end{split}
51+
$$
52+
53+
Evaluating \eqref{wald-mean-s1} at $t=0$ gives the desired result:
54+
55+
$$ \label{eq:wald-mean-s2}
56+
\begin{split}
57+
M_X'(0) &= \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2(0))}\right] \cdot \frac{\alpha^2}{\sqrt{\alpha^2(\gamma^2-2(0))}}\\
58+
&= \exp\left[\alpha \gamma - \sqrt{\alpha^2 \cdot \gamma^2}\right]\cdot \frac{\alpha^2}{\sqrt{\alpha^2\cdot \gamma^2}}\\
59+
&= \exp[0] \cdot \frac{\alpha^2}{\alpha \gamma}\\
60+
&= \frac{\alpha}{\gamma}\\ \; .
61+
\end{split}
62+
$$

P/wald-mgf.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Thomas J. Faulkenberry"
6+
affiliation: "Tarleton State University"
7+
e_mail: "faulkenberry@tarleton.edu"
8+
date: 2020-09-13 12:00:00
9+
10+
title: "Moment-generating function of the Wald distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Wald distribution"
14+
theorem: "Moment-generating function"
15+
16+
sources:
17+
- authors: "Siegrist, K."
18+
year: 2020
19+
title: "The Wald Distribution"
20+
in: "Random (formerly Virtual Laboratories in Probability and Statistics)"
21+
pages: "retrieved on 2020-09-13"
22+
url: "https://www.randomservices.org/random/special/Wald.html"
23+
24+
- authors: "National Institute of Standards and Technology"
25+
year: 2020
26+
title: "NIST Digital Library of Mathematical Functions"
27+
pages: "retrieved on 2020-09-13"
28+
url: "https://dlmf.nist.gov"
29+
30+
proof_id: "P168"
31+
shortcut: "wald-mgf"
32+
username: "tomfaulkenberry"
33+
---
34+
35+
36+
**Theorem:** Let $X$ be a positive [random variable](/D/rvar) following a [Wald distribution](/D/wald):
37+
38+
$$ \label{eq:wald}
39+
X \sim \mathrm{Wald}(\gamma, \alpha) \; .
40+
$$
41+
42+
43+
Then, the [moment-generating function](/D/mgf) of $X$ is
44+
45+
46+
$$ \label{eq:wald-mgf}
47+
M_X(t) = \exp \left[ \alpha\gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right].
48+
$$
49+
50+
51+
**Proof:** The [probability density function of the Wald distribution](/P/wald-pdf) is
52+
53+
$$ \label{eq:wald-pdf}
54+
f_X(x) = \frac{\alpha}{\sqrt{2\pi x^3}}\exp\left(-\frac{(\alpha-\gamma x)^2}{2x}\right)
55+
$$
56+
57+
and the [moment-generating function](/D/mgf) is defined as
58+
59+
$$ \label{eq:mgf-var}
60+
M_X(t) = \mathrm{E} \left[ e^{tX} \right] \; .
61+
$$
62+
63+
Using the definition of [expected value for continuous random variables](/D/mean), the moment-generating function of $X$ therefore is
64+
65+
$$ \label{eq:wald-mgf-s1}
66+
\begin{split}
67+
M_X(t) &= \int_0^{\infty} e^{tx} \cdot \frac{\alpha}{\sqrt{2\pi x^3}}\cdot \exp\left[-\frac{(\alpha-\gamma x)^2}{2x}\right]dx\\
68+
&= \frac{\alpha}{\sqrt{2\pi}}\int_0^{\infty} x^{-3/2}\cdot \exp\left[tx - \frac{(\alpha-\gamma x)^2}{2x}\right]dx\\
69+
\end{split}
70+
$$
71+
72+
To evaluate this integral, we will need two identities about [modified Bessel functions of the second kind](https://dlmf.nist.gov/10.25), denoted $K_{p}$. The function $K_{p}$ (for $p\in \mathbb{R}$) is one of the two linearly independent solutions of the differential equation
73+
74+
$$ \label{eq:bessel-de}
75+
x^2\frac{d^2y}{dx^2} + x\frac{dy}{dx}-(x^2+p^2)y=0 \; .
76+
$$
77+
78+
The first of these [identities](https://dlmf.nist.gov/10.39.2) gives an explicit solution for $K_{-1/2}$:
79+
80+
$$ \label{eq:bessel-fact1}
81+
K_{-1/2}(x) = \sqrt{\frac{\pi}{2x}} e^{-x} \; .
82+
$$
83+
84+
The second of these [identities](https://dlmf.nist.gov/10.32.10) gives an integral representation of $K_p$:
85+
86+
$$ \label{eq:bessel-fact2}
87+
K_p(\sqrt{ab}) = \frac{1}{2}\left(\frac{a}{b}\right)^{p/2} \int_0^{\infty}x^{p-1}\cdot \exp\left[-\frac{1}{2}\left(ax + \frac{b}{x}\right)\right]dx \; .
88+
$$
89+
90+
Starting from \eqref{eq:wald-mgf-s1}, we can expand the binomial term and rearrange the moment generating function into the following form:
91+
92+
$$ \label{eq:wald-mgf-s2}
93+
\begin{split}
94+
M_X(t) &= \frac{\alpha}{\sqrt{2\pi}} \int_0^{\infty} x^{-3/2}\cdot \exp\left[ tx - \frac{\alpha^2}{2x} + \alpha\gamma - \frac{\gamma^2x}{2}\right]dx\\
95+
&= \frac{\alpha}{\sqrt{2\pi}}\cdot e^{\alpha \gamma} \int_0^{\infty} x^{-3/2}\cdot \exp\left[\left(t-\frac{\gamma^2}{2}\right)x - \frac{\alpha^2}{2x}\right]dx\\
96+
&= \frac{\alpha}{\sqrt{2\pi}}\cdot e^{\alpha \gamma} \int_0^{\infty} x^{-3/2}\cdot \exp \left[-\frac{1}{2}\left(\gamma^2-2t\right)x - \frac{1}{2}\cdot \frac{\alpha^2}{x}\right]dx\\ \; .
97+
\end{split}
98+
$$
99+
100+
The integral now has the form of the integral in \eqref{eq:bessel-fact2} with $p=-1/2$, $a=\gamma^2-2t$, and $b=\alpha^2$. This allows us to write the moment-generating function in terms of the modified Bessel function $K_{-1/2}$:
101+
102+
$$ \label{eq:wald-mgf-s3}
103+
M_X(t) = \frac{\alpha}{\sqrt{2\pi}}\cdot e^{\alpha \gamma}\cdot 2\left(\frac{\gamma^2-2t}{\alpha^2}\right)^{1/4}\cdot K_{-1/2}\left(\sqrt{\alpha^2(\gamma^2-2t)}\right).
104+
$$
105+
106+
Combining with \eqref{eq:bessel-fact1} and simplifying gives
107+
108+
$$ \label{eq:wald-mgf-s4}
109+
\begin{split}
110+
M_X(t) &= \frac{\alpha}{\sqrt{2\pi}}\cdot e^{\alpha \gamma}\cdot 2\left(\frac{\gamma^2-2t}{\alpha^2}\right)^{1/4} \cdot \sqrt{\frac{\pi}{2\sqrt{\alpha^2(\gamma^2-2t)}}}\cdot \exp\left[-\sqrt{\alpha^2(\gamma^2-2t)}\right]\\
111+
&= \frac{\alpha}{\sqrt{2}\cdot \sqrt{\pi}}\cdot e^{\alpha \gamma}\cdot 2 \cdot \frac{(\gamma^2-2t)^{1/4}}{\sqrt{\alpha}}\cdot \frac{\sqrt{\pi}}{\sqrt{2}\cdot \sqrt{\alpha}\cdot (\gamma^2-2t)^{1/4}}\cdot \exp\left[-\sqrt{\alpha^2(\gamma^2-2t)}\right]\\
112+
&= e^{\alpha \gamma} \cdot \exp\left[-\sqrt{\alpha^2(\gamma^2-2t)}\right]\\
113+
&= \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right]\\ \; .
114+
\end{split}
115+
$$
116+
117+
This finishes the proof of \eqref{eq:wald-mgf}.

P/wald-var.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Thomas J. Faulkenberry"
6+
affiliation: "Tarleton State University"
7+
e_mail: "faulkenberry@tarleton.edu"
8+
date: 2020-09-13 12:00:00
9+
10+
title: "Variance of the Wald distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Wald distribution"
14+
theorem: "Variance"
15+
16+
sources:
17+
18+
proof_id: "P170"
19+
shortcut: "wald-var"
20+
username: "tomfaulkenberry"
21+
---
22+
23+
**Theorem:** Let $X$ be a positive [random variable](/D/rvar) following a [Wald distribution](/D/wald):
24+
25+
$$ \label{eq:wald}
26+
X \sim \mathrm{Wald}(\gamma, \alpha) \; .
27+
$$
28+
29+
30+
Then, the [variance](/D/var) of $X$ is
31+
32+
33+
$$ \label{eq:wald-var}
34+
\mathrm{Var}(X) = \frac{\alpha}{\gamma^3} \; .
35+
$$
36+
37+
38+
**Proof:** To compute the variance of $X$, we [partition the variance into expected values](/P/var-mean):
39+
40+
$$ \label{eq:var-mean}
41+
\mathrm{Var}(X) = \mathrm{E}(X^2)-\mathrm{E}(X)^2.
42+
$$
43+
44+
We then use the [moment-generating function of the Wald distribution](/P/wald-mgf) to calculate
45+
46+
$$ \label{eq:wald-moment}
47+
\mathrm{E}(X^2) = M_X''(0) \; .
48+
$$
49+
50+
First we differentiate $M_X(t) = \exp\left[\alpha \gamma - \sqrt{\alpha^2(\gamma^2-2t)}\right]$ with respect to $t$. Using the chain rule gives
51+
52+
$$ \label{eq:wald-var-s1}
53+
\begin{split}
54+
M_X'(t) &= \exp\left[\alpha \gamma - \sqrt{\alpha^2(\gamma^2-2t)}\right] \cdot -\frac{1}{2}\left(\alpha^2(\gamma^2-2t)\right)^{-1/2}\cdot -2\alpha^2 \\
55+
&= \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right] \cdot \frac{\alpha^2}{\sqrt{\alpha^2(\gamma^2-2t)}} \\
56+
&= \alpha \cdot \exp\left[\alpha \gamma -\sqrt{\alpha^2(\gamma^2-2t)}\right] \cdot (\gamma^2-2t)^{-1/2}\\ \; .
57+
\end{split}
58+
$$
59+
60+
Now we use the product rule to obtain the second derivative:
61+
62+
$$ \label{eq:wald-var-s2}
63+
\begin{split}
64+
M_X''(t) &= \alpha \cdot \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right]\cdot (\gamma^2-2t)^{-1/2}\cdot -\frac{1}{2}\left(\alpha^2(\gamma^2-2t)\right)^{-1/2}\cdot -2\alpha^2 \\
65+
&+ \alpha \cdot \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right]\cdot -\frac{1}{2}(\gamma^2-2t)^{-3/2}\cdot -2\\
66+
&= \alpha^2\cdot \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right]\cdot (\gamma^2-2t)^{-1}\\
67+
&+ \alpha\cdot \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right]\cdot (\gamma^2-2t)^{-3/2}\\
68+
&= \alpha \cdot \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2t)}\right]\left[\frac{\alpha}{\gamma^2-2t}+\frac{1}{\sqrt{(\gamma^2-2t)^3}}\right]\\ \; .
69+
\end{split}
70+
$$
71+
72+
Applying \eqref{eq:wald-moment} yields
73+
74+
$$ \label{eq:wald-var-s3}
75+
\begin{split}
76+
\mathrm{E}(X^2) &= M_X''(0)\\
77+
&= \alpha \cdot \exp\left[\alpha \gamma-\sqrt{\alpha^2(\gamma^2-2(0))}\right]\left[\frac{\alpha}{\gamma^2-2(0)}+\frac{1}{\sqrt{(\gamma^2-2(0))^3}}\right]\\
78+
&= \alpha \cdot \exp\left[\alpha \gamma - \alpha \gamma\right] \cdot \left[\frac{\alpha}{\gamma^2} + \frac{1}{\gamma^3}\right]\\
79+
&= \frac{\alpha^2}{\gamma^2} + \frac{\alpha}{\gamma^3}\\ \; .
80+
\end{split}
81+
$$
82+
83+
Since the [mean of a Wald distribution](/P/wald-mean) is given by $\mathrm{E}(X)=\alpha/\gamma$, we can apply \eqref{eq:var-mean} to show
84+
85+
$$ \label{eq:wald-var-s4}
86+
\begin{split}
87+
\mathrm{Var}(X) &= \mathrm{E}(X^2) - \mathrm{E}(X)^2\\
88+
&= \frac{\alpha^2}{\gamma^2} + \frac{\alpha}{\gamma^3} - \left(\frac{\alpha}{\gamma}\right)^2\\
89+
&= \frac{\alpha}{\gamma^3}\\
90+
\end{split}
91+
$$
92+
93+
which completes the proof of \eqref{eq:wald-var}.

0 commit comments

Comments
 (0)