# 随机变量的期望

## 函数的期望 The Expecatation of a function

### 单随机变量的函数 Function of a Single Random Variable

Function of a Single Random Variable : If $X$ is a random variable for which the p.d.f. is $f$ ,then the expectation of each real-valued function $r(X)$ can be found by applying the definition of expectation to the distribution of $r(X)$ as follows:Let $Y=r(X)$ ,determine the probability distribution of $Y$ ,and then determine $E(Y)$ by applying either expectation for a discrete distribution or expectation for a continous distribution.For example suppose that $Y$ has a continuous distribution with the p.d.f. $g$ .Then
$$E[r(X)]=E(Y)=\int^{\infty}_{-\infty}yg(y)dy$$

$$f(x)= \begin{cases} 3x^2&\text{ if }0<x<1\\ 0&\text{oterwise} \end{cases}$$

$$g(y)= \begin{cases} 3y^{-4}&\text{ if }y>1\\ 0&\text{oterwise} \end{cases}$$

$$E(Y)=\int^{\infty}_{0}y^3y^{-4}dy=\frac{3}{2}$$

Theorem Law of the Unconscious Statistician.Let $X$ be a random varibale,and let $r$ be a real-valued function of a real variable.If $X$ has a continuous distribution,then
$$E[r(x)]=\int^{\infty}_{-\infty}r(x)f(x)dx$$
If the mean exists.If X has a discrete distribution ,then
$$E[r(X)]=\sum_{\text{All } x}r(x)f(x)$$
if the mean exists.

$$\sum_{y}yg(y)=\sum_{y}yPr[r(x)=y]\\ =\sum_{y}y\sum_{x:r(x)=y}f(x)\\ =\sum_{y}\sum_{x:r(x)=y}r(x)f(x)=\sum_{x}r(x)f(x)$$
Q.E.D

### 多随机变量的函数 Function of Several Random Variables

Theorem Law of Unconscious Statistician:Suppose $X_1,\dots,X_n$ are random variables with the joint p.d.f $f(x_1,\dots,x_n)$ Let $r$ be a real-valued function of $n$ real varibales,and suppose that $Y=r(X_1,\dots,X_n)$ .Then $E(Y)$ can be determined directly from the relation
$$E(Y)=\underbrace{\int\dots\int}_{R_n}r(x_1,\dots,x_n)f(x_1,\dots,x_n)$$
if the mean exists.Similarly ,if $X_1,\dots,X_n$ have a discrete joint distribution with p.f. $f(x_1,\dots,x_n)$ the mean of $Y=r(X_1,\dots,X_n)$ is
$$E(Y)=\sum_{\text{All }x_1,\dots,x_n}r(x_1,\dots,x_n)r(x_1,\dots,x_n)f(x_1,\dots,x_n)$$
if the mean exists

Subscribe