Expectation of a random variable

P(A or...).If I'm right, then the probability is 1/10000. I'm not sure how you would add the probabilities of T1 and T2, but I've tried to derive it without adding them.(iii) And then, if I understand the difference between PDF and CDF, I don't know how to derive the PDF of Ts.(iv) And for this I don't know how to integrate the PDF between 0 and infinity.In summary, To calculate the expectation of a random variable, you need to multiply the chance of each outcome with the value of each outcome and add everything up. This process is different for a discrete and a continuous random variable
  • #1
Maybe_Memorie
353
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
  • #2
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]
 
  • #3
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?
 
  • #4
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:
  • #5
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}
E[X] &=& \int_0^{\infty} \lambda e^{-\lambda x} \cdot x dx \\
&=& \left[ - e^{-\lambda x} \cdot x \right]_0^{\infty}
- \int_0^{\infty} - e^{-\lambda x} \cdot 1 dx \\
&=& (\lim_{x \to \infty} - e^{-\lambda x} \cdot x) - (- e^{-\lambda \cdot 0} \cdot 0)
- \int_0^{\infty} - e^{-\lambda x} \cdot 1 dx \\
&=& 0 - 0 - \int_0^{\infty} - e^{-\lambda x} \cdot 1 dx \\
&=& ... \\
&=& \frac 1 {\lambda}
\end{eqnarray}[/tex]
 
  • #6
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.
 
  • #7
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:)
 
  • #8
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) ?
 
  • #9
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]

Maybe_Memorie said:
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)

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?
 
  • #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:
 

1. What is the definition of expectation of a random variable?

The expectation of a random variable is the sum of the possible values of the variable multiplied by their respective probabilities. It represents the average value that we can expect to obtain from a random experiment or process.

2. How is expectation of a random variable calculated?

The expectation of a random variable is calculated by multiplying each possible value of the variable by its probability and then summing up all these products.

3. What is the significance of expectation of a random variable in statistics?

The expectation of a random variable is a fundamental concept in statistics as it helps in understanding the central tendency of a distribution and making predictions about the outcomes of random experiments. It is also used in various statistical models and methods.

4. Can the expectation of a random variable be negative?

Yes, the expectation of a random variable can be negative if the possible values of the variable have negative probabilities or if the distribution is skewed towards the left. However, in most cases, the expectation is a positive value.

5. How is the expectation of a random variable related to variance?

The expectation of a random variable and its variance are two important measures of a distribution. The variance is calculated by taking the squared difference between each value and the mean, while the expectation is the mean itself. These two measures are related in the sense that the variance indicates the spread of the distribution around the expectation.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
428
  • Precalculus Mathematics Homework Help
Replies
9
Views
2K
  • Precalculus Mathematics Homework Help
Replies
11
Views
1K
  • Math POTW for Graduate Students
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
455
  • Precalculus Mathematics Homework Help
Replies
7
Views
980
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
30
Views
2K
Back
Top