# Statistics proof regarding integration of cdf

1. Oct 14, 2012

### phiiota

1. The problem statement, all variables and given/known data
For any cdf F(x) of a continuous random variable, show that

$$\int_{-\infty}^{\infty}[F(x+b)-F(x+a)]dx=b-a$$

for any a<b.

2. Relevant equations

3. The attempt at a solution
Not really sure where to begin. I figure I can split the integrals and do u subs, and (after some magic I don't understand) I'll end up with something along the lines of R+b-(R+a)=b-a, but I have no idea what to do with these cdfs (i mean, I have no idea what R would be, or even if that's right at all). I've looked all over the internet, and the only thing I could find that talked about integrating a cdf was that E(x) = int (1-F(x)) when f(x) was non negative, but I don't seem to have that situation here.

Anyway, a push in the right direction would be most appreciated.

2. Oct 14, 2012

### Ray Vickson

It is probably a bit easier to re-write the problem: let y = x+a. Then you need to show that
$$\int_{-\infty}^{\infty} [F(y+c) - F(y)] \, dy = c,$$
where c = b-a. It is important to remember that the improper integral is defined as
$$\int_{-\infty}^{\infty} [F(y+c) - F(y)] \, dy = \lim_{M,N \rightarrow \infty} \int_{-M}^{N} [F(y+c)-F(y)] \, dy.$$

RGV

3. Oct 15, 2012

### phiiota

Thank you for your reply. I'm still a bit lost. Is that integral a special form I should recognize? I'm still don't understand how I can say anything about what that equals without knowing what F(x) is. All I know is that it's non-negative and bounded by 0,1.

It took me a little while to exactly figure out what this looks like, and I've done a few graphs to show what the curve of F(y+c)-F(y) looks like for a sample CDF, but, like I said, I'm still lost in the general case.

4. Oct 15, 2012

### Ray Vickson

Look at WHY we need to use the limiting definition of the integral. If we did not do that we would not be allowed to write
$$\int_{-\infty}^{\infty}[F(x+c) - F(x)] dx$$
as
$$\int_{-\infty}^{\infty} F(x+c)\,dx - \int_{-\infty}^{\infty} F(x) \, dx,$$
because that would be a difference of two divergent integrals and so would = ∞-∞. That does not occur when we start with the finite M,N form.

RGV

5. Oct 15, 2012

### Mute

$$F(x) = \int_{-\infty}^x dt f(t),$$

where f(t) is the probability density function.

Now, my recommendation would be to forget about the overall integral over x for a moment, and instead focus on

$$F(x+c) - F(x).$$

Given that you can express each of these terms as an integral over the probability density, can you see how you might be able to combine these two terms into a single term? (This will also have the benefit that you will not have to treat the overall x integral as having finite integration limits which are taken to infinity at the end of the calculation, as Ray suggests).

See how far you can get with this hint, and if you can't get it we'll give you another push in the right direction.

6. Oct 15, 2012

### Ray Vickson

Your suggestion is a good one, but the result is true in general, even if F does not have a density: it just has to have the standard properties of a cdf on ℝ. However, a density gives the OP some place to start.

RGV

7. Oct 15, 2012

### phiiota

So I get that I can rewrite F(x+c)-F(x) as ∫xx+cf(x)dx....

is it alright for me to change the order of integration? Because then i would have
$$\intop_{-\infty}^{\infty}\int_{y}^{y+c}f(t)dtdx=\int_{y}^{y+c}\int_{-\infty}^{\infty}f(t)dtdx=\int_{y}^{y+c}1\cdot dx=(y+c)-y=c$$

But I'm not sure if I'm justified in doing this.

8. Oct 16, 2012

### Mute

Fubini's theorem tells you the conditions under which it is valid to exchange the order of integrals.

Note that, as Ray says, you can do the calculation without using the density function and instead manipulate the integrals using finite integration limits that you take to infinity at the end of the calculation.

9. Oct 17, 2012

### phiiota

I'm guessing off your last reply that I'm not in fact allowed to do what I did, and I think I see the reason why: I switched the limits, but not the variables; so I first should have integrated f(t)dx as xf(t), which, evaluated from the proper limits should go to infinity minus negative infinity times f(t), which is nonsense. Is this correct?

However, going over what Ray wrote, I'm starting to see what he was getting at. There's a point where F(x+c)=F(x) (or at least converging, which is what I'm guessing he meant when he talked about taking the limits), two points actually, so I'm bound not only with F(x) being between 0 and 1, but with x being between some two finite points. So I can more or less restrict myself to considering those points.

There's a proof I haven't done yet, which says that F(x) has a uniform distribution(0,1), so when I integrate that, I get just x. When I take the difference then, between the curves F(x) and F(x+c), I get a parallelogram with base c and height 1, thus giving me the area I'm looking for. I'm still a bit unclear on how to get this exactly, or if this is alright (I haven't proven the thing I'm quoting yet), but this problem is starting to make more sense, now that I can visualize it more.

10. Oct 17, 2012

### uart

Take a good look at what Ray wrote in reply #4, it's a really good way to do the proof. You can make a substitution like $u = x+c$ for the first integral, but it's important to also write the integral bounds using limits, eg $\lim T \rightarrow \infty$, $\int_{-T}^{T} \ldots dx$, so that you can adjust the bounds on the integral to reflect the new variable. (eg $\int_{-T+c}^{T+c} \ldots du$).

Last edited: Oct 17, 2012
11. Oct 17, 2012

### Mute

No, you are just switching the order of the integrals, $\int_{-\infty}^{\infty}dt \int_{y}^{y+c} dx \rightarrow \int_{y}^{y+c} dx \int_{-\infty}^{\infty}dt$. Your calculation was correct; the link to Fubini's theorem was to give you a way to show that switching the order of integration was valid in this case. (There are cases for which it is not).

See uart's suggestion for help solving the problem following Ray's suggestion.