Skip to content
ImagineWorld

Appendix B — Useful Facts from Probability Theory and Statistics

node_idnode-book_deep-generative-modeling_appendix-b-useful-facts-from-probability-theory-and-statistics
node_typebook-part
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_titleAppendix B — Useful Facts from Probability Theory and Statistics
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Appendix B — Useful Facts from Probability Theory and Statistics

Section titled “Appendix B — Useful Facts from Probability Theory and Statistics”

Appendix B Useful Facts from Probability Theory and Statistics

B.1 Commonly Used Probability Distributions

Bernoulli Distribution

B(x∣θ)=θx(1−θ)1−x,where x∈{0,1} i θ∈[0,1]\mathrm{B}(x|\theta) = \theta^x (1 - \theta)^{1-x}, \quad \text{where } x \in \{0, 1\} \text{ i } \theta \in [0, 1]

E[x]=θ\mathbb{E}[x] = \theta

Var[x]=θ(1−θ)\mathrm{Var}[x] = \theta(1 - \theta)

Categorical (Multinoulli) Distribution

M(x∣θ)=∏d=1Dθdxd,where xd∈{0,1} i θd∈[0,1] for all d=1,2,…,D,\mathrm{M}(\mathbf{x}|\boldsymbol{\theta}) = \prod_{d=1}^{D} \theta_d^{x_d}, \quad \text{where } x_d \in \{0, 1\} \text{ i } \theta_d \in [0, 1] \text{ for all } d = 1, 2, \ldots, D, ∑d=1Dθd=1\sum_{d=1}^{D} \theta_d = 1

E[xd]=θd\mathbb{E}[x_d] = \theta_d

Var[xd]=θd(1−θd)\mathrm{Var}[x_d] = \theta_d(1 - \theta_d)

Normal Distribution

N(x∣μ,σ2)=12π σexp⁡{−(x−μ)22σ2}\mathcal{N}(x|\mu, \sigma^2) = \frac{1}{\sqrt{2\pi}\,\sigma} \exp \left\{ -\frac{(x - \mu)^2}{2\sigma^2} \right\}

E[x]=μ\mathbb{E}[x] = \mu

Var[x]=σ2\mathrm{Var}[x] = \sigma^2

Multivariate Normal Distribution

N(x∣μ,Σ)=1(2π)D/21∣Σ∣1/2exp⁡{−12(x−μ)TΣ−1(x−μ)},\mathcal{N}(\mathbf{x}|\boldsymbol{\mu}, \boldsymbol{\Sigma}) = \frac{1}{(2\pi)^{D/2}} \frac{1}{|\boldsymbol{\Sigma}|^{1/2}} \exp \left\{ -\frac{1}{2} (\mathbf{x} - \boldsymbol{\mu})^T \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu}) \right\},

where x\mathbf{x} is DD-dimensional vector, μ\boldsymbol{\mu} – DD-dimensional vector of means, Σ\boldsymbol{\Sigma} – D×DD \times D covariance matrix

© The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 J. M. Tomczak, Deep Generative Modeling, https://doi.org/10.1007/978-3-030-93158-2

B Useful Facts from Probability Theory and Statistics

E[x]=μ\mathbb{E}[\mathbf{x}] = \boldsymbol{\mu}

Cov[x]=Σ\mathrm{Cov}[\mathbf{x}] = \boldsymbol{\Sigma}

Beta Distribution

Beta(x∣a,b)=Γ(a+b)Γ(a)Γ(b)xa−1(1−x)b−1,\mathrm{Beta}(x|a, b) = \frac{\Gamma(a + b)}{\Gamma(a)\Gamma(b)} x^{a-1} (1 - x)^{b-1},

where x∈[0,1]x \in [0, 1] and a>0a > 0 i b>0b > 0, Γ(x)=∫0∞tx−1e−tdt\Gamma(x) = \int_{0}^{\infty} t^{x-1} e^{-t} \mathrm{d}t

E[x]=aa+b\mathbb{E}[x] = \frac{a}{a+b}

Var[x]=ab(a+b)2(a+b+1)\mathrm{Var}[x] = \frac{ab}{(a+b)^2(a+b+1)}

Marginal Distribution

In the continuous case:

p(x)=∫p(x,y)dyp(x) = \int p(x, y) \mathrm{d}y

and in the discrete case:

p(x)=∑yp(x,y)p(x) = \sum_{y} p(x, y)

Conditional Distribution

p(y∣x)=p(x,y)p(x)p(y|x) = \frac{p(x, y)}{p(x)}

Marginal Distribution and Conditional Distribution for Multivariate Normal Distribution

