均值与方差
首先回忆下均值和方差的定义,若存在 n n n个数为 x 1 , x 2 , … , x n x_1, x_2, \dots, x_n x1,x2,…,xn,则均值 μ \mu μ为:
μ = x 1 + x 2 + ⋯ + x n n \mu = \frac{x_1+x_2+\dots+x_n}{n} μ=nx1+x2+⋯+xn
均值衡量的是数值集中在哪个数值附近。令标准差为 σ \sigma σ,则方差 σ 2 \sigma^2 σ2为:
σ 2 = 1 n ∑ i = 1 n ( x i − μ ) 2 \sigma^2 = \frac{1}{n} \sum_{i=1}^{n}(x_i - \mu)^2 σ2=n1i=1∑n(xi−μ)