Skip to content

Commit ea7ed19

Browse files
authored
Merge pull request #134 from JoramSoch/master
added 2 proofs
2 parents 019feda + 10d5d4b commit ea7ed19

3 files changed

Lines changed: 280 additions & 0 deletions

File tree

I/Table_of_Contents.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ title: "Table of Contents"
351351
&emsp;&ensp; 3.3.1. *[Definition](/D/t)* <br>
352352
&emsp;&ensp; 3.3.2. *[Non-standardized t-distribution](/D/nst)* <br>
353353
&emsp;&ensp; 3.3.3. **[Relationship to non-standardized t-distribution](/P/nst-t)** <br>
354+
&emsp;&ensp; 3.3.4. **[Probability density function](/P/t-pdf)** <br>
354355

355356
3.4. Gamma distribution <br>
356357
&emsp;&ensp; 3.4.1. *[Definition](/D/gam)* <br>
@@ -385,6 +386,7 @@ title: "Table of Contents"
385386

386387
3.7. F-distribution <br>
387388
&emsp;&ensp; 3.7.1. *[Definition](/D/f)* <br>
389+
&emsp;&ensp; 3.7.2. **[Probability density function](/P/f-pdf)** <br>
388390

389391
3.8. Beta distribution <br>
390392
&emsp;&ensp; 3.8.1. *[Definition](/D/beta)* <br>

