Question
Question: What is the formula for the variance of a probability distribution?...
What is the formula for the variance of a probability distribution?
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 or Var(X).
Using the definition of variance, for a random variable X, we can write the variance as
Var(X)=E[(X−E[X])2]
where, E(X) represents the expected value or mean for the random variable X.
We can expand the above equation as
Var(X)=E[X2−2X⋅E[X]+E[X]2]
Hence, we can write
Var(X)=E[X2]−2E[X]⋅E[X]+E[X]2
Thus, we can simplify this to get
Var(X)=E[X2]−E[X]2...(i)
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(a≤X≤b)=a∫bf(x)dx=1.
Also, we can write the expected value as,
E(X)=a∫bxf(x)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=1∑nP(xi)=1.
Also, we can write the expectation of X as,
E(X)=i=1∑nxiP(xi).
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.