『確率と計算』 第2章

2 Discrete Random Variables and Expectation

2.1 Random Variables and Expectation

確率の定義。確率変数 $X$ は標本空間 $\Omega$ から実数への関数で、

\[ \mathrm{Pr}(X=a) = \sum_{s\in\Omega | X(s)=a}\mathrm{Pr}(s) \]

期待値の定義は、確率変数 $X$ のすべての値について、その値になる確率の積の合計になる。

\[ \mathbf{E}[X] = \sum_{i}i\mathrm{Pr}(X=i) \]

2.1.1 Linearity of Expectations

\[ \mathbf{E}\left[\sum_{i=1}^nX_i\right] = \sum_{i=1}^n\mathbf{E}[X_i] \]

また、 $c$ は定数として,

\[ \mathbf{E}[cX] = c\mathbf{E}[X] \]

2.1.2 Jensen’s Inequality

$f$ が凸(convex)関数であるなら

\[ \mathbf{E}[f(X)] \geq f(\mathbf{E}[X]) \]

2.2 The Bernoulli and Binomial Random Variables

確率 $p$ で成功し、確率 $1-p$ で失敗する試行のことを、ベルヌーイ試行という。

ベルヌーイ試行が成功するとき 1, そうでないとき 0 をとる確率変数 $Y$ を Bernoulli, もしくは an indicator random variable という。

\[ \mathbf{E}[Y] = \mathrm{Pr}(Y=1) \]

またベルヌーイ試行をくりかえしたとき、確率変数 $X$ を成功した回数とすると、$X$は二項分布となる。

\[ \mathrm{Pr}(X=j) = {n \choose j}p^j(1-p)^{(n-j)} \]

$X$ の期待値は

\[ \mathbf{E}[X] = np \]

2.3 Conditional Expectation

definition

\[ \mathbf{E}[Y|Z=z] = \sum_yy\mathrm{Pr}(Y=y|Z=z) \]

lemma

\[ \mathbf{E}[X] = \sum_y\mathrm{Pr}(Y=y)\mathbf{E}[X|Y=y] \]

他に、確率変数としても $\mathbf{E}[Y|Z]$ がつかわれる。

a random variable $f(z)$ that takes on the value $\mathbf{E}[Y|Z=z]$ when $Z=z$

theorem.

\[ \mathbf{E}[Y] = \mathbf{E}\left[\mathbf{E}[Y|Z]\right] \]

2.4 The Geometric Distribution

コイン投げで初めて表がでるまでの試行回数、幾何分布の例の1つ。

\[ \mathrm{Pr}(X=n) = (1-p)^{(n-1)}p \]

lemma: $X$ is geometric random variable with param $p$ and for $n$ > 0

[[ \mathrm{Pr}(X=n+k|X>k) = \mathrm{Pr}(X=n) ]]

lemma: discrete random variable $X$ that takes on non-negative integer values

[[ \mathbf{E}(X) = \sum_{i=1}{\mathrm{Pr}(X=i)} ]]

これを幾何分布にあてはめると、期待値 $\mathbf{E}(X)=1/p$ ともとまる

2.5 Application: The Expected Run-Time of Quicksort