P/f-pdf.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
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: 2021-10-12 09:00
9+
10+
title: "Probability density function of the F-distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "F-distribution"
14+
theorem: "Probability density function"
15+
16+
sources:
17+
- authors: "statisticsmatt"
18+
year: 2018
19+
title: "Statistical Distributions: Derive the F Distribution"
20+
in: "YouTube"
21+
pages: "retrieved on 2021-10-11"
22+
url: "https://www.youtube.com/watch?v=AmHiOKYmHkI"
23+
24+
proof_id: "P264"
25+
shortcut: "f-pdf"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $F$ be a [random variable](/D/rvar) following an [F-distribution](/D/f):
31+
32+
$$ \label{eq:f}
33+
F \sim F(u,v) \; .
34+
$$
35+
36+
Then, the [probability density function](/D/pdf) of $F$ is
37+
38+
$$ \label{eq:f-pdf}
39+
f_F(f) = \frac{\Gamma\left( \frac{u+v}{2} \right)}{\Gamma\left( \frac{u}{2} \right) \cdot \Gamma\left( \frac{v}{2} \right)} \cdot \left( \frac{u}{v} \right)^{\frac{u}{2}} \cdot f^{\frac{u}{2}-1} \cdot \left( \frac{u}{v}f+1 \right)^{-\frac{u+v}{2}} \; .
40+
$$
41+
42+
43+
**Proof:** An [F-distributed random variable](/D/f) is defined as the ratio of two [chi-squared random variables](/D/chi2), divided by their [degrees of freedom](/D/dof)
44+
45+
$$ \label{eq:f-def}
46+
X \sim \chi^2(u), \; Y \sim \chi^2(v) \quad \Rightarrow \quad F = \frac{X/u}{\sqrt{Y/v}} \sim F(u,v)
47+
$$
48+
49+
where $X$ and $Y$ are [independent of each other](/D/ind).
50+
51+
The [probability density function of the chi-squared distribution](/P/chi2-pdf) is
52+
53+
$$ \label{eq:chi2-pdf}
54+
f_X(x) = \frac{1}{\Gamma\left( \frac{u}{2} \right) \cdot 2^{u/2}} \cdot x^{\frac{u}{2}-1} \cdot e^{-\frac{x}{2}} \; .
55+
$$
56+
57+
Define the random variables $F$ and $W$ as functions of $X$ and $Y$
58+
59+
$$ \label{eq:FW-XY}
60+
\begin{split}
61+
F &= \frac{X/u}{Y/v} \\
62+
W &= Y \; ,
63+
\end{split}
64+
$$
65+
66+
such that the inverse functions $X$ and $Y$ in terms of $F$ and $W$ are
67+
68+
$$ \label{eq:XY-FW}
69+
\begin{split}
70+
X &= \frac{u}{v} F W \\
71+
Y &= W \; .
72+
\end{split}
73+
$$
74+
75+
This implies the following Jacobian matrix and determinant:
76+
77+
$$ \label{eq:XY-FW-jac}
78+
\begin{split}
79+
J &= \left[ \begin{matrix}
80+
\frac{\mathrm{d}X}{\mathrm{d}F} & \frac{\mathrm{d}X}{\mathrm{d}W} \\
81+
\frac{\mathrm{d}Y}{\mathrm{d}F} & \frac{\mathrm{d}Y}{\mathrm{d}W}
82+
\end{matrix} \right]
83+
= \left[ \begin{matrix}
84+
\frac{u}{v} W & \frac{u}{v} F \\
85+
0 & 1
86+
\end{matrix} \right] \\
87+
\lvert J \rvert &= \frac{u}{v} W \; .
88+
\end{split}
89+
$$
90+
91+
Because $X$ and $Y$ are [independent](/D/ind), the [joint density](/D/dist-joint) of $X$ and $Y$ is [equal to the product](/P/prob-ind) of the [marginal densities](/D/dist-marg):
92+
93+
$$ \label{eq:f-XY}
94+
f_{X,Y}(x,y) = f_X(x) \cdot f_Y(y) \; .
95+
$$
96+
97+
With the [probability density function of an invertible function](/P/pdf-invfct), the [joint density](/D/dist-joint) of $T$ and $W$ can be derived as:
98+
99+
$$ \label{eq:f-FW-s1}
100+
f_{F,W}(f,w) = f_{X,Y}(x,y) \cdot \lvert J \rvert \; .
101+
$$
102+
103+
Substituting \eqref{eq:XY-FW} into \eqref{eq:chi2-pdf}, and then with \eqref{eq:XY-FW-jac} into \eqref{eq:f-FW-s1}, we get:
104+
105+
$$ \label{eq:f-FW-s2}
106+
\begin{split}
107+
f_{F,W}(f,w) &= f_X\left( \frac{u}{v} f w \right) \cdot f_Y(w) \cdot \lvert J \rvert \\
108+
&= \frac{1}{\Gamma\left( \frac{u}{2} \right) \cdot 2^{u/2}} \cdot \left( \frac{u}{v} f w \right)^{\frac{u}{2}-1} \cdot e^{-\frac{1}{2} \left( \frac{u}{v} f w \right)} \cdot \frac{1}{\Gamma\left( \frac{v}{2} \right) \cdot 2^{v/2}} \cdot w^{\frac{v}{2}-1} \cdot e^{-\frac{w}{2}} \cdot \frac{u}{v} w \\
109+
&= \frac{\left( \frac{u}{v} \right)^{\frac{u}{2}} \cdot f^{\frac{u}{2}-1}}{\Gamma\left( \frac{u}{2} \right) \cdot \Gamma\left( \frac{v}{2} \right) \cdot 2^{(u+v)/2}} \cdot w^{\frac{u+v}{2}-1} \cdot e^{-\frac{w}{2} \left( \frac{u}{v} f + 1 \right)} \; .
110+
\end{split}
111+
$$
112+
113+
The [marginal density](/D/dist-marg) of $F$ can now be [obtained by integrating out](/D/dist-marg) $W$:
114+
115+
$$ \label{eq:f-F-s1}
116+
\begin{split}
117+
f_F(f) &= \int_{0}^{\infty} f_{F,W}(f,w) \, \mathrm{d}w \\
118+
&= \frac{\left( \frac{u}{v} \right)^{\frac{u}{2}} \cdot f^{\frac{u}{2}-1}}{\Gamma\left( \frac{u}{2} \right) \cdot \Gamma\left( \frac{v}{2} \right) \cdot 2^{(u+v)/2}} \cdot \int_{0}^{\infty} w^{\frac{u+v}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2} \left( \frac{u}{v} f + 1 \right) w \right] \, \mathrm{d}w \\
119+
&= \frac{\left( \frac{u}{v} \right)^{\frac{u}{2}} \cdot f^{\frac{u}{2}-1}}{\Gamma\left( \frac{u}{2} \right) \cdot \Gamma\left( \frac{v}{2} \right) \cdot 2^{(u+v)/2}} \cdot \frac{\Gamma\left( \frac{u+v}{2} \right)}{\left[ \frac{1}{2}\left( \frac{u}{v} f + 1 \right) \right]^{(u+v)/2}} \cdot \int_{0}^{\infty} \frac{\left[ \frac{1}{2}\left( \frac{u}{v} f + 1 \right) \right]^{(u+v)/2}}{\Gamma\left( \frac{u+v}{2} \right)} \cdot w^{\frac{u+v}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2} \left( \frac{u}{v} f + 1 \right) w \right] \, \mathrm{d}w \; .
120+
\end{split}
121+
$$
122+
123+
At this point, we can recognize that the integrand is equal to the [probability density function of a gamma distribution](/P/gam-pdf) with
124+
125+
$$ \label{eq:f-W-gam-ab}
126+
a = \frac{u+v}{2} \quad \text{and} \quad b = \frac{1}{2}\left( \frac{u}{v} f + 1 \right) \; ,
127+
$$
128+
129+
and [because a probability density function integrates to one](/D/pdf), we finally have:
130+
131+
$$ \label{eq:f-F-s2}
132+
\begin{split}
133+
f_F(f) &= \frac{\left( \frac{u}{v} \right)^{\frac{u}{2}} \cdot f^{\frac{u}{2}-1}}{\Gamma\left( \frac{u}{2} \right) \cdot \Gamma\left( \frac{v}{2} \right) \cdot 2^{(u+v)/2}} \cdot \frac{\Gamma\left( \frac{u+v}{2} \right)}{\left[ \frac{1}{2}\left( \frac{u}{v} f + 1 \right) \right]^{(u+v)/2}} \\
134+
&= \frac{\Gamma\left( \frac{u+v}{2} \right)}{\Gamma\left( \frac{u}{2} \right) \cdot \Gamma\left( \frac{v}{2} \right)} \cdot \left( \frac{u}{v} \right)^{\frac{u}{2}} \cdot f^{\frac{u}{2}-1} \cdot \left( \frac{u}{v}f+1 \right)^{-\frac{u+v}{2}} \; .
135+
\end{split}
136+
$$

