Abstract: 本文继续上文的内容，讲解多变量分布的条件分布，全概率公式和贝叶斯公式。提出直方图的概念。
Keywords: Conditional Distributions，Law of Total Probability，Bayes’ Theorem，Histograms

# 多变量分布

## 多变量条件分布 Conditional Distributions

$$g_{k+1,\dots,x_n}(x_{k+1},\dots,x_{n}|x_1,\dots,x_k)=\frac{f(x_1,\dots ,x_n)}{f_0(x_1,\dots,x_k)}$$

Definition 3.3.7 Conditional p.f. or p.d.f. Suppose that the random vector $\vec{X}=(X_1,\dots,X_n)$ is divided into two subvectors $\vec{Y}$ and $\vec{Z}$ ,where $\vec{Y}$ is a k-dimensional random vector comprising $k$ of the $n$ random variables in $\vec{X}$ and $\vec{Z}$ is an $(n-k)$-dimensional random vector comprising the other $n-k$ random variables in $\vec{X}$ .Suppose also that the $n$-dimensional joint p.f. or p.d.f. of $(\vec{Y},\vec{Z})$ is $f$ and that the marginal $(n-k)$-dimensional joint p.f. ,p.d.f. or p.f./p.d.f. of $\vec{Z}$ is $f_2$ .Then for every given point $z\in\mathbb{R}^{n-k}$ such that $f_2(z)>0$ ,the conditional $k$-dimensional p.f. p.d.f.or p.f./p.d.f. $g_1$ of $\vec{Y}$ given $\vec{Z}=\vec{z}$ is defined as follows:
$$g_1(\vec{y}|\vec{z})=\frac{f(\vec{y},\vec{z})}{f_2(\vec{z})} \text{ for }\vec{y}\in \mathbb{R}^k$$

$$f(\vec{y},\vec{z})=g_1(\vec{y}|\vec{z}) f_2(\vec{z})$$

### 多变量全概率公式，贝叶斯定理 Law of Total Probability & Bayes’ Theorem

Theorem Multivariate Law of Total Probability and Bayes’ Theorem .Assume the conditions and notation given in Definition 3.3.7 .If $\vec{Z}$ has a continuous joint distribution ,the marginal p.d.f. of $\vec{Y}$ is
$$f_1(\vec{y})=\underbrace{\int^{\infty}_{-\infty} \dots \int^{\infty}_{-\infty}}_{n-k}g_1(\vec{y}|\vec{z})f_2(\vec{z})d\vec{z}$$

and the conditional p.d.f. of $\vec{Z}$ given $\vec{Y}=\vec{y}$ is
$$g_2(\vec{z}|\vec{y})=\frac{g_1(\vec{y}|\vec{z})f_2(\vec{z})}{f_1(\vec{y})}$$

### 条件独立多随机变量 Conditionally Independent Random Variables

Definition Conditionally Independent Random Variables.Let Z be a random vector with joint p.f.,p.d.f. or p.f./p.d.f. f_0(\vec{z}) .Several random variables X_1,\dots,X_n are conditionally independent given Z if,for all z such that f_0(z)>0 we have
$$g(\vec{x}|\vec{z})=\prod_{i=1}^ng_i{x_i}|\vec{z})$$

$$g_2(\vec{z}|\vec{y},\vec{w})=\frac{g_1(\vec{y}|\vec{z},\vec{w})f_2(\vec{z}|\vec{w})}{f_1(\vec{y}|\vec{w})}$$

## 直方图 Histograms

Definition Histogram. Let $x_1,\dots,x_n$ be a collection of numbers that all lie between two values $a < b$ That is $a\leq x_i \leq b$ for all $i=1,\dots,n$ Choose some integer $k\geq 1$ and divide the interval $[a,b]$ into $k$ equal-legth subintervals of length $\frac{b-a}{k}$ .For each subinterval,count how many of the numbers $x_1,\dots,x_n$ are in the subinterval,Let $c_i$ be the count for subinterval $i$ for $i=1,\dots,k$ ,Choose a number $r>0$ (Typically, $r+1$ ,or $r=n$ or $r=\frac{n(b-a)}{k})$ Draw a two-dimensional graph with the horizonal axis running from $a$ to $b$ .For each subinterval $i=1,\dots,k$ draw a rectangular bar of width $\frac{b-a}{k} and height equal to$\frac{c_i}{r}$over the midpoint of the$i\$th interval.such a graph is called a histogram.

0%