Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Variance
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Definition== The variance of a random variable <math>X</math> is the [[expected value]] of the [[Squared deviations from the mean|squared deviation from the mean]] of <math>X</math>, <math>\mu = \operatorname{E}[X]</math>: <math display="block"> \operatorname{Var}(X) = \operatorname{E}\left[(X - \mu)^2 \right]. </math> This definition encompasses random variables that are generated by processes that are [[discrete random variable|discrete]], [[continuous random variable|continuous]], [[Cantor distribution|neither]], or mixed. The variance can also be thought of as the [[covariance]] of a random variable with itself: <math display="block">\operatorname{Var}(X) = \operatorname{Cov}(X, X).</math> The variance is also equivalent to the second [[cumulant]] of a probability distribution that generates <math>X</math>. The variance is typically designated as <math>\operatorname{Var}(X)</math>, or sometimes as <math>V(X)</math> or <math>\mathbb{V}(X)</math>, or symbolically as <math>\sigma^2_X</math> or simply <math>\sigma^2</math> (pronounced "[[sigma]] squared"). The expression for the variance can be expanded as follows: <math display="block">\begin{align} \operatorname{Var}(X) &= \operatorname{E}\left[{\left(X - \operatorname{E}[X]\right)}^2\right] \\[4pt] &= \operatorname{E}\left[X^2 - 2 X \operatorname{E}[X] + \operatorname{E}[X]^2\right] \\[4pt] &= \operatorname{E}\left[X^2\right] - 2 \operatorname{E}[X] \operatorname{E}[X] + \operatorname{E}[X]^2 \\[4pt] &= \operatorname{E}\left[X^2\right] - 2\operatorname{E}[X]^2 + \operatorname{E}[X]^2 \\[4pt] &= \operatorname{E}\left[X^2\right] - \operatorname{E}[X]^2 \end{align}</math> In other words, the variance of {{mvar|X}} is equal to the mean of the square of {{mvar|X}} minus the square of the mean of {{mvar|X}}. This equation should not be used for computations using [[floating-point arithmetic]], because it suffers from [[catastrophic cancellation]] if the two components of the equation are similar in magnitude. For other numerically stable alternatives, see [[algorithms for calculating variance]]. ===Discrete random variable=== If the generator of random variable <math>X</math> is [[Discrete probability distribution|discrete]] with [[probability mass function]] <math>x_1 \mapsto p_1, x_2 \mapsto p_2, \ldots, x_n \mapsto p_n</math>, then <math display="block">\operatorname{Var}(X) = \sum_{i=1}^n p_i \cdot {\left(x_i - \mu\right)}^2,</math> where <math>\mu</math> is the expected value. That is, <math display="block">\mu = \sum_{i=1}^n p_i x_i .</math> (When such a discrete [[weighted variance]] is specified by weights whose sum is not 1, then one divides by the sum of the weights.) The variance of a collection of <math>n</math> equally likely values can be written as <math display="block"> \operatorname{Var}(X) = \frac{1}{n} \sum_{i=1}^n (x_i - \mu)^2 </math> where <math>\mu</math> is the average value. That is, <math display="block">\mu = \frac{1}{n}\sum_{i=1}^n x_i .</math> The variance of a set of <math>n</math> equally likely values can be equivalently expressed, without directly referring to the mean, in terms of squared deviations of all pairwise squared distances of points from each other:<ref>{{cite conference|author=Yuli Zhang |author2=Huaiyu Wu |author3=Lei Cheng |date=June 2012|title=Some new deformation formulas about variance and covariance|conference=Proceedings of 4th International Conference on Modelling, Identification and Control(ICMIC2012)|pages=987–992}}</ref> <math display="block"> \operatorname{Var}(X) = \frac{1}{n^2} \sum_{i=1}^n \sum_{j=1}^n \frac{1}{2} {\left(x_i - x_j\right)}^2 = \frac{1}{n^2} \sum_i \sum_{j>i} {\left(x_i - x_j\right)}^2. </math> ===Absolutely continuous random variable=== If the random variable <math>X</math> has a [[probability density function]] <math>f(x)</math>, and <math>F(x)</math> is the corresponding [[cumulative distribution function]], then <math display="block">\begin{align} \operatorname{Var}(X) = \sigma^2 &= \int_{\R} {\left(x - \mu\right)}^2 f(x) \, dx \\[4pt] &= \int_{\R} x^2 f(x)\,dx -2\mu\int_{\R} xf(x)\,dx + \mu^2\int_{\R} f(x)\,dx \\[4pt] &= \int_{\R} x^2 \,dF(x) - 2 \mu \int_{\R} x \,dF(x) + \mu^2 \int_{\R} \,dF(x) \\[4pt] &= \int_{\R} x^2 \,dF(x) - 2 \mu \cdot \mu + \mu^2 \cdot 1 \\[4pt] &= \int_{\R} x^2 \,dF(x) - \mu^2, \end{align}</math> or equivalently, <math display="block">\operatorname{Var}(X) = \int_{\R} x^2 f(x) \,dx - \mu^2 ,</math> where <math>\mu</math> is the expected value of <math>X</math> given by <math display="block">\mu = \int_{\R} x f(x) \, dx = \int_{\R} x \, dF(x). </math> In these formulas, the integrals with respect to <math>dx</math> and <math>dF(x)</math> are [[Lebesgue integral|Lebesgue]] and [[Lebesgue–Stieltjes integration|Lebesgue–Stieltjes]] integrals, respectively. If the function <math>x^2f(x)</math> is [[Riemann-integrable]] on every finite interval <math>[a,b]\subset\R,</math> then <math display="block">\operatorname{Var}(X) = \int^{+\infty}_{-\infty} x^2 f(x) \, dx - \mu^2, </math> where the integral is an [[improper Riemann integral]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Variance
(section)
Add topic