Why Does Variance Equal E[x^2] - (E[x])^2?

  • Context: Undergrad 
  • Thread starter Thread starter vptran84
  • Start date Start date
Click For Summary

Discussion Overview

The discussion centers on the derivation of the formula for variance, specifically why Var(X) equals E[X^2] - (E[X])^2. Participants explore the mathematical properties and definitions related to variance and expected value.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Conceptual clarification

Main Points Raised

  • One participant requests clarification on the formula for variance, expressing confusion about its derivation.
  • Another participant states the definition of variance as Var(X) = E[(X - E[X])^2].
  • Several participants discuss the expansion of the variance formula, noting the relationship between E[X^2] and (E[X])^2.
  • There is a discussion about the properties of expectation values and integrals, with references to probability density functions.
  • Participants clarify the distinction between distribution functions and density functions, with some expressing uncertainty about terminology.
  • A later reply attempts to provide a step-by-step derivation of the variance formula, but it is met with further questions about the definitions used.

Areas of Agreement / Disagreement

Participants generally agree on the definition of variance and its mathematical properties, but there is no consensus on the terminology used for distribution and density functions, leading to some confusion.

Contextual Notes

Some participants express uncertainty about the definitions of distribution functions versus density functions, and there are unresolved questions regarding the notation and terminology used in their course materials.

Who May Find This Useful

This discussion may be useful for students learning about variance and expected values in probability and statistics, as well as those interested in the mathematical foundations of these concepts.

vptran84
Messages
46
Reaction score
0
Hi,

Can someone please please show me why Var(x) = E[ x^2] - (E[X])^2.

I just don't get it. THanks in advance. :smile:
 
Physics news on Phys.org
Var(X)=E([X-E(X)]^2)
 
yeah i got that part, similar to distributive property, but where does variance come from? Like how did they get E[x^2]-(E[X])^2 ? How did they get E[x^2] and (E[X])^2 ??
 
vptran84 said:
yeah i got that part, similar to distributive property, but where does variance come from? Like how did they get E[x^2]-(E[X])^2 ? How did they get E[x^2] and (E[X])^2 ??

[tex](x-<x>)^2=x^2-2x<x>+<x>^2[/tex]

[tex]\sigma^2=<(x-<x>)^2>=<x^2-2x<x>+<x>^2>=<x^2>-2<x><x>+<x>^2[/tex]

[tex]\sigma^2=<x^2>-<x>^2[/tex]

This just follows from the properties of expectation values, which follow from the properties of integrals:

[tex]<x>=\frac{\int xf(x)dx}{\int f(x)dx}=\int xP(x)dx[/tex]
 
SpaceTiger said:
[tex]<x>=\frac{\int xf(x)dx}{\int f(x)dx}=\int xP(x)dx[/tex]
So <x> = E(x). The denominator there, [tex]\int f(x)dx[/tex], always equals 1 because f is a probability density function. The definition of an expected value is just the numerator of that fraction.
 
BicycleTree said:
So <x> = E(x). The denominator there, [tex]\int f(x)dx[/tex], always equals 1 because f is a probability density function. The definition of an expected value is just the numerator of that fraction.

I'm not defining f(x) to be the probability density, just some distribution function. P(x) is the probability density. Sorry for not making that clear. But yes, <x>=E(x).
 
So then what is <x>? Are you just defining it here or does it mean something else?

What's the difference between a distribution function and a density function? In my course they were used synonymously, except a distribution function could also be a probability mass function.
 
BicycleTree said:
So then what is <x>?

You were right, it's the expectation value.


What's the difference between a distribution function and a density function?

I suppose I was using the wrong terminology. What my advisors sometimes call simply a "distribution function" is sometimes actually a "frequency distribution". This is what I meant by f(x). The idea is that the integral over its domain is not equal to one, but is instead equal to the number of objects in the sample (for example). The "distribution function" is actually something entirely different; that is, the cumulative probability of the value being less than x. Check Mathworld for the definitions of these things if you want more precision. If you don't want to bother (I wouldn't blame you), then disregard the middle part of my last equation (with f(x)) and just consider the part with P(x), the probability density.
 
Yes, I know what a distribution function is.

It's just a different notation. In the course I took, P(...) means the probability of the stuff in the parentheses (which would be a logical formula). So you might say P(X=x). Also, distribution functions were denoted by capital letters and density/mass functions were denoted by the corresponding lowercase letters, so even if P didn't mean "the probability of," it would be a distribution function, not a density function.
 
  • #10
Answer

vptran84 said:
Hi,

Can someone please please show me why Var(x) = E[ x^2] - (E[X])^2.

I just don't get it. THanks in advance. :smile:


For a random variable X, the variance is defined as: Var(X) = E[(X-E[X])^2].
Thus, Var(X) = E[(X^2 - 2XE[X] - (E[X])^2]. Remember that the expected value of a constant, say a, is this constant: E(a) = a, where a is a constant. And also that: E[ E[X] ] = E[X].
Then, we have that:
Var(X) = E[X^2] - E[2XE[X]] - E[(E[X])^2] = E[X^2] - 2E[X]E[X] - (E[X])^2
Var(X) = E[X^2] - 2(E[X])^2 - (E[X])^2 = E[X^2] - (E[X])^2

Var(X) = E[X^2] - (E[X])^2, which is what you are trying to prove.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
803
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K