Solveeit Logo

Question

Question: What is the formula for the variance of a probability distribution?...

What is the formula for the variance of a probability distribution?

Explanation

Solution

We know the variance of a random variable X is the mean or expected value of the squared deviation from the mean of X. Using this definition, we can arrive at a simpler formula for variance, both for continuous and discrete random variables.

Complete step-by-step answer:
We know that the variance measures how far a set of numbers is spread out, from their average value. Also, we are aware that variance is the square of standard deviation. The variance of a random variable X is represented by σ2,s2{{\sigma }^{2}},{{s}^{2}} or Var(X).
Using the definition of variance, for a random variable X, we can write the variance as
Var(X)=E[(XE[X])2]Var\left( X \right)=E\left[ {{\left( X-E\left[ X \right] \right)}^{2}} \right]
where, E(X) represents the expected value or mean for the random variable X.
We can expand the above equation as
Var(X)=E[X22XE[X]+E[X]2]Var\left( X \right)=E\left[ {{X}^{2}}-2X\cdot E\left[ X \right]+E{{\left[ X \right]}^{2}} \right]
Hence, we can write
Var(X)=E[X2]2E[X]E[X]+E[X]2Var\left( X \right)=E\left[ {{X}^{2}} \right]-2E\left[ X \right]\cdot E\left[ X \right]+E{{\left[ X \right]}^{2}}
Thus, we can simplify this to get
Var(X)=E[X2]E[X]2...(i)Var\left( X \right)=E\left[ {{X}^{2}} \right]-E{{\left[ X \right]}^{2}}...\left( i \right)
Hence, we can also say that the variance of X is equal to the difference of the mean of the square of X and the square of the mean of X.
We know that for a continuous random variable X, the total probability is
P(aXb)=abf(x)dx=1P\left( a\le X\le b \right)=\int\limits_{a}^{b}{f\left( x \right)dx=1}.
Also, we can write the expected value as,
E(X)=abxf(x)dxE\left( X \right)=\int\limits_{a}^{b}{xf\left( x \right)dx}.
Hence, we can write the variance using equation (i) as
Var\left( X \right)=\int\limits_{a}^{b}{{{x}^{2}}f\left( x \right)dx}-{{\left\\{ \int\limits_{a}^{b}{xf\left( x \right)dx} \right\\}}^{2}}.
Similarly, for a discrete random variable X, we have the total probability as,
i=1nP(xi)=1\sum\limits_{i=1}^{n}{P\left( {{x}_{i}} \right)}=1.
Also, we can write the expectation of X as,
E(X)=i=1nxiP(xi)E\left( X \right)=\sum\limits_{i=1}^{n}{{{x}_{i}}P\left( {{x}_{i}} \right)}.
Thus, we can write the variance using equation (i) as
Var\left( X \right)=\sum\limits_{i=1}^{n}{{{x}_{i}}^{2}P\left( {{x}_{i}} \right)}-{{\left\\{ \sum\limits_{i=1}^{n}{{{x}_{i}}P\left( {{x}_{i}} \right)} \right\\}}^{2}}.

Note: We must take care that in the above explanation, we have assumed that the probability distribution of continuous random variable to be defined from a to b, and the discrete random variable is assumed to have n different possibilities.