기본 콘텐츠로 건너뛰기

라벨이 variance인 게시물 표시

[matplotlib]quiver()함수

Variance

Variance As introduced in descriptive statistics, **variance** represents data variability and is calculated as Equation 1, and the square root of the variance becomes the standard deviation (σ). $$\begin{equation}\tag{1} \begin{aligned}\sigma^2&=E(X-\mu)^2\\&=(x_1-\mu)^2P(X=x_1)+ \cdots+(x_k-\mu)^2P(X=x_k)\\&=\sum^k_{i=1} (x_k-\mu)^2P(X=x_k) \end{aligned} \end{equation}$$ Variance, a measure of the spread of a data distribution, is the weighted average of the squared deviations between each data and the mean. Equation 1 is simplified to: $$\begin{aligned}&\begin{aligned}\sigma^2&=\sum (x-\mu)^2P(X=x)\\&=\sum(x^2-2x\mu+\mu^2)f(x)\\&=\sum x^2f(x) -2\mu \sum xf(x)+ \mu^2\\&=\sum x^2f(x)-\mu^2\\&=E(X^2)-(E(X))^2 \end{aligned}\\ & \because \sum xf(x)=\mu \end{aligned}$$ As in the above expression, the calculation of variance consists of the expected value of the square of the variable and the square of the mean. The expected value of that var...