# Probability function of two random variables, another non-convergent integral

## Homework Statement

The joint probability density function of the random variable (X, Y) is given by:

$$f(x,y) = \frac{2x}{y^2} \text{where} \; 0 \leq x\leq 1 \; \text{and} \; y\geq 1$$
and 0 elsewhere.

Find the probability density function of the folowing random variable:

U=X+Y

## Homework Equations

I'm not sure of this equation, (have I mentioned my book should be burned?) but I think ultimately I'm looking for
$$\int_{-\infty }^{\infty } f(u-v,v) \mathrm{d} v$$

## The Attempt at a Solution

$$U=X+Y$$
$$x= u-v$$
$$y=v$$

the jacobian of the transformation is 1, so we can leave out further mention of it in equations.

My integral is $$\int_a^b \frac{2u-v}{v^2} \mathrm{d} v$$
I'm not sure about the bounds. Since v=y, should the bounds on v equal the bounds on y? That is, from 1 to infinity?

I already tried that and got a non-convergent integral (the sad story of my day today) :(
$$\int_1^{\infty } \frac{2u-v}{v^2} \mathrm{d} v =$$
$$\int_1^{\infty } \frac{2u}{v^2} \mathrm{d} v - \int_1^{\infty } \frac{1}{v} \mathrm{d} v =$$
$$2u \int_1^{\infty } v^{-2} \mathrm{d} v - \int_1^{\infty } \frac{1}{v} \mathrm{d} v =$$
$$-2u(\frac{1}{v} |_1^\infty ) - \mathrm{ln} v |_1^{\infty }$$
And since $\mathrm{ln} (\infty ) = \infty$, part of my problem says $0-\infty$ Which is not good...

Last edited:

vela
Staff Emeritus
Homework Helper
Two ways to solve the problem:

1. Find FZ[z] = P(Z ≤ z) and then fZ(z) = FZ'(z).
2. Find f(z,v) and integrate out v to find the marginal probability density fZ(z).

For either case, I suggest you sketch the domain of f(x,y) in the xy-plane as well as the line x+y=c.

I changed Z to U because I just noticed my formulas use the letter U. I don't think that changed anything other than improving my weak grasp on the problem.

I don't really understand your first suggestion, Vela.

As for the second suggestion, I think that's what I'm already doing, isn't it? Maybe I don't understand though. I'm really shaky on this change of variable thing.

As for the sketch, I sketched the domain of f(x,y) and shaded in a region above y=1 and between x=0 and x=1. As for x+y= c, I didn't know how to graph that since I don't know what c is.

I like Serena
Homework Helper
Your integral should be written as:
$$\int\limits_{\stackrel{0 \le u-v \le 1}{v \ge 1}} \frac{2(u-v)}{v^2} \mathrm{d} v$$
This is due to the the definition of f(x,y) where it is non-zero.
Where that is exactly depends on the value of u.

This not so easy, and you'll have to divide it into different cases.
For this you need to draw your domain with v and (u-v) on the axes (hence vela's suggestion to replace u-v by z).

First you should consider the case that u=1 and u=2, and after that the 3 cases that u is less, in between, or more.

vela
Staff Emeritus
Homework Helper
I don't really understand your first suggestion, Vela.

As for the second suggestion, I think that's what I'm already doing, isn't it? Maybe I don't understand though. I'm really shaky on this change of variable thing.
I was just noting two different ways you can solve the problem. The first method is bit easier to grasp intuitively, at least to me. As you noted, you're taking the second approach. Either way, it should work out.
As for the sketch, I sketched the domain of f(x,y) and shaded in a region above y=1 and between x=0 and x=1. As for x+y= c, I didn't know how to graph that since I don't know what c is.
The c is a constant. When you integrate f(x,y) along the line x+y=c — or equivalently, the line u=c in the uv-plane, you're calculating the probability that U=c.

As ILS noted, you're going to have to consider different cases depending on the value of U to figure out what limits you should be integrating over.

Why isn't it as simple as: since v=y, and y is greater than or equal to 1, v is greater than or equal to 1?

I like Serena
Homework Helper
Why isn't it as simple as: since v=y, and y is greater than or equal to 1, v is greater than or equal to 1?

But it is!

So you get:
$$\def\d{\textrm{ d}} \int_{-\infty}^\infty f(u-v,v) \d v = \int_{1}^\infty f(u-v,v) \d v$$

It's only that the next step is something like:
$$\int_{1}^\infty f(u-v,v) \d v = \int_{1}^\infty {2(u-v) \over v^2} \cdot (1 \textrm{ if }(0 \le u-v \le 1), 0 \textrm{ otherwise}) \d v$$

but u is defined as x+v, and x=u-v, so, I can't nail down u. it's slippery like soap!

I don't even know what I'm supposed to do :(

I like Serena
Homework Helper
Consider 3 cases: u<1, 1<u<2, u>2.

What is the range of (u-v) if v>1?

0 to -infinity

I like Serena
Homework Helper
0 to -infinity

So....?

What does that tell you about fU(u) if u<1?

What's f sub u of u?

I like Serena
Homework Helper
What's f sub u of u?

I had to think of something, since you didn't make something up yourself.
It's based on this sentence in your problem:
ArcanaNoir's problem said:
Find the probability density function of the folowing random variable:

U=X+Y

Maybe that's what the book is calling h(u). h(u) is found by the integral I'm trying to solve. I still don't see how the bounds of u come into play since the integral is in terms of v and i can't solve it.

I like Serena
Homework Helper
Maybe that's what the book is calling h(u). h(u) is found by the integral I'm trying to solve. I still don't see how the bounds of u come into play since the integral is in terms of v and i can't solve it.

f(u-v,v)=0 if (u-v) and v are not both in the proper ranges as defined for f(x,y).

For u<1, (u-v) is not in range, so f(u-v,v)=0, therefore h(u)=0.

I like Serena
Homework Helper
$$\def\d{\textrm{ d}} h(u)= \int_{1}^\infty f(u-v,v) \d v$$

Perhaps you should do a substitution with x=u-v (with respect to integration of v).

Okay, but for larger values of v, u-v isn't in range for u between 1 and 2, and for any fixed u greater than 2, there are v's for which it isn't in range again. So, I dont get it still.

$$\def\d{\textrm{ d}} h(u)= \int_{1}^\infty f(u-v,v) \d v$$

Perhaps you should do a substitution with x=u-v (with respect to integration of v).

I don't know what you mean. This might be one of those times when you take pity on me and give me more info than usual, since I'm jus too lost to see what you're pointing to.

I like Serena
Homework Helper
Okay. I'll give you the next step.

We have:
$$\def\d{\textrm{ d}} h(u)= \int_{1}^\infty f(u-v,v) \d v$$

Substituting x=u-v, we get:
$$h(u) = \int_{-\infty}^{u-1} f(x, u-x) \d x$$

Now we have 3 cases: u-1<0, 0<u-1<1, u-1>1.
Note that the y-parameter of f, which is (u-x) is always greater than 1.

Case 1: u-1<0 (or u<1)

This means that within the bounds of the integral x<0 and so f(x,u-x)=0, so the integral is zero too.

So h(u)=0 if u<1.

Case 2: 0<u-1<1 (or 1<u<2)

This means that within the bounds of the integral for x such that 0<x<u-1, we have f(x,u-x)=2x/(u-x)^2, so the integral is:
$$h(u) = \int_{0}^{u-1} f(x, u-x) \d x = \int_{0}^{u-1} {2x \over (u-x)^2} \d x$$

I leave it to you to evaluate this.

Case 3: u-1>1 (or u>2)

This means that within the bounds of the integral for x such that 0<x<1, we have f(x,u-x)=2x/(u-x)^2, so the integral is:
$$h(u) = \int_{0}^{1} f(x, u-x) \d x = \int_{0}^{1} {2x \over (u-x)^2} \d x$$

Again I leave it to you to evaluate this.

vela
Staff Emeritus
Homework Helper
You noted in your original post that
\begin{align*}
x &= u-v \\
y &= v.
\end{align*}The region in which f(x,y)≠0 is between the lines x=0 and x=1 and above the line y=1. Those lines correspond to u-v=0, u-v=1, and v=1 in the uv-plane. The attached plot shows those three lines in the uv-plane (u is the horizontal axis and v is the vertical axis). Can you see from it what the cases you need to consider and the corresponding limits for v for each case?

#### Attachments

• plot.png
4.6 KB · Views: 352
I like Serena
Homework Helper
Let's try this with a simpler example.

Suppose we have:
$$g(x)=\left\{ \begin{array}{ll} 1, & \textrm{ if 0 \le x \le 1,} \\ 0, & \textrm{ otherwise}\end{array} \right.$$

What is:
$$G(x)= \int_{-\infty}^x g(x) \textrm{ d}x$$

G(x)= 0 if x<0, x if 0<x<1, and 1 if x>1. Assume the appropriate "less than/equal" signs. Wish I had a button for that..

I like Serena
Homework Helper
G(x)= 0 if x<0, x if 0<x<1, and 1 if x>1. Assume the appropriate "less than/equal" signs. Wish I had a button for that..

Good!

But how did you find this result?
Can you write it a bit more formal?
That may help for the more complex cases.
(Unless it's already clear how to do that.)

Btw, it doesn't matter one bit if you write "less than" or "less or equal".
All calculations with probability distributions will come out exactly the same either way.
It's just neat if all values are nicely covered, but not necessary.

I like Serena
Homework Helper
Oh, and if you look to the right of your reply box, you should see a number of quick buttons, with ≤ and ≥ (only in advanced view and not in GD).
You wish, and I fulfill your wish!
(Or rather Greg did recently.)