Subjects probability

Variance Calculation A849C7

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Variance Calculation A849C7


1. **State the problem:** We have a random variable $X$ with probability density function (PDF) $$ f(x) = \begin{cases} 1 + x, & -1 < x \leq 0 \\ 1 - x, & 0 < x < 1 \\ 0, & \text{otherwise} \end{cases} $$ We need to calculate the variance of $X$. 2. **Recall the formulas:** - The variance is given by $$\mathrm{Var}(X) = E(X^2) - [E(X)]^2$$ - The expected value (mean) is $$E(X) = \int_{-\infty}^{\infty} x f(x) \, dx$$ - The second moment is $$E(X^2) = \int_{-\infty}^{\infty} x^2 f(x) \, dx$$ 3. **Calculate $E(X)$:** Split the integral according to the PDF definition: $$E(X) = \int_{-1}^0 x(1+x) \, dx + \int_0^1 x(1 - x) \, dx$$ Calculate each part: - $$\int_{-1}^0 x + x^2 \, dx = \left[ \frac{x^2}{2} + \frac{x^3}{3} \right]_{-1}^0 = \left(0 + 0\right) - \left(\frac{1}{2} - \frac{1}{3}\right) = -\frac{1}{6}$$ - $$\int_0^1 x - x^2 \, dx = \left[ \frac{x^2}{2} - \frac{x^3}{3} \right]_0^1 = \frac{1}{2} - \frac{1}{3} = \frac{1}{6}$$ Sum: $$E(X) = -\frac{1}{6} + \frac{1}{6} = 0$$ 4. **Calculate $E(X^2)$:** Similarly, $$E(X^2) = \int_{-1}^0 x^2(1+x) \, dx + \int_0^1 x^2(1 - x) \, dx$$ Calculate each part: - $$\int_{-1}^0 x^2 + x^3 \, dx = \left[ \frac{x^3}{3} + \frac{x^4}{4} \right]_{-1}^0 = 0 - \left(-\frac{1}{3} + \frac{1}{4}\right) = \frac{1}{12}$$ - $$\int_0^1 x^2 - x^3 \, dx = \left[ \frac{x^3}{3} - \frac{x^4}{4} \right]_0^1 = \frac{1}{3} - \frac{1}{4} = \frac{1}{12}$$ Sum: $$E(X^2) = \frac{1}{12} + \frac{1}{12} = \frac{1}{6}$$ 5. **Calculate variance:** $$\mathrm{Var}(X) = E(X^2) - [E(X)]^2 = \frac{1}{6} - 0^2 = \frac{1}{6}$$ **Final answer:** $$\boxed{\mathrm{Var}(X) = \frac{1}{6}}$$