Expectation of a random variable

Click For Summary

Homework Help Overview

The discussion revolves around calculating the expectation of random variables, specifically focusing on discrete and continuous cases, such as Poisson and exponential distributions. Participants explore the formulas for expectation and variance, including the calculation of E[X^2].

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the differences in calculating expectations for discrete versus continuous random variables, mentioning summation and integration. Questions arise regarding the integration limits for the exponential distribution and the use of integration by parts. There is also exploration of the probability of independent events and the cumulative distribution function (CDF) related to the system's lifetime.

Discussion Status

The discussion is active, with participants providing insights and clarifications on various aspects of expectation and probability. Some guidance has been offered regarding the integration process and the relationship between the probability density function (PDF) and CDF. Multiple interpretations of the problem are being explored, particularly in relation to the system's components and their lifetimes.

Contextual Notes

Participants are navigating the complexities of probability theory, including assumptions about independence and the implications of overlapping events in probability calculations. There is an emphasis on understanding the foundational concepts before proceeding to derive further results.

Maybe_Memorie
Messages
346
Reaction score
0

Homework Statement



I'm wondering how I go about calculating the expectation of a random variable?
Is it a different process for a discrete and a continuous?

Can you show me an example? Say Poisson and expoential?

Also, in the formula
Var(X) = E[X^2] - (E[X])^2

how does one calculate E[X^2] ?

Thanks!
 
Physics news on Phys.org
Hi Maybe_Memorie! :smile:

To calculate an expectation you need to multiply the chance of each outcome with the value of each outcome and add everything up.

The difference between discrete and continuous is that the first uses a summation while the second uses an integral.

So:
[tex]E[X] = \sum P(x) \cdot x[/tex]
and
[tex]E[X^2] = \sum P(x) \cdot x^2[/tex]

So for a six sided dice you would get:
[tex]E[X] = \sum_{k=1}^6 P(k) \cdot k = \frac 1 6 \cdot 1 + \frac 1 6 \cdot 2 + \frac 1 6 \cdot 3 + \frac 1 6 \cdot 4 + \frac 1 6 \cdot 5 + \frac 1 6 \cdot 6 = 3 \frac 1 2[/tex]
 
I see you didn't respond.

Do you already know what you wanted to know?
Is perhaps the strange wiggly symbol (sigma) putting you off?
Or is there something else that you don't understand but don't want to ask about?
 
I think I understand.

Suppose I wanted the expectation of the exponential random variable.

f(x) = the probability density function.

A = lambda

E[X] = integral of xf(x) dx

E[X] = integral of (xAe^(-Ax)) dx between + and - infinity.

Do I have to use integration by parts? In none of my classes have I come across integration with infinity as a limit
 
Last edited:
Ah, there you are! :)

You certainly seem to understand.
Your boundaries are slightly off though.
The exponential distribution only has non-zero values for positive x, so the bottom boundary should be zero (and not - infinity).

And yes, you have to use integration by parts.
So you are already aware of that. Good.

As for infinity as a boundary, you have not come across it ... yet!
It means you have to integrate to an arbitrary boundary, and then take the limit of that boundary to infinity.

So in your case, you'll get:
[tex]\begin{eqnarray}<br /> E[X] &=& \int_0^{\infty} \lambda e^{-\lambda x} \cdot x dx \\<br /> &=& \left[ - e^{-\lambda x} \cdot x \right]_0^{\infty} <br /> - \int_0^{\infty} - e^{-\lambda x} \cdot 1 dx \\<br /> &=& (\lim_{x \to \infty} - e^{-\lambda x} \cdot x) - (- e^{-\lambda \cdot 0} \cdot 0) <br /> - \int_0^{\infty} - e^{-\lambda x} \cdot 1 dx \\<br /> &=& 0 - 0 - \int_0^{\infty} - e^{-\lambda x} \cdot 1 dx \\<br /> &=& ... \\<br /> &=& \frac 1 {\lambda}<br /> \end{eqnarray}[/tex]
 
Ah! Thank you very much!

I have another question. A related application.

The system S is composed of two components, C1 and C2, in parallel (S works provided at least 1 of the components works). The two components have lifetimes T1 and T2 and are exponentially distributed with the same parameter A=0.01

(i) What is the probability that T1 is greater than 100?
P(x>100) = 1 - e^(-100(0.01))

(ii) What is the probability that Ts, the lifetime of the system, is greater than 100?
Do I just add the probabilities that T1 and T2 are greater than 100?

(iii) What is the probability density function of Ts?
I'm lost here

(iv) Derive the expectation of Ts.
When I find the PDF, multiply by x and integrate between 0 and infinity with respect to x.
 
Maybe_Memorie said:
Ah! Thank you very much!

You're welcome! :smile:


Maybe_Memorie said:
I have another question. A related application.

The system S is composed of two components, C1 and C2, in parallel (S works provided at least 1 of the components works). The two components have lifetimes T1 and T2 and are exponentially distributed with the same parameter A=0.01

(i) What is the probability that T1 is greater than 100?
P(x>100) = 1 - e^(-100(0.01))

You have calculated P(x<100)...


Maybe_Memorie said:
(ii) What is the probability that Ts, the lifetime of the system, is greater than 100?
Do I just add the probabilities that T1 and T2 are greater than 100?

Do you know the rule about the probability of independent events occurring simultaneously?
That is P(A and B) where events A and B are independent?


Maybe_Memorie said:
(iii) What is the probability density function of Ts?
I'm lost here

For that you first need to answer (ii), which would show what the cumulative probability function of Ts is.


Maybe_Memorie said:
(iv) Derive the expectation of Ts.
When I find the PDF, multiply by x and integrate between 0 and infinity with respect to x.

Yep! :)
(But perhaps it will turn out to be easier. :wink:)
 
I like Serena said:
You're welcome! :smile:


Do you know the rule about the probability of independent events occurring simultaneously?
That is P(A and B) where events A and B are independent?

Isn't it P(A and B) = P(A).P(B) ?
 
Maybe_Memorie said:
Isn't it P(A and B) = P(A).P(B) ?

Yes! So you should not add up the probabilities for T1 and T2, but multiply them! :smile:
 
  • #10
Thanks!

I still need to find the PDF.

Is it the same as multiplying the PDF of T1 and T2?
 
  • #11
Maybe_Memorie said:
Thanks!

I still need to find the PDF.

Is it the same as multiplying the PDF of T1 and T2?

No, to find the PDF you need to find the CDF first, and deduce from that the PDF.

Actually, the PDF is the derivative of the CDF.

For reference did you properly solve (i) and (ii)?
Because you need them, and you'd be making it easier for me if I know that you got those and understood those.
 
  • #12
I like Serena said:
No, to find the PDF you need to find the CDF first, and deduce from that the PDF.

Actually, the PDF is the derivative of the CDF.

For reference did you properly solve (i) and (ii)?
Because you need them, and you'd be making it easier for me if I know that you got those and understood those.

For (i), the probability is 1/e, whatever that works out at...

For (ii), I'm slightly confused. The system doesn't need T1 and T2 to be greater than 100 for Ts to be > 100. It needs only one of them to be greater than 100.
So I'm not sure why I'm using P(A and B)
 
  • #13
Maybe_Memorie said:
For (i), the probability is 1/e, whatever that works out at...

Good! :smile:
And more in general: [itex]P(X > x) = e^{-\lambda x}[/tex]<br /> <br /> <blockquote data-attributes="" data-quote="Maybe_Memorie" data-source="post: 3387066" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch"> <div class="bbCodeBlock-title"> Maybe_Memorie said: </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent js-expandContent "> For (ii), I'm slightly confused. The system doesn't need T1 and T2 to be greater than 100 for Ts to be > 100. It needs only one of them to be greater than 100.<br /> So I'm not sure why I'm using P(A and B) </div> </div> </blockquote><br /> Yes, only one needs to be greater than 100.<br /> But this means there are 3 cases that overlap: either T1 can be greater than 100, or T2 can be greater than 100, or both can be greater than 100.<br /> I guess I was a little sloppy with this before.<br /> <br /> A little sharper is, that they cannot both be less than 100.<br /> <br /> Do you know how to calculate the corresponding probability?[/itex]
 
  • #14
I like Serena said:
Yes, only one needs to be greater than 100.
But this means there are 3 cases that overlap: either T1 can be greater than 100, or T2 can be greater than 100, or both can be greater than 100.
I guess I was a little sloppy with this before.

A little sharper is, that they cannot both be less than 100.

Do you know how to calculate the corresponding probability?

Is it P(A) + P(B) + P(A and B)
where A = T1 > 100
B = T2 > 100
 
  • #15
Maybe_Memorie said:
Is it P(A) + P(B) + P(A and B)
where A = T1 > 100
B = T2 > 100

Almost. ;)
The proper formula is (sum rule): P(A or B) = P(A) + P(B) - P(A and B)
 
  • #16
I like Serena said:
Almost. ;)
The proper formula is (sum rule): P(A or B) = P(A) + P(B) - P(A and B)

So the probability is (2e-1)/e^2

Is this correct?

How does this relate to the cdf?
 
  • #17
Maybe_Memorie said:
So the probability is (2e-1)/e^2

Is this correct?

How does this relate to the cdf?

Yes, this is correct.
You just found the probability for Ts to be greater than 100.

Can you generalize for Ts greater than some x?

And then the cdf(x) for Ts is the probability that Ts is less than x.
Can you calculate that?
 
  • #18
I like Serena said:
Yes, this is correct.
You just found the probability for Ts to be greater than 100.

Can you generalize for Ts greater than some x?

And then the cdf(x) for Ts is the probability that Ts is less than x.
Can you calculate that?

P(Ts>x) = 2e^(-Ax) - e^(-2Ax)

so CDF = 1 - 2e^(-Ax) + e^(-2Ax)

PDF = -2Ae^(-2Ax) + 2Ae^(-Ax)

E[X] = 3/2A


Is this correct?
 
  • #19
I believe so! :smile:

Did you really have to do this for high school?
It seems to be a bit out of its scope.
 
  • #20
I like Serena said:
I believe so! :smile:

Did you really have to do this for high school?
It seems to be a bit out of its scope.

Thank you so much! :smile:

I'm not in high school, I'm in university in Ireland.
Due to various personal reasons I was unable to attend lectures, failed the statistics exam and now have to sit another stats exam in August to be allowed to progress to second year. so I'm going through all the exam papers and coming here with the ones I'm having difficulty with.
 
  • #21
Maybe_Memorie said:
Thank you so much! :smile:

I'm not in high school, I'm in university in Ireland.
Due to various personal reasons I was unable to attend lectures, failed the statistics exam and now have to sit another stats exam in August to be allowed to progress to second year. so I'm going through all the exam papers and coming here with the ones I'm having difficulty with.

Glad to be of help! :)

And I see your profile on PF is outdated then. :wink:
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K