Skip to content

Commit 8032534

Browse files
authored
added 4 proofs
1 parent 22955f7 commit 8032534

4 files changed

Lines changed: 292 additions & 0 deletions

File tree

P/gam-cdf.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Joram Soch"
6+
affiliation: "BCCN Berlin"
7+
e_mail: "joram.soch@bccn-berlin.de"
8+
date: 2020-10-15 12:34:00
9+
10+
title: "Cumulative distribution function of the gamma distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Gamma distribution"
14+
theorem: "Cumulative distribution function"
15+
16+
sources:
17+
18+
proof_id: "P178"
19+
shortcut: "gam-cdf"
20+
username: "JoramSoch"
21+
---
22+
23+
24+
**Theorem:** Let $X$ be a positive [random variable](/D/rvar) following a [gamma distribution](/D/gam):
25+
26+
$$ \label{eq:gam}
27+
X \sim \mathrm{Gam}(a, b) \; .
28+
$$
29+
30+
Then, the [cumulative distribution function](/D/cdf) of $X$ is
31+
32+
$$ \label{eq:gam-cdf}
33+
F_X(x) = \frac{\gamma(a,bx)}{\Gamma(a)}
34+
$$
35+
36+
where $\Gamma(x)$ is the gamma function and $\gamma(s,x)$ is the lower incomplete gamma function.
37+
38+
39+
**Proof:** The [probability density function of the gamma distribution](/P/gam-pdf) is:
40+
41+
$$ \label{eq:gam-pdf}
42+
f_X(x) = \frac{b^a}{\Gamma(a)} x^{a-1} \exp[-b x] \; .
43+
$$
44+
45+
Thus, the [cumulative distribution function](/D/cdf) is:
46+
47+
$$ \label{eq:gam-cdf-s1}
48+
\begin{split}
49+
F_X(x) &= \int_{0}^{x} \mathrm{Gam}(z; a, b) \, \mathrm{d}z \\
50+
&= \int_{0}^{x} \frac{b^a}{\Gamma(a)} z^{a-1} \exp[-b z] \, \mathrm{d}z \\
51+
&= \frac{b^a}{\Gamma(a)} \int_{0}^{x} z^{a-1} \exp[-b z] \, \mathrm{d}z \; .
52+
\end{split}
53+
$$
54+
55+
Substituting $t = b z$, i.e. $z = t/b$, this becomes:
56+
57+
$$ \label{eq:gam-cdf-s2}
58+
\begin{split}
59+
F_X(x) &= \frac{b^a}{\Gamma(a)} \int_{b \cdot 0}^{b x} \left(\frac{t}{b}\right)^{a-1} \exp\left[-b \left(\frac{t}{b}\right)\right] \, \mathrm{d}\left(\frac{t}{b}\right) \\
60+
&= \frac{b^a}{\Gamma(a)} \cdot \frac{1}{b^{a-1}} \cdot \frac{1}{b} \int_{0}^{b x} t^{a-1} \exp[-t] \, \mathrm{d}t \\
61+
&= \frac{1}{\Gamma(a)} \int_{0}^{b x} t^{a-1} \exp[-t] \, \mathrm{d}t \; .
62+
\end{split}
63+
$$
64+
65+
With the definition of the lower incomplete gamma function
66+
67+
$$ \label{eq:li-gam-fct}
68+
\gamma(s,x) = \int_{0}^{x} t^{s-1} \exp[-t] \, \mathrm{d}t \; ,
69+
$$
70+
71+
we arrive at the final result given by equation \eqref{eq:gam-cdf}:
72+
73+
$$ \label{eq:gam-cdf-qed}
74+
F_X(x) = \frac{\gamma(a,bx)}{\Gamma(a)} \; .
75+
$$

