Problem with unknown functions in integrals

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 2K views
pat804
Messages
2
Reaction score
0

Homework Statement


I often have a problem dealing with unknown functions in derivations. Recently I was looking at variance of pdf's and tried to do the integral below with no success. Could someone suggest a method, or point out where I am going wrong.


Homework Equations


Show ∫(x - μ)2 f(x) dx = ∫x2 f(x) dx - μ2

The Attempt at a Solution


∫x2 f(x) dx -2μ∫x f(x) dx + μ2 ∫f(x) dx

then i try to solve by parts,
x2F(x) - 2∫xF(x)dx - 2μ(xF(x) - ∫F(x)dx) + μ2F(x)
where F(x) = ∫f(x)dx

this doesn't really get me anywhere, does anyone have any suggestions??
 
Physics news on Phys.org
pat804 said:

Homework Statement


I often have a problem dealing with unknown functions in derivations. Recently I was looking at variance of pdf's and tried to do the integral below with no success. Could someone suggest a method, or point out where I am going wrong.


Homework Equations


Show ∫(x - μ)2 f(x) dx = ∫x2 f(x) dx - μ2

The Attempt at a Solution


∫x2 f(x) dx -2μ∫x f(x) dx + μ2 ∫f(x) dx

then i try to solve by parts,
x2F(x) - 2∫xF(x)dx - 2μ(xF(x) - ∫F(x)dx) + μ2F(x)
where F(x) = ∫f(x)dx

this doesn't really get me anywhere, does anyone have any suggestions??

The result is fasle as written, but it can be made true if written properly (and is then an elementary property developed in Probability 101). I assume that μ is the mean of the distribution f(x)---is that right?

You need to specify limits on all the integrations. If f(x) is the pdf of a random variable on the whole line, the limits are -∞ to +∞. If the random variable is non-negative the limits are 0 and +∞, etc. In any case, for a random variable on ##(a,b)## just substitute in the known values of ##\int_a^b f(x) \, dx## and ##\int_a^b x f(x) \, dx##.
 
Ray Vickson said:
The result is fasle as written, but it can be made true if written properly (and is then an elementary property developed in Probability 101). I assume that μ is the mean of the distribution f(x)---is that right?

You need to specify limits on all the integrations. If f(x) is the pdf of a random variable on the whole line, the limits are -∞ to +∞. If the random variable is non-negative the limits are 0 and +∞, etc. In any case, for a random variable on ##(a,b)## just substitute in the known values of ##\int_a^b f(x) \, dx## and ##\int_a^b x f(x) \, dx##.

thanks, yes you're correct μ is the mean. So for definite integrals you just sub in μ=∫xf(x)dx and ∫f(x)=1.
 
pat804 said:
thanks, yes you're correct μ is the mean. So for definite integrals you just sub in μ=∫xf(x)dx and ∫f(x)=1.

Yes, exactly!

For the record: the result is true in general for any random variable X having finite variance---whether X is continuous, discrete or mixed. The discrete case involves sums instead of integrals, and the mixed case involves both (or Stieltjes' integrals instead of Riemann integrals). The general result is that
[tex]\text{Var} X \equiv E(X - EX)^2 = E(X^2) - (EX)^2[/tex]
 
Last edited:
Note that
[tex]\int (x- \mu)^2f(x)dx= \int (x^2- 2\mu x+ \mu^2)f(x) dx= \int x^2f(x)dx- 2\mu\int xf(x)dx+ \mu^2\int f(x)dx[/tex]

Now use the fact that, as you say, [itex]\int f(x)dx= 1[/itex] and [itex]\int xf(x)dx= \mu[/itex].