# Thread: [SOLVED] maths expectation for random variables (how to integrate?)

1. ## [SOLVED] maths expectation for random variables (how to integrate?)

for walpole qn 4.43,

μY = E(3X − 2) = 1/4 int 0-∞ (3x − 2)e−x/4 dx = 10

but what are the steps to get 10 ?

how shld i integrate (3x − 2)e−x/4 ?

2. Originally Posted by hazel
for walpole qn 4.43,

μY = E(3X − 2) = 1/4 int 0-∞ (3x − 2)e−x/4 dx = 10

but what are the steps to get 10 ?

how shld i integrate (3x − 2)e−x/4 ?
Use integration by parts. At this level, it's a technique you should already have met. Note that you will have to deal with an improper integral using limits (again, this is something you should have already met).

If you need more help, please show what you've done and state exactly where you're stuck in the calculation.

By the way, E(3X - 2) = 3 E(X) - 2 .... Perhaps calculating E(X) is slightly simpler for you to do.

3. μY = E(3X − 2)
= 1/4 int 0-∞ (3x − 2)e−x/4 dx
= 1/4 int 0-∞ (e^u) (-4 du) (3x-2)
= int 0-∞ (3x-2) (-e^u) du
= int 0-∞ -3x e^u du + 2 int 0-∞ e^u du
=int 0-∞ 12 u e^u du + 2 int 0-∞ e^u du
= 12[e^u + u.e^u] int 0-∞ + 2 [e^u] int 0-∞
= ??

note:
Let U = -1/4 x
-1/4 dx= du
dx=-4 du

4. I use this example all the time.
I want students to recognize that this is an exponential rv with mean 4
so (3)(4)-2=10.
I even put it on the finals two weeks ago.
This problem appears before the discussion of all the distributions.
BUT I still explain this is the best way to do it.
And I pass out tables of all the major densities and the means, variances, mgfs...
that I photocopied from wackerly's book.

5. Originally Posted by hazel
μY = E(3X − 2)
= 1/4 int 0-∞ (3x − 2)e−x/4 dx
= 1/4 int 0-∞ (e^u) (-4 du) (3x-2)
= int 0-∞ (3x-2) (-e^u) du
= int 0-∞ -3x e^u du + 2 int 0-∞ e^u du
=int 0-∞ 12 u e^u du + 2 int 0-∞ e^u du
= 12[e^u + u.e^u] int 0-∞ + 2 [e^u] int 0-∞
= ??

note:
Let U = -1/4 x
-1/4 dx= du
dx=-4 du
Have you been taught how to handle improper integrals using limits? I mentioned this in my first reply but you did not say.

The very first step for your chosen method of solution should have been:

$\displaystyle = \frac{1}{4} {\color{red}\lim_{\alpha \to +\infty}} \int_{0}^{\color{red}\alpha} (3x - 2) e^{-x/4} \, dx$.

Calculate the integral. Then take the limit.

Without a thorough grasp of the pre-requisite material (integration techniques, improper integrals, limits etc.) you are going to struggle. You are advised to thoroughly review this material.

6. Originally Posted by mr fantastic
Have you been taught how to handle improper integrals using limits? I mentioned this in my first reply but you did not say.

The very first step for your chosen method of solution should have been:

$\displaystyle = \frac{1}{4} {\color{red}\lim_{\alpha \to +\infty}} \int_{0}^{\color{red}\alpha} (3x - 2) e^{-x/4} \, dx$.

Calculate the integral. Then take the limit.

Without a thorough grasp of the pre-requisite material (integration techniques, improper integrals, limits etc.) you are going to struggle. You are advised to thoroughly review this material.

Your first step is the same as my first step - if you look at it more closely :
= 1/4 int 0-∞ (3x − 2)e−x/4 dx

it's just that i did not code it in the fancy maths format and type out in raw format accordingly.

7. Originally Posted by matheagle
I use this example all the time.
I want students to recognize that this is an exponential rv with mean 4
so (3)(4)-2=10.
I even put it on the finals two weeks ago.
This problem appears before the discussion of all the distributions.
BUT I still explain this is the best way to do it.
And I pass out tables of all the major densities and the means, variances, mgfs...
that I photocopied from wackerly's book.

I have 12 -2 = 10.
Do you have step by step workings on how should i get to (3)(4)-2?
i don't have wackerly's book. thks.

8. Originally Posted by hazel
Your first step is the same as my first step - if you look at it more closely :
= 1/4 int 0-∞ (3x − 2)e−x/4 dx

it's just that i did not code it in the fancy maths format and type out in raw format accordingly.
Excuse me?

I did look at your post closely. I don't see any limit sign or evidence that you understand that limits are to be used. Did you read the red type in my previous reply? Do you understand the importance of using limits? Go back and review the material on improper integrals.

9. you don't need wackerly's book at all.
you should know the mean of an exponential
the idea is....

$\displaystyle \int_{0}^{\infty} (3x - 2) {e^{-x/4}\over 4} \, dx$

$\displaystyle = 3 \int_{0}^{\infty} x {e^{-x/4}\over 4}\, dx-2 \int_{0}^{\infty} {e^{-x/4}\over 4}\, dx$

$\displaystyle = 3E(X)-2(1)=3(4)-2=10$

This is just E(3X-2)=3E(X)-2

You can perform parts on the first integral if you wish, but you really should know that value.
The second integral consists of just a density and that integrates to one.

10. Originally Posted by matheagle
[snip]
This is just E(3X-2)=3E(X)-2

[snip]
The funny thing is that I said this in post #2.

Originally Posted by matheagle
[snip]
You can perform parts on the first integral if you wish, but you really should know that value.
The second integral consists of just a density and that integrates to one.
And the funny thing is that one of these two things is what I then thought the OP would do.

But the OP was determined to do it his/her own way. And - apparently, because this has been completely ignored - the importance of using limits when dealing with an improper integral is not understood.

11. I was well aware that you wanted hazel
http://cdn1.ioffer.com/img/item/305/...o_hazel_1c.jpg
to not do this from scratch.