# 随机变量

（重定向自隨機變數

## 正式定義

${\displaystyle \{s\in S\,|\,X(s)\leq r\}\in {\mathcal {E}}}$
（也就是說，${\displaystyle X(s)\leq r}$  必為一個事件）

${\displaystyle X(S)=\{x_{1},x_{2},x_{3},\ldots ,\}\cong \mathbb {N} }$

${\displaystyle X(S)=[a,\,b]}$

### 與可測函數的關係

${\displaystyle {\mathcal {I}}={\bigg \{}A\in {\mathcal {P}}(\mathbb {R} )\,{\bigg |}\,(\exists a)(\exists b)\left[\,(a,\,b\in \mathbb {R} )\wedge (A=(a,\,b))\,\right]{\bigg \}}}$

${\displaystyle {\mathcal {B}}:=\sigma ({\mathcal {I}})=\bigcap {\bigg \{}\Sigma \,{\bigg |}\,(\Sigma {\text{ is a sigma algebra.}})\wedge ({\mathcal {I}}\subseteq \Sigma ){\bigg \}}}$

${\displaystyle (r,\,\infty )=\bigcup \left\{A\in {\mathcal {I}}\,{\bigg |}\,(\exists n\in \mathbb {N} )\left[A=(r,\,n)\right]\right\}}$
${\displaystyle (-\infty ,\,r]=\mathbb {R} -(r,\,\infty )}$

${\displaystyle (-\infty ,\,b)=\bigcup \left\{A\in {\mathcal {P}}(\mathbb {R} )\,{\bigg |}\,(\exists n\in \mathbb {N} )\left[A=(-\infty ,\,b-{\frac {1}{n}}]\right]\right\}}$
${\displaystyle (a,\,b)=\left(\mathbb {R} -(-\infty ,\,a]\right)\cup (-\infty ,b)}$

### 範例

${\displaystyle S=\left\{(i,j)\in \mathbb {N} ^{2}|(i\leq 6)\wedge (j\leq 6)\right\}}$

${\displaystyle {\mathcal {E}}={\mathcal {P}}(S)}$

${\displaystyle X(i,j):=i+j}$
${\displaystyle Y(i,j):=|i-j|}$

## 随机变量的函数

${\displaystyle F_{Y}(y)=\operatorname {P} (g(X)\leq y).}$

${\displaystyle F_{Y}(y)=\operatorname {P} (g(X)\leq y)={\begin{cases}\operatorname {P} (X\leq g^{-1}(y))=F_{X}(g^{-1}(y)),&{\text{if }}g^{-1}{\text{ increasing}},\\\\\operatorname {P} (X\geq g^{-1}(y))=1-F_{X}(g^{-1}(y)),&{\text{if }}g^{-1}{\text{ decreasing}}.\end{cases}}}$

${\displaystyle f_{Y}(y)=f_{X}(g^{-1}(y))\left|{\frac {dg^{-1}(y)}{dy}}\right|.}$

### 例子

${\displaystyle F_{Y}(y)=\operatorname {P} (X^{2}\leq y).}$

${\displaystyle F_{Y}(y)=0\qquad {\hbox{if}}\quad y<0.}$

${\displaystyle \operatorname {P} (X^{2}\leq y)=\operatorname {P} (|X|\leq {\sqrt {y}})=\operatorname {P} (-{\sqrt {y}}\leq X\leq {\sqrt {y}}),}$

${\displaystyle F_{Y}(y)=F_{X}({\sqrt {y}})-F_{X}(-{\sqrt {y}})\qquad {\hbox{if}}\quad y\geq 0.}$

## 參考文獻

1. ^ 刘明忠，王雪，周陈焱主编,大学应用数学,重庆大学出版社,2021.11,第248页