P/gam-sgam2.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Joram Soch"
6+
affiliation: "BCCN Berlin"
7+
e_mail: "joram.soch@bccn-berlin.de"
8+
date: 2020-10-15 12:04:00
9+
10+
title: "Relation between gamma distribution and standard gamma distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Gamma distribution"
14+
theorem: "Relation to standard gamma distribution"
15+
16+
sources:
17+
18+
proof_id: "P177"
19+
shortcut: "gam-sgam2"
20+
username: "JoramSoch"
21+
---
22+
23+
24+
**Theorem:** Let $X$ be a [random variable](/D/rvar) following a [gamma distribution](/D/gam) with shape $a$ and rate $b$:
25+
26+
$$ \label{eq:X-gam}
27+
X \sim \mathrm{Gam}(a,b) \; .
28+
$$
29+
30+
Then, the quantity $Y = b X$ will have a [standard gamma distribution](/D/sgam) with shape $a$ and rate $1$:
31+
32+
$$ \label{eq:Y-snorm}
33+
Y = b X \sim \mathrm{Gam}(a,1) \; .
34+
$$
35+
36+
37+
**Proof:** Note that $Y$ is a function of $X$
38+
39+
$$ \label{eq:Y-X}
40+
Y = g(X) = b X
41+
$$
42+
43+
with the inverse function
44+
45+
$$ \label{eq:X-Y}
46+
X = g^{-1}(Y) = \frac{1}{b} Y \; .
47+
$$
48+
49+
Because $b$ is positive, $g(X)$ is strictly increasing and we can calculate the [probability density function of a strictly increasing function](/P/pdf-sifct) as
50+
51+
$$ \label{eq:pdf-sifct}
52+
f_Y(y) = \left\{
53+
\begin{array}{rl}
54+
f_X(g^{-1}(y)) \, \frac{\mathrm{d}g^{-1}(y)}{\mathrm{d}y} \; , & \text{if} \; y \in \mathcal{Y} \\
55+
0 \; , & \text{if} \; y \notin \mathcal{Y}
56+
\end{array}
57+
\right.
58+
$$
59+
60+
where $\mathcal{Y} = \left\lbrace y = g(x): x \in \mathcal{X} \right\rbrace$. With the [probability density function of the gamma distribution](/P/gam-pdf), we have
61+
62+
$$ \label{eq:pdf-Y}
63+
\begin{split}
64+
f_Y(y) &= \frac{b^a}{\Gamma(a)} [g^{-1}(y)]^{a-1} \exp[-b \, g^{-1}(y)] \cdot \frac{\mathrm{d}g^{-1}(y)}{\mathrm{d}y} \\
65+
&= \frac{b^a}{\Gamma(a)} \left(\frac{1}{b} y\right)^{a-1} \exp\left[-b \left(\frac{1}{b} y\right)\right] \cdot \frac{\mathrm{d}\left(\frac{1}{b} y\right)}{\mathrm{d}y} \\
66+
&= \frac{b^a}{\Gamma(a)} \, \frac{1}{b^{a-1}} \, y^{a-1} \exp[-y] \cdot \frac{1}{b} \\
67+
&= \frac{1}{\Gamma(a)} \, y^{a-1} \exp[-y]
68+
\end{split}
69+
$$
70+
71+
which is the [probability density function](/D/pdf) of the [standard gamma distribution](/D/sgam).

P/gam-xlogx.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Joram Soch"
6+
affiliation: "BCCN Berlin"
7+
e_mail: "joram.soch@bccn-berlin.de"
8+
date: 2020-10-15 13:02:00
9+
10+
title: "Expected value of x times ln(x) for a gamma distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Gamma distribution"
14+
theorem: "Expectation of x ln x"
15+
16+
sources:
17+
- authors: "gunes"
18+
year: 2020
19+
title: "What is the expected value of x log(x) of the gamma distribution?"
20+
in: "StackExchange CrossValidated"
21+
pages: "retrieved on 2020-10-15"
22+
url: "https://stats.stackexchange.com/questions/457357/what-is-the-expected-value-of-x-logx-of-the-gamma-distribution"
23+
24+
proof_id: "P179"
25+
shortcut: "gam-xlogx"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $X$ be a [random variable](/D/rvar) following a [gamma distribution](/D/gam):
31+
32+
$$ \label{eq:gam}
33+
X \sim \mathrm{Gam}(a, b) \; .
34+
$$
35+
36+
Then, the [mean or expected value](/D/mean) of $(X \cdot \ln X)$ is
37+
38+
$$ \label{eq:gam-xlogx}
39+
\mathrm{E}(X \ln X) = \frac{a}{b} \left[ \psi(a) - \ln(b) \right] \; .
40+
$$
41+
42+
43+
**Proof:** With the [definition of the expected value](/D/mean) and the [probability density function of the gamma distribution](/P/gam-pdf), we have:
44+
45+
$$ \label{eq:gam-xlogx-s1}
46+
\begin{split}
47+
\mathrm{E}(X \ln X) &= \int_{0}^{\infty} x \ln x \cdot \frac{b^a}{\Gamma(a)} x^{a-1} \exp[-b x] \, \mathrm{d}x \\
48+
&= \frac{1}{\Gamma(a)} \int_{0}^{\infty} \ln x \cdot \frac{b^{a+1}}{b} x^{a} \exp[-b x] \, \mathrm{d}x \\
49+
&= \frac{\Gamma(a+1)}{\Gamma(a) \, b} \int_{0}^{\infty} \ln x \cdot \frac{b^{a+1}}{\Gamma(a+1)} x^{(a+1)-1} \exp[-b x] \, \mathrm{d}x \\
50+
\end{split}
51+
$$
52+
53+
The integral now corresponds to the [logarithmic expectation of a gamma distribution](/P/gam-logmean) with shape $a+1$ and rate $b$
54+
55+
$$ \label{eq:logmean-a+1}
56+
\mathrm{E}(\ln Y) \quad \text{where} \quad Y \sim \mathrm{Gam}(a+1,b)
57+
$$
58+
59+
which [is given by](/P/gam-logmean)
60+
61+
$$ \label{eq:gam-logmean}
62+
\mathrm{E}(\ln Y) = \psi(a+1) - \ln(b)
63+
$$
64+
65+
where $\psi(x)$ is the digamma function. Additionally employing the relation
66+
67+
$$ \label{eq:gam-fct}
68+
\Gamma(x+1) = \Gamma(x) \cdot x \quad \Leftrightarrow \quad \frac{\Gamma(x+1)}{\Gamma(x)} = x \; ,
69+
$$
70+
71+
the expression in equation \eqref{eq:gam-mean-s1} develops into:
72+
73+
$$ \label{eq:gam-xlogx-qed}
74+
\mathrm{E}(X \ln X) = \frac{a}{b} \left[ \psi(a) - \ln(b) \right] \; .
75+
$$

P/norm-snorm2.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Joram Soch"
6+
affiliation: "BCCN Berlin"
7+
e_mail: "joram.soch@bccn-berlin.de"
8+
date: 2020-10-15 11:42:00
9+
10+
title: "Relation between normal distribution and standard normal distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Normal distribution"
14+
theorem: "Relation to standard normal distribution"
15+
16+
sources:
17+
18+
proof_id: "P176"
19+
shortcut: "norm-snorm2"
20+
username: "JoramSoch"
21+
---
22+
23+
24+
**Theorem:** Let $X$ be a [random variable](/D/rvar) following a [normal distribution](/D/norm) with mean $\mu$ and variance $\sigma^2$:
25+
26+
$$ \label{eq:X-norm}
27+
X \sim \mathcal{N}(\mu, \sigma^2) \; .
28+
$$
29+
30+
Then, the quantity $Z = (X-\mu)/\sigma$ will have a [standard normal distribution](/D/snorm) with mean $0$ and variance $1$:
31+
32+
$$ \label{eq:Z-snorm}
33+
Z = \frac{X-\mu}{\sigma} \sim \mathcal{N}(0, 1) \; .
34+
$$
35+
36+
37+
**Proof:** Note that $Z$ is a function of $X$
38+
39+
$$ \label{eq:Z-X}
40+
Z = g(X) = \frac{X-\mu}{\sigma}
41+
$$
42+
43+
with the inverse function
44+
45+
$$ \label{eq:X-Z}
46+
X = g^{-1}(Z) = \sigma Z + \mu \; .
47+
$$
48+
49+
Because $\sigma$ is positive, $g(X)$ is strictly increasing and we can calculate the [probability density function of a strictly increasing function](/P/pdf-sifct) as
50+
51+
$$ \label{eq:pdf-sifct}
52+
f_Y(y) = \left\{
53+
\begin{array}{rl}
54+
f_X(g^{-1}(y)) \, \frac{\mathrm{d}g^{-1}(y)}{\mathrm{d}y} \; , & \text{if} \; y \in \mathcal{Y} \\
55+
0 \; , & \text{if} \; y \notin \mathcal{Y}
56+
\end{array}
57+
\right.
58+
$$
59+
60+
where $\mathcal{Y} = \left\lbrace y = g(x): x \in \mathcal{X} \right\rbrace$. With the [probability density function of the normal distribution](/P/norm-pdf), we have
61+
62+
$$ \label{eq:pdf-Z}
63+
\begin{split}
64+
f_Z(z) &= \frac{1}{\sqrt{2 \pi} \sigma} \cdot \exp \left[ -\frac{1}{2} \left( \frac{g^{-1}(z)-\mu}{\sigma} \right)^2 \right] \cdot \frac{\mathrm{d}g^{-1}(z)}{\mathrm{d}z} \\
65+
&= \frac{1}{\sqrt{2 \pi} \sigma} \cdot \exp \left[ -\frac{1}{2} \left( \frac{(\sigma z + \mu)-\mu}{\sigma} \right)^2 \right] \cdot \frac{\mathrm{d}(\sigma Z + \mu)}{\mathrm{d}z} \\
66+
&= \frac{1}{\sqrt{2 \pi} \sigma} \cdot \exp \left[ -\frac{1}{2} z^2 \right] \cdot \sigma \\
67+
&= \frac{1}{\sqrt{2 \pi}} \cdot \exp \left[ -\frac{1}{2} z^2 \right]
68+
\end{split}
69+
$$
70+
71+
which is the [probability density function](/D/pdf) of the [standard normal distribution](/D/snorm).

0 commit comments

Comments
 (0)