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

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 ?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top