Assume x∼N(μ,Σ)\mathbf{x} \sim \mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma}), where

x=[xaxb],μ=[μaμb],Σ=[ΣaΣcΣcTΣb],\mathbf{x} = \begin{bmatrix} \mathbf{x}_a \\ \mathbf{x}_b \end{bmatrix}, \quad \boldsymbol{\mu} = \begin{bmatrix} \boldsymbol{\mu}_a \\ \boldsymbol{\mu}_b \end{bmatrix}, \quad \boldsymbol{\Sigma} = \begin{bmatrix} \boldsymbol{\Sigma}_a & \boldsymbol{\Sigma}_c \\ \boldsymbol{\Sigma}_c^T & \boldsymbol{\Sigma}_b \end{bmatrix},

then we get the following dependencies:

p(xa)=N(xa∣μa,Σa),p(\mathbf{x}_a) = \mathcal{N}(\mathbf{x}_a | \boldsymbol{\mu}_a, \boldsymbol{\Sigma}_a),

p(xa∣xb)=N(xa∣μ^a,Σ^a),p(\mathbf{x}_a | \mathbf{x}_b) = \mathcal{N}(\mathbf{x}_a | \hat{\boldsymbol{\mu}}_a, \hat{\boldsymbol{\Sigma}}_a), where

μ^a=μa+ΣcΣb−1(xb−μb),\hat{\boldsymbol{\mu}}_a = \boldsymbol{\mu}_a + \boldsymbol{\Sigma}_c \boldsymbol{\Sigma}_b^{-1} (\mathbf{x}_b - \boldsymbol{\mu}_b),

Σ^a=Σa−ΣcΣb−1ΣcT.\hat{\boldsymbol{\Sigma}}_a = \boldsymbol{\Sigma}_a - \boldsymbol{\Sigma}_c \boldsymbol{\Sigma}_b^{-1} \boldsymbol{\Sigma}_c^T.

B Useful Facts from Probability Theory and Statistics

Sum Rule

p(x)=∑yp(x,y)p(x) = \sum_{y} p(x, y)

Product Rule

p(x,y)=p(x∣y)p(y)p(x, y) = p(x|y)p(y) =p(y∣x)p(x)= p(y|x)p(x)

Bayes’ Rule

p(y∣x)=p(x∣y)p(y)p(x)p(y|x) = \frac{p(x|y)p(y)}{p(x)}

B.2 Statistics

Maximum Likelihood Estimator

There are given NN independent examples of x\mathbf{x} from the identical distribution p(x∣θ)p(\mathbf{x}|\theta), D={x1…xN}\mathcal{D} = \{\mathbf{x}_1 \ldots \mathbf{x}_N\}. The likelihood function is the following function:

p(D∣θ)=∏n=1Np(xn∣θ).p(\mathcal{D}|\theta) = \prod_{n=1}^{N} p(\mathbf{x}_n|\theta).

The logarithm of the likelihood function p(D∣θ)p(\mathcal{D}|\theta) is given by the following expression:

log⁡p(D∣θ)=∑n=1Nlog⁡p(xn∣θ).\log p(\mathcal{D}|\theta) = \sum_{n=1}^{N} \log p(\mathbf{x}_n|\theta).

Maximum likelihood estimator of the parameters θML\theta_{ML} minimizes the likelihood function:

p(D∣θML)=max⁡θp(D∣θ).p(\mathcal{D}|\theta_{ML}) = \max_{\theta} p(\mathcal{D}|\theta).

Maximum A Posteriori Estimator

There are given NN independent examples of x\mathbf{x} from the identical distribution p(x∣θ)p(\mathbf{x}|\theta), D={x1…xN}\mathcal{D} = \{\mathbf{x}_1 \ldots \mathbf{x}_N\}. Maximum a posteriori (MAP) estimator of the parameters θMAP\theta_{MAP}

B Useful Facts from Probability Theory and Statistics

minimizes the a posteriori distribution:

p(θMAP∣D)=max⁡θp(θ∣D).p(\theta_{MAP}|\mathcal{D}) = \max_{\theta} p(\theta|\mathcal{D}).

Risk in Decision Making

Risk (expected loss) is defined as follows:

R[yˉ]=∬L(y,yˉ(x)) p(x,y)dxdy,\mathcal{R}[\bar{y}] = \iint L(y, \bar{y}(\mathbf{x})) \, p(\mathbf{x}, y) \mathrm{d}\mathbf{x} \mathrm{d}y,

where L(⋅,⋅)L(\cdot, \cdot) is the loss function.