1

When studying "Transforming variables" (meaning discrete and continuous random variables), I came across the following formulas:

$E(aX+b) = a \cdot E(X) + b$

$Var(aX+b) = a^2 \cdot Var(X)$

When trying to build an intuition, I built the following experiments, in order to test if these would actually match my assumption/calculation.

Experiment: Tossing a coin four times, and counting the number of tails (therefore X is the number of tails).

Using binomial distribution: The probability of success is 0.5 and the number of trials is 4. Therefore, $E(X) = np = 2$ and $Var(X) = np(1-p) = 2 \cdot 0.5 = 1$

Using the formulas for transforming variables: In this case, the expected value is $0.5$ and the $Var(X) = E(X^2) - \left[ E(X) \right]^2 = 0.25$. Given that we're calculating the number of tails four times in a row, we can state that $E(X+X+X+X) = E(4X) = 4E(X) = 4 \cdot 0.5 = 2$ (which matches the previous calculation with Binomial distribution) and $Var(X+X+X+X) = Var(4X) = 16 \cdot 0.25 = 4$ (which does not match).

Where did I go wrong?

Thank you.

bru1987
  • 2,147
  • 5
  • 25
  • 50

1 Answers1

3

As I understood, each toss is described not by the same random variable $X$, but its own random variable, say, $X_i$, where $i$ is the number of toss. Then indeed $E\left(\sum_{i=1}^4 X_i\right)=\sum_{i=1}^4 E\left( X_i\right)$, but $Var\left(\sum_{i=1}^4 X_i\right)\ne Var(4X)$.

Alex Ravsky
  • 90,434