P/t-pdf.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
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: 2021-10-12 08:15:00
9+
10+
title: "Probability density function of the t-distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "t-distribution"
14+
theorem: "Probability density function"
15+
16+
sources:
17+
- authors: "Computation Empire"
18+
year: 2021
19+
title: "Student's t Distribution: Derivation of PDF"
20+
in: "YouTube"
21+
pages: "retrieved on 2021-10-11"
22+
url: "https://www.youtube.com/watch?v=6BraaGEVRY8"
23+
24+
proof_id: "P263"
25+
shortcut: "t-pdf"
26+
username: "JoramSoch"
27+
---
28+
29+
30+
**Theorem:** Let $T$ be a [random variable](/D/rvar) following a [t-distribution](/D/t):
31+
32+
$$ \label{eq:t}
33+
T \sim t(\nu) \; .
34+
$$
35+
36+
Then, the [probability density function](/D/pdf) of $T$ is
37+
38+
$$ \label{eq:t-pdf}
39+
f_T(t) = \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\Gamma\left( \frac{\nu}{2} \right) \cdot \sqrt{\nu \pi}} \cdot \left( \frac{t^2}{\nu}+1 \right)^{-\frac{\nu+1}{2}} \; .
40+
$$
41+
42+
43+
**Proof:** A [t-distributed random variable](/D/t) is defined as the ratio of a [standard normal random variable](/D/snorm) and the square root of a [chi-squared random variable](/D/chi2), divided by its [degrees of freedom](/D/dof)
44+
45+
$$ \label{eq:t-def}
46+
X \sim \mathcal{N}(0,1), \; Y \sim \chi^2(\nu) \quad \Rightarrow \quad T = \frac{X}{\sqrt{Y/\nu}} \sim t(\nu)
47+
$$
48+
49+
where $X$ and $Y$ are [independent of each other](/D/ind).
50+
51+
The [probability density function](/P/norm-pdf) of the [standard normal distribution](/D/snorm) is
52+
53+
$$ \label{eq:snorm-pdf}
54+
f_X(x) = \frac{1}{\sqrt{2 \pi}} \cdot e^{-\frac{x^2}{2}}
55+
$$
56+
57+
and the [probability density function of the chi-squared distribution](/P/chi2-pdf) is
58+
59+
$$ \label{eq:chi2-pdf}
60+
f_Y(y) = \frac{1}{\Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot y^{\frac{\nu}{2}-1} \cdot e^{-\frac{y}{2}} \; .
61+
$$
62+
63+
Define the random variables $T$ and $W$ as functions of $X$ and $Y$
64+
65+
$$ \label{eq:TW-XY}
66+
\begin{split}
67+
T &= X \cdot \sqrt{\frac{\nu}{Y}} \\
68+
W &= Y \; ,
69+
\end{split}
70+
$$
71+
72+
such that the inverse functions $X$ and $Y$ in terms of $T$ and $W$ are
73+
74+
$$ \label{eq:XY-TW}
75+
\begin{split}
76+
X &= T \cdot \sqrt{\frac{W}{\nu}} \\
77+
Y &= W \; .
78+
\end{split}
79+
$$
80+
81+
This implies the following Jacobian matrix and determinant:
82+
83+
$$ \label{eq:XY-TW-jac}
84+
\begin{split}
85+
J &= \left[ \begin{matrix}
86+
\frac{\mathrm{d}X}{\mathrm{d}T} & \frac{\mathrm{d}X}{\mathrm{d}W} \\
87+
\frac{\mathrm{d}Y}{\mathrm{d}T} & \frac{\mathrm{d}Y}{\mathrm{d}W}
88+
\end{matrix} \right]
89+
= \left[ \begin{matrix}
90+
\sqrt{\frac{W}{\nu}} & \frac{T}{2 \sqrt{W/\nu}} \\
91+
0 & 1
92+
\end{matrix} \right] \\
93+
\lvert J \rvert &= \sqrt{\frac{W}{\nu}} \; .
94+
\end{split}
95+
$$
96+
97+
Because $X$ and $Y$ are [independent](/D/ind), the [joint density](/D/dist-joint) of $X$ and $Y$ is [equal to the product](/P/prob-ind) of the [marginal densities](/D/dist-marg):
98+
99+
$$ \label{eq:f-XY}
100+
f_{X,Y}(x,y) = f_X(x) \cdot f_Y(y) \; .
101+
$$
102+
103+
With the [probability density function of an invertible function](/P/pdf-invfct), the [joint density](/D/dist-joint) of $T$ and $W$ can be derived as:
104+
105+
$$ \label{eq:f-TW-s1}
106+
f_{T,W}(t,w) = f_{X,Y}(x,y) \cdot \lvert J \rvert \; .
107+
$$
108+
109+
Substituting \eqref{eq:XY-TW} into \eqref{eq:snorm-pdf} and \eqref{eq:chi2-pdf}, and then with \eqref{eq:XY-TW-jac} into \eqref{eq:f-TW-s1}, we get:
110+
111+
$$ \label{eq:f-TW-s2}
112+
\begin{split}
113+
f_{T,W}(t,w) &= f_X\left( t \cdot \sqrt{\frac{w}{\nu}} \right) \cdot f_Y(w) \cdot \lvert J \rvert \\
114+
&= \frac{1}{\sqrt{2 \pi}} \cdot e^{-\frac{\left( t \cdot \sqrt{\frac{w}{\nu}} \right)^2}{2}} \cdot \frac{1}{\Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot w^{\frac{\nu}{2}-1} \cdot e^{-\frac{w}{2}} \cdot \sqrt{\frac{w}{\nu}} \\
115+
&= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot w^{\frac{\nu+1}{2}-1} \cdot e^{-\frac{w}{2} \left( \frac{t^2}{\nu} + 1 \right)} \; .
116+
\end{split}
117+
$$
118+
119+
The [marginal density](/D/dist-marg) of $T$ can now be [obtained by integrating out](/D/dist-marg) $W$:
120+
121+
$$ \label{eq:f-T-s1}
122+
\begin{split}
123+
f_T(t) &= \int_{0}^{\infty} f_{T,W}(t,w) \, \mathrm{d}w \\
124+
&= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot \int_{0}^{\infty} w^{\frac{\nu+1}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) w \right] \, \mathrm{d}w \\
125+
&= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}} \cdot \int_{0}^{\infty} \frac{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}}{\Gamma\left( \frac{\nu+1}{2} \right)} \cdot w^{\frac{\nu+1}{2}-1} \cdot \mathrm{exp}\left[ -\frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) w \right] \, \mathrm{d}w \; .
126+
\end{split}
127+
$$
128+
129+
At this point, we can recognize that the integrand is equal to the [probability density function of a gamma distribution](/P/gam-pdf) with
130+
131+
$$ \label{eq:f-W-gam-ab}
132+
a = \frac{\nu+1}{2} \quad \text{and} \quad b = \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \; ,
133+
$$
134+
135+
and [because a probability density function integrates to one](/D/pdf), we finally have:
136+
137+
$$ \label{eq:f-T-s2}
138+
\begin{split}
139+
f_T(t) &= \frac{1}{\sqrt{2 \pi \nu} \cdot \Gamma\left( \frac{\nu}{2} \right) \cdot 2^{\nu/2}} \cdot \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\left[ \frac{1}{2}\left( \frac{t^2}{\nu}+1 \right) \right]^{(\nu+1)/2}} \\
140+
&= \frac{\Gamma\left( \frac{\nu+1}{2} \right)}{\Gamma\left( \frac{\nu}{2} \right) \cdot \sqrt{\nu \pi}} \cdot \left( \frac{t^2}{\nu}+1 \right)^{-\frac{\nu+1}{2}} \; .
141+
\end{split}
142+
$$

0 commit comments

Comments
 (0)