calculate expected value and variance of $Y := 1 − X$

403 Views Asked by At

I'm struggling with the following exercise:

Given the random variable $X$ with expectation value $\mu$ and variance $\sigma^2$:

What is the expectation value and variance of $Y := 1 − X$

Isn't it just $E(X) = 1-\mu$?

Thanks in advance

1

There are 1 best solutions below

0
On BEST ANSWER

Comment: And the same variance.

In general, $$Var(a + bX) = b^2Var(X).$$ So here $Var(1 - X) = (-1)^2Var(X) = \sigma^2.$

Example: Suppose $X \sim \mathsf{Gamma}(\mathrm{shape}= 3, \mathrm{rate}=1/6)$ and we use R to take a large sample of size $n=100\,000.$

set.seed(624)
x = rgamma(10^5, 3, 1/6)
mean(x);  var(x)
[1] 18.03389  # aprx E(X) = 18
[1] 109.3349  # aprx Var(X) = 108
y = 1-x
mean(y);  var(y)
[1] -17.03389 # aprx E(Y) = 1-E(X) = -17
[1] 109.3349  # aprx E(Y) = E(X)

par(mfrow=c(1,2))
 hist(x, prob=T, br=50, col="skyblue2")
  curve(dgamma(x, 3, 1/6), add=T, col="red",lwd=2)
 hist(y, prob=T, br=50, col="skyblue2")
par(mfrow=c(1,1))

enter image description here

If you look closely you can see evidence that the support of $Y$ is $(-\infty, 1).$

summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.2528 10.3442 16.0457 18.0339 23.5705 90.9903 
summary(y)
     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
 -89.9903 -22.5705 -15.0457 -17.0339  -9.3442   0.7472