Variance
In probability theory, the varianza or Variance (usually represented as σ σ 2{displaystyle sigma ^{2}}) of a random variable is a dispersion measure defined as the hope of the square of the deviation of such variable regarding its average. Its unit of measure corresponds to the square of the unit of measurement of the variable: for example, if the variable measures a distance in meters, the variance is expressed in meters to square. Variance has a minimum value 0. The standard deviation (positive square root of variance) is an alternative dispersion measure, expressed in the same units as the data of the variable subject to study.
Note that the variance can be greatly influenced by outliers and its use is not recommended when the distributions of random variables have heavy tails. In such cases, the use of other more robust measures of dispersion is recommended.
The term variance was coined by Ronald Fisher in an article published in January 1919 under the title The Correlation Between Relatives on the Supposition of Mendelian Inheritance.
Then we will review the formulas, keep in mind that the variance formula for a population (σ2) differs from the variance formula for a sample (s 2), But before looking at the variance formula, we must say that variance in statistics is very important. Since although it is a simple measure, it can provide a lot of information about a specific variable.
Formula to calculate the variance
The unit of measurement of the variance will always be the unit of measurement corresponding to the data but raised to the square. The variance is always greater than or equal to zero. When the residuals are squared, it is mathematically impossible for the variance to be negative. And so it can't be less than zero.
Sea X{displaystyle X} a random variable with average μ μ =E (X){displaystyle mu =operatorname {E} (X)}, define the varianza of the random variable X{displaystyle X}, denoted by Var (X){displaystyle operatorname {Var} (X)}, σ σ X2{displaystyle sigma _{X}^{2}} or simply σ σ 2{displaystyle sigma ^{2}} Like
- Var (X)=E [chuckles](X− − μ μ )2]{displaystyle operatorname {Var} (X)=operatorname {E} [(X-mu)^{2}}}}
Developing the previous definition, the following alternative (and equivalent) definition is obtained:
- Var (X)=E [chuckles](X− − μ μ )2]=E [chuckles](X2− − 2Xμ μ +μ μ 2)]=E [chuckles]X2]− − 2μ μ E [chuckles]X]+μ μ 2=E [chuckles]X2]− − 2μ μ 2+μ μ 2=E [chuckles]X2]− − μ μ 2=E [chuckles]X2]− − E2 [chuckles]X]{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFFFFFFFFFF}{cHFFFFFFFF}{cHFFFFFF}{cHFFFFFFFF}{cHFFFFFFFFFFFFFFFFFFFF}{cHFFFFFFFFFFFFFFFF}{cHFFFFFFFFFFFFFFFFFFFFFFFFFFFF}{cHFFFFFFFFFFFFFF}{cHFF}{cHFFFFFF}{cHFF}{cHFFFF}{cHFF}{cHFFFFFFFFFFFFFFFFFFFFFF}{cHFFFFFF}{cHFFFFFFFFFFFFFFFFFFFF
If a distribution has no hope, as with that of Cauchy, it does not have any variation. There are other distributions that, even with hope, lack varying. An example of them is that of Couple when their index k{displaystyle k} sat <math alttext="{displaystyle 11.k≤ ≤ 2{displaystyle 1 habitkleq 2}<img alt="{displaystyle 1.
Case continuous
If the random variable X{displaystyle X} is continuous with density function f(x){displaystyle f(x)} then.
- Var (X)=∫ ∫ RX(x− − μ μ )2f(x)dx{displaystyle operatorname {Var} (X)=int _{R_{X}}(x-mu)^{2}f(x)dx}
where
- μ μ =E [chuckles]X]=∫ ∫ RXxf(x)dx{displaystyle mu =operatorname {E} [X]=int _{R_{X}xf(x)dx}
and the integrals are defined on the support of the random variable X{displaystyle X}I mean, RX{displaystyle R_{X}}.
Inconspicuous case
If the random variable X{displaystyle X} is discreet with probability function P [chuckles]X=x]{displaystyle operatorname {P} [X=x]} then.
- Var (X)=␡ ␡ x한 한 RX(x− − μ μ )2P [chuckles]X=x]{displaystyle operatorname {Var} (X)=sum _{xin R_{X}(}x-mu)^{2}operatorname {P} [X=x]}}}}
where
- μ μ =E [chuckles]X]=␡ ␡ x한 한 RXxP [chuckles]X=x]{displaystyle mu =operatorname {E} [X]=sum _{xin R_{X}}}xoperatorname {P} [X=x]}}
Properties
Sean. X{displaystyle X} and And{displaystyle Y} two random variables with finite variance and a한 한 R{displaystyle ain mathbb {R} }
- Var (X)≥ ≥ 0{displaystyle operatorname {Var} (X)geq 0}
- Var (a)=0{displaystyle operatorname {Var} (a)=0}
- Var (aX)=a2Var (X){displaystyle operatorname {Var} (aX)=a^{2}operatorname {Var} (X}
- Var (X+And)=Var (X)+Var (And)+2Cov (X,And){displaystyle operatorname {Var} (X+Y)=operatorname {Var} (X)+operatorname {Var} (Y)+2operatorname {Cov} (X,Y)}Where Cov (X,And){displaystyle operatorname {Cov} (X,Y)} denotes the covariance of X{displaystyle X} e And{displaystyle Y}
- Var (X+And)=Var (X)+Var (And){displaystyle operatorname {Var} (X+Y)=operatorname {Var} (X)+operatorname {Var} (Y)} Yeah. X{displaystyle X} and And{displaystyle Y} are independent random variables.
- Var (And)=E (Var (And日本語X))+Var (E (And日本語X)){displaystyle operatorname {Var} (Y)=operatorname {E} (operatorname {Var} (YUDX))+operatorname {Var} (operatorname {E} (YUDX)}}}} calculation of the Variance by Pythagoras, where And日本語X{displaystyle YINDX} is the conditional random variable And{displaystyle Y} given X{displaystyle X}.
Examples
By tossing a coin we could get Heads or Tails.
Let's give them the values Face = 0 and Shield = 1 and we have a random variable "X":
Using mathematical notation:
X = {0, 1}
Note: We could choose Heads = 100 and Shields = 150 or other values if we wanted! It is our choice. So:
- We have a experiment (like throwing a coin)
- We do. values to each event.
- The set of values form the Variable Random
Exponential distribution
If a continuous random variable X{displaystyle X} has an exponential distribution with parameter λ λ {displaystyle lambda } then its density function is given by
- fX(x)=λ λ e− − λ λ x{displaystyle f_{X}(x)=lambda e^{-lambda x}
for x≥ ≥ 0{displaystyle xgeq 0}.
It's not hard to see the average X{displaystyle X} That's it. E [chuckles]X]=1/λ λ {displaystyle operatorname {E} [X]=1/lambda }So to find his variance we calculate
- Var (X)=∫ ∫ 0∞ ∞ (x− − 1λ λ )2λ λ e− − λ λ xdx{displaystyle {begin{aligned}operatorname {Var} (X) fake=int _{0}^{infty }left(x-{frac {1}{lambda }}{right){2}lambda e^{-lambda x}dxend{aligned}}}}}}}}
After integrating it can be concluded that
- Var (X)=1λ λ 2{displaystyle operatorname {Var} (X)={frac {1}{lambda ^{2}}}}}
Perfect Die
A six-sided die can be represented as a discrete random variable that takes values from 1 to 6 with probability equal to 1/6. The expected value is (1+2+3+4+5+6)/6 = 3.5. Therefore, its variance is:
- ␡ ␡ i=1616(i− − 3,5)2=16((− − 2,5)2+(− − 1,5)2+(− − 0,5)2+0,52+1,52+2,52)=16⋅ ⋅ 17,50=3512≈ ≈ 2,92.{displaystyle sum _{i=1}{6}{tfrac {1}{6}{6}{6}{2}{2}={tfrac {1}{6}{6}{2}{2}{2}{2}{2}}{1⁄2}}{1⁄2}}{1⁄2}}{1⁄2}}}{1⁄2⁄2}}}}{1⁄2}}}}}}}}}}{1⁄2}}}}}{1⁄2}}}}}}}{1⁄2}}{1⁄2}}}}}}}}}}{1⁄2}}{1⁄2}}}}}}{1⁄2}}{1⁄2}}}}}}}}}{1⁄2}}}}}}}}{1⁄2}{1⁄2}}}}{1⁄2⁄2}{1⁄2⁄2}}}}}}}}}}}{1⁄2⁄2}}}}}}{ !
Sampling variance
In many situations it is necessary to estimate the population variation from a sample. If you take a sample with replacement (x1,x2...... ,xn){displaystyle (x_{1},x_{2}dotsx_{n}}} of n{displaystyle n} among all possible estimators of the varying population of departure, there are two current uses
The first one
- sn2=1n␡ ␡ i=1n(xi− − x! ! )2{displaystyle s_{n}^{2}={frac {1}{n}}}sum _{i=1}^{n}left(x_{i}-{bar {x}}}{right){2}}}}
which can be written as
- sn2=1n␡ ␡ i=1nxi2− − x! ! 2{displaystyle s_{n}^{2}={frac {1}{n}}}{i=1}{n}{n}x_{i}{2}-{bar {x}{x}}}{2}}}{2}}}
well
- sn2=1n␡ ␡ i=1n(xi− − x! ! )2=1n␡ ␡ i=1n(xi2− − 2xix! ! +x! ! 2)=1n␡ ␡ i=1nxi2− − 2x! ! n␡ ␡ i=1nxi+x! ! 21n␡ ␡ i=1n1=1n␡ ␡ i=1nxi2− − 2x! ! 2+x! ! 2=1n␡ ␡ i=1nxi2− − x! ! 2{cHFFFF}{cH00FF}{cHFFFFFF}{cHFFFFFF}{cH00FF}{cHFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFF}{cHFFFF}{cHFF}{cHFFFF}{cH00}{cH00}{cH00}{cHFFFFFF}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cHFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}
and the second one is
- s2=1n− − 1␡ ␡ i=1n(xi− − x! ! )2{displaystyle s^{2}={frac {1}{n-1}}}sum _{i=1}{nleft(x_{i}-{overline {x}}}right)^{2}}}
which can be written as
- s2=␡ ␡ i=1nxi2− − nx! ! 2n− − 1{displaystyle s^{2}={frac {sum _{i=1}^{nx_{i}{2}{2}-n{overline {x}}{2}}}{n-1}}}}}}}}}
well
- s2=1n− − 1␡ ␡ i=1n(xi− − x! ! )2=1n− − 1␡ ␡ i=1n(xi2− − 2xix! ! +x! ! 2)=1n− − 1␡ ␡ i=1nxi2− − 2x! ! n− − 1␡ ␡ i=1nxi+x! ! 2n− − 1␡ ␡ i=1n1=1n− − 1␡ ␡ i=1nxi2− − 2x! ! nn− − 11n␡ ␡ i=1nxi+x! ! 2nn− − 1=1n− − 1␡ ␡ i=1nxi2− − 2x! ! 2nn− − 1+x! ! 2nn− − 1=1n− − 1␡ ␡ i=1nxi2− − x! ! 2nn− − 1=␡ ␡ i=1nxi2− − nx! ! 2n− − 1♪♪
Both are called sample variance, differ slightly and, for large values n{displaystyle n}The difference is irrelevant. The first moves directly the variation of the sample to that of the population and the second is an unswerving estimator of the population variance because
- E [chuckles]s2]=E [chuckles]1n− − 1␡ ␡ i=1nxi2− − nn− − 1x! ! 2]=1n− − 1(␡ ␡ i=1nE [chuckles]xi2]− − nE [chuckles]x! ! 2])=1n− − 1(nE [chuckles]x12]− − nE [chuckles]x! ! 2])=nn− − 1(Var (x1)+E [chuckles]x1]2− − Var (x! ! )− − E [chuckles]x! ! ]2)=nn− − 1(Var (x1)+μ μ 2− − 1nVar (x1)− − μ μ 2)=nn− − 1(n− − 1nVar (x1))=Var (x1)=σ σ 2{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFF}{cHFFFFFFFF}{cHFFFFFFFF}{cHFFFF}{cHFFFF}{cHFFFF}{cHFFFF}{cH00}{cHFFFFFFFFFF}{cH00}{cH00}{cH00}{cH00}{cH00}{cH00}{cHFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}{cH00}{cH00}{cH00}{cH00}{cH00}{cHFFFFFFFFFFFFFFFFFFFFFFFF}{cH00}{cH00}{cH00}{cH00}{cH00}{cHFFFFFFFF
while
- E[chuckles]sn2]=n− − 1nσ σ 2{displaystyle E[s_{n}^{2}]={frac {n-1}{n}{n}}{sigma ^{2}}}
Properties of the sample variance
As a result of equality E (s2)=σ σ 2{displaystyle operatorname {E} (s^{2})=sigma ^{2}}}, s2{displaystyle s^{2}} is an insected statistician σ σ 2{displaystyle sigma ^{2}}. In addition, if the conditions necessary for the law of large numbers are met, s2 is a consistent estimator σ σ 2{displaystyle sigma ^{2}}.
Moreover, when samples follow a normal distribution, by the Cochran theorem, s2{displaystyle s^{2}} has the chi-square distribution:
- ns2σ σ 2♥ ♥ χ χ n− − 12.{displaystyle n{frac {s^{2}}{sigma ^{2}sim chi _{n-1}^{2}. !
Interpretations of the sample variance
We leave three equivalent formulas for the calculation of sample variance sn{displaystyle s_{n}}
- <math alttext="{displaystyle s_{n}^{2}={frac {1}{n}}sum _{i=1}^{n}left(y_{i}-{overline {y}}right)^{2}=left({frac {1}{n}}sum _{i=1}^{n}y_{i}^{2}right)-{overline {y}}^{2}={frac {1}{n^{2}}}sum _{isn2=1n␡ ␡ i=1n(andi− − and! ! )2=(1n␡ ␡ i=1nandi2)− − and! ! 2=1n2␡ ␡ i.j(andi− − andj)2{displaystyle s_{n^}{2}{frac {1}{n}}{i=1}{n}{n}{nft(y_{i}{i}{overline {y}}{i}}{i}{2}}{left({n}{n}{n1}{i}{nx}{i}{i }{i }{i }{i }{i }{f}{i }{f}{f}{f}{f}{f}{f}}{f}{f}{f}}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{f)}{b<img alt="{displaystyle s_{n}^{2}={frac {1}{n}}sum _{i=1}^{n}left(y_{i}-{overline {y}}right)^{2}=left({frac {1}{n}}sum _{i=1}^{n}y_{i}^{2}right)-{overline {y}}^{2}={frac {1}{n^{2}}}sum _{i
The latter equality has an interest in interpreting estimators s2{displaystyle s^{2}} and sn2{displaystyle s_{n}^{2}}If you want to evaluate the deviation of a data or its differences, you can choose to calculate the average of the squares of the differences of each pair of data:
- 2sn2=␡ ␡ (i n,j n)(andi− − andj)2n2{displaystyle 2s_{n}^{2}={frac {sum _{left(ileqslant n,jleqslant nright)}left(y_{i}-y_{j}right)^{2}{n^{2}}}}}}}. Note that the sum number is n2{displaystyle n^{2}}.
Or you can consider the average of the squares of the differences of each pair of data without taking into account each data itself, now the number of addings is n(n− − 1){displaystyle nleft(n-1right)}.
- 2s2=␡ ␡ iI was. I was. j(andi− − andj)2n(n− − 1){displaystyle 2s^{2}={frac {sum _{ineq j}left(y_{i}-y_{j}right)^{2}{nleft(n-1right)}}}}}}}}
Some applications of variance
The statistical applications of the variance concept are countless. The following are just some of the main ones:
- Efficient estimators. They are those whose hope is the true value of the parameter and, in addition, they have a minimal variation. In this way, we do as little as possible the risk that what we extract from a sample is far removed from the true value of the parameter.
- The consistent estimators. They are those who, as the sample size grows, tend to have a zero variance. Therefore, with large samples, the estimate tends to deviate very little from the true value.
- In normal distribution, variance (its square root, the typical deviation) is one of the parameters. The bell of Gauss tends to be higher and narrow as the variance decreases.
- In regression models, we talk about homocedasticity when the variance of error is constant throughout their observations. For example, in a simple regression, we see a cloud of points in which the scattering of the points around the estimated straight or curve remains constant.
- Variance analysis (ANOVA) allows you to compare different groups and see the factors that influence them.
- Chebyshev's inequality allows us to grasp to what extent a random variable is likely to be separated from its mathematical hope in proportion to its typical deviation (square root of variance).
Conclusion
In the analysis of variances, the significant differences between two or more means of a sample are studied. This analysis is commonly known as ANOVA and it also allows us to determine if these means come from the same population (it can be the total number of employees of a company), or if the means of two populations are equal.
On the other hand, the variance as well as the standard deviation are very sensitive to outliers, these are the values that are very far from the average or that are very different from it.
So that these measures are not so affected, these outliers can be ignored when performing the analyzes and even the calculations. Other measures of dispersion that are more useful in these cases can also be used.
In the case of analyzing the risk of an investment, two important aspects are taken into account, one is the return invested and the other is the return expected according to the investment made. As already mentioned, variance can be used to analyze this risk.
Contenido relacionado
Li and Yorke's theorem
Dionysus the Meager
Bijective function