# Mean and Variance, Uniformly distributed random variables

Let X be a random variable uniformly distributed over an interval [0,6]. Let Y be a random variable uniformly distributed over an interval [2,14]. It is known that X and Y are independent.

(a) Find mean and variance of 3X−Y−4.

The mean should be: E(3X−Y−4)=3E(X)−E(Y)−4.

I have found that; E[X] = 3, and E[X^2]=13, E[Y] = 8, and E[X^2]=78. Thereby, 3E(X)−E(Y)−4 = 3*3-8-4 = -3, so the mean of the expression is -3.

I am not sure how to find the variance of the whole expression, but I have found the variance of X = E(X^2)-(E(X))^2 = 13-9 = 4, and Y = = E(Y^2)-(E(Y))^2 = 78-64 = 14.

Var(3X)-Var(Y) = 9Var(X)+Var(Y) = 9*4+14 = 50, so the variance of the expression is 50 and the mean of the expression is -3.

• Use $\operatorname{Var}(X+k)=\operatorname{Var}(X)$, $\operatorname{Var}(aX)=a^2\operatorname{Var}(X)$, and if they are independnet $\operatorname{Var}(X+Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)$ Aug 10, 2017 at 7:54

Var$(3X - Y - 4) = 9$Var$(X) +$Var$(Y)$. Note the variance of $X$ and $Y$ cannot be $0$ because $X$ and $Y$ are not constant RVs.

Use the formula, Var$(X) = E[X^2] - (E[X])^2$ to calculate the variance.

• Using my found expected values, the Var(X) would be 9-(3)^2 = 0. I have found the expected values by taking the halfway point of the uniform distribution X in interval [0,6] = 3, and Y in interval [2,14] = 9. Is that not the correct way to do so? Aug 10, 2017 at 8:06
• No, you're computing $(E[X])^2$ and not $E[X^2]$. There is a difference. Otherwise every random variable would have variance 0 which is certainly not true.
– user460426
Aug 10, 2017 at 8:18
• Ah okay I see, I have now calculated the variance and mean (^ see above). Do you agree? Aug 10, 2017 at 8:31
• Almost there. Note variance cannot be negative either. So I think you might have switched some quantities around.
– user460426
Aug 10, 2017 at 8:45
• Yes, I had mixed somethings around i the variance calculations. I should be correct now Aug 10, 2017 at 10:39