# # 随机变量和概率分布

## # 概率分布

### # 随机变量的期望

$\mathbb{E}[X] = \sum_{x_k \in \mathcal{X}} x_k P(X=x_k) = \sum_{x_k \in \mathcal{X}} x_k P_X(x_k)$

$\mathbb{E}[X] = \sum_{x_k \in \mathcal{X}} x_k P(X=x_k) = 1\times\frac{1}{6} + 2\times\frac{1}{6} + 3\times\frac{1}{6} + 4\times\frac{1}{6} + 5\times\frac{1}{6} + 6\times\frac{1}{6} = 3.5$

• 试验的历史结果: $\{X_1,X_2, ... , X_n\}$
• 试验的次数: $n$
• 试验点数之和: $\sum_{i=1}^{n}X_i$
• 试验点数平均值： $\bar{X} = \frac{\sum_{i=1}^{n}X_i}{n}$

$\lim_{n\to +\infty} \bar{X}= \lim_{n\to +\infty} \frac{\sum_{i=1}^{n}X_i}{n} = \mathbb{E}[X]$

### # 均值和期望一样吗？

$\mathbb{E}[X] = \mathbb{E}(X) = \mathbb{E}X = \mu_{X}$

### # 随机变量的方差

$\text{Var}(X) = \sum_{i=1}^n p_i \cdot (x_i - \mathbb{E}[X])^2$

[1] Statistics: A Very Short Introduction. Chapter 4 Probability. ↩︎
[2] https://www.probabilitycourse.com/chapter3/3_2_2_expectation.php (opens new window). ↩︎
[3] https://math.stackexchange.com/questions/904343/what-is-the-difference-between-average-and-expected-value (opens new window). ↩︎
[4] 维基百科中文: 方差 (opens new window). ↩︎