Finding E[X^2] from a given random variable with distinct probability

Click For Summary

Homework Help Overview

The discussion revolves around finding the expected value of the square of a random variable, specifically E[X^2], and its relation to variance. The original poster presents a scenario involving a random variable Z with distinct probabilities for its values.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss different formulas for calculating E[X^2] and variance, questioning the correctness of the professor's formula versus the original poster's understanding. There is confusion regarding the application of probabilities in the context of random variables versus samples.

Discussion Status

The conversation is ongoing, with participants exploring the nuances between sample variance and the variance of a random variable. Some guidance has been offered regarding the correct approach to calculating E[X^2] and the importance of considering probabilities, but no consensus has been reached on the formulas being debated.

Contextual Notes

Participants are navigating the distinction between sample statistics and population parameters, which may affect their understanding of the formulas being discussed. There is also a mention of potential confusion stemming from the professor's explanation.

blah900
Messages
4
Reaction score
0

Homework Statement


Z is a random variable.
P(X=a) = p1
P(X=b) = p2
P(X=c) = p3
P(X=d) = p4

Find the variance.

Homework Equations


Var(X) = E(X2) - E(X)2

The Attempt at a Solution



Okay so for the E(X2), I am currently very confused.
My professor gave us this formula where
E(X^2) = \sum^{n}_{i=1}E(X_i^2) + \sum^{n}_{i{\neq}j}E(X_iX_j)

The way I know it would just be the first portion and thus would become:
a^2p_1+b^2p_2+c^2p_3+d^2p_4
However, doing it the professors way would become
a^2p_1+b^2p_2+c^2p_3+d^2p_4 + ab(2p_1p_2) + ac(2p_1p_3) + ad(2p_1p_4) + bc(2p_2p_3) + bd(2p_2p_4) + cd(2p_3p_4)

Which one is right? And when do I know when to use which case?
 
Last edited:
Physics news on Phys.org
My professor gave us this formula where
E(X^2) = \sum^{n}_{i=1}X_i^2 + \sum^{n}_{i{\neq}j}X_iX_j

Are you sure that you wrote that formula correctly?

I think two different concepts have been discussed. There is one kind of formula for the variance of a sample. We think of samples being created when a random variable takes on specific values and produces a set of data. When you compute the variance (or mean, or mode, or any other statistic) from sample values, you don't multiply the values by any probabilities. The number you compute for the sample variance is often used to estimate the variance of the random variable, but it is not always equal to it. It's just a matter of chance what specific numbers are in the data and what their variance is. To distinguish between the two types of variances, one is called a "sample variance" and the other can be called "the variance of the random variable" or "the population variance".

What you call "the professor's formula" looks like it computes something from a sample. I don't think the formula as you wrote it is correct.




The way I know it would just be the first portion and thus would become:
a^2p_1+b^2p_2+c^2p_3+d^2p_4

We are dealing with a random variable instead of a sample, so you are correct to multiply values times a probability. You correctly computed the expected value of X^2

To compute the variance you must also compute the second term in Var(X) = E(X^2) - E(X)^2 (which is a correct formula). The second term is the square of the expected value of X.



However, doing it the professors way would become
a^2p_1+b^2p_2+c^2p_3+d^2p_4 + ab(2p_1p_2) + ac(2p_1p_3) + ad(2p_1p_4) + bc(2p_2p_3) + bd(2p_2p_4) + cd(2p_3p_4)

It wouldn't be that way because what you called the professors way didn't say to multiply the probabilities times the X values.
 
Last edited:
Stephen Tashi said:
Are you sure that you wrote that formula correctly?

I think two different concepts have been discussed. There is one kind of formula for the variance of a sample. We think of samples being created when a random variable takes on specific values and produces a set of data. When you compute the variance (or mean, or mode, or any other statistic) from sample values, you don't multiply the values by any probabilities. The number you compute for the sample variance is often used to estimate the variance of the random variable, but it is not always equal to it. It's just a matter of chance what specific numbers are in the data and what their variance is. To distinguish between the two types of variances, one is called a "sample variance" and the other can be called "the variance of the random variable" or "the population variance".

What you call "the professor's formula" looks like it computes something from a sample. I don't think the formula as you wrote it is correct.






We are dealing with a random variable instead of a sample, so you are correct to multiply values times a probability. You correctly computed the expected value of X^2

To compute the variance you must also compute the second term in Var(X) = E(X^2) - E(X)^2 (which is a correct formula). The second term is the square of the expected value of X.





It wouldn't be that way because what you called the professors way didn't say to multiply the probabilities times the X values.

Oops my bad. It was supposed to be E of the following values. But, yeah, I guess the way I know would work right?
 
Yes it would work. How did you compute E(X)^2 ?
 

Similar threads

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