# Calculate the Expected value, Variance, density and 2nd moment

#### alfred

##### New member
I have to solve this exercise. Here are also my solutions but I don't know if they're correct.

Let Ω ⊆ R ^ 2 a finite set of points in R ^ 2. Notation v_i = (x_i, y_i). Pr [] is a probability measure on either Ω.
Random variables X, Y: Ω-> R project a point on the coordinate. For example Y(v_i) = y_i, X (v_i) = x_i.
a) Let n=4 for v_1=(-1,2), v_2 = (3,2), v_3 = (-1, -2), V_4 = (1, -5)and Pr [v_1] = 1 / 3 Pr [v_2] = 1/6, Pr [v_3] = 3/8 and Pr [V_4] = 1/8
i) Determine the density of X, Y and calculate E [X], E [Y]. Density fX: is a function that tells me the probability of a random variable
fX: R -> [0, 1] <=> x -> fX (x): = Pr [X = x], where X is a random variable
Solution:
X (v_1) = -1
X (v_2) = 3
X (v_3) = -1
X (V_4) = 1
Then all possible values ​​of the random variable X are -1,3 and 1 therefore their densities are:
P (X = -1) = P (v_1) + P (v_3) = 17/24
P (X = 3) = P (v_2) = 1/6
P (X = 1) = P (V_4) = 1/8
The same applies to Y
Y (v_1) = 2
Y (v_2) = 2
Y (v_3) = -2
Y (V_4) = -5
Then all possible values ​​of the random variable Y are 2, -2 and -5 therefore their densities would be:
P (Y = 2) = P (v_1) + P (v_2) = 3/6
P (Y = -2) = P (v_3) = 3/8
P (Y = -5) = P (V_4) = 1/8
Then to calculate E [X], E [Y] I just have to apply the formula: Σx * P (X = x) for all possible x of our random variable

ii) Let p = (2, -2) and D the random variable resulting Euclidean distance between a point p, calculate the density D and E [D ^ 2]. Euclidean distance d (v, w) = sqrt ((v_x-W_X) ^ 2 + (v_y-w_y) ^ 2)
Solution:
We calculate the Euclidean distance d (v, w) = sqrt ((v_x-w_x) ^ 2 + (v_y-w_y) ^ 2)
Substituting:
d (v_1, p) = 5
d (v_2, p) = sqrt (17)
d (v_3, p) = 3
d (V_4, p) = sqrt (10)
Then all possible values ​​of the random variable X is 5, sqrt (17), 3, and sqrt (10). But I don't know the probabilities of this random variable. Or they would be the same as the probabilities of v_i, i = 1,2,3,4? To calculate E [D ^ 2] I found this formula
Σx^2*P (X = x) for all possible x our random variable

b) Let Ω ⊆ R ^ 2 a finite set, Pr [] a probability measure on Ω any p ^ 2 Dielectric figure any point. D (random variable) gives again the Euclidean distance between any point and p.

i) For which p is E [D ^ 2] Minimum?
Solution:
I'm still lost here

ii) How can we represent E [D ^ 2] for this p through the variance.
Solution:
I found this formula and do not know if that's what you need to do: Var [X] = E [X ^ 2] - (E [X]) ^ 2 then E [X ^ 2] = Var [X] + (E [X]) ^ 2.

Someone can say me if I'm on the right track? Thank you =)

Last edited: