We are given a discrete random variable $X$ with the probability mass function $P(X = x_i)$ where $x \in \{x_1, x_2, \dots, x_n\}$, and the following information:
- $\sum_{i=1}^{n} (x_i - 2)^2 P(X = x_i) = 28$
- $\sum_{i=1}^{n} (x_i + 2)^2 P(X = x_i) = 12$
We are tasked with finding the variance of $X$.
Step 1: Express the given sums in terms of expected values
The $n^{th}$ term $T_n$ of a progression can be found by subtracting the sum of the first $n-1$ terms from the sum of the first $n$ terms:
We can express the two given sums as expectations:
First sum:
\[
\sum_{i=1}^{n} (x_i - 2)^2 P(X = x_i)
\]
Expanding the square:
\[
(x_i - 2)^2 = x_i^2 - 4x_i + 4
\]
\[
\sum_{i=1}^{n} (x_i - 2)^2 P(X = x_i) = \sum_{i=1}^{n} \left( x_i^2 - 4x_i + 4 \right) P(X = x_i)
\]
\[
= \sum_{i=1}^{n} x_i^2 P(X = x_i) - 4 \sum_{i=1}^{n} x_i P(X = x_i) + 4 \sum_{i=1}^{n} P(X = x_i)
\]
Using properties of expectations:
\[
\sum_{i=1}^{n} P(X = x_i) = 1 \quad \text{(since the total probability sums to 1)}
\]
Thus, the equation becomes:
\[
\mathbb{E}[X^2] - 4\mathbb{E}[X] + 4 = 28
\]
Second sum:
\[
\sum_{i=1}^{n} (x_i + 2)^2 P(X = x_i)
\]
Expanding the square:
\[
(x_i + 2)^2 = x_i^2 + 4x_i + 4
\]
\[
\sum_{i=1}^{n} (x_i + 2)^2 P(X = x_i) = \sum_{i=1}^{n} \left( x_i^2 + 4x_i + 4 \right) P(X = x_i)
\]
\[
= \sum_{i=1}^{n} x_i^2 P(X = x_i) + 4 \sum_{i=1}^{n} x_i P(X = x_i) + 4 \sum_{i=1}^{n} P(X = x_i)
\]
Again, using properties of expectations:
\[
\mathbb{E}[X^2] + 4\mathbb{E}[X] + 4 = 12
\]
Step 2: Solving the system of equations
We now have the following system of equations:
1. $\mathbb{E}[X^2] - 4\mathbb{E}[X] + 4 = 28$
2. $\mathbb{E}[X^2] + 4\mathbb{E}[X] + 4 = 12$
Let $\mu = \mathbb{E}[X]$ and $\mu_2 = \mathbb{E}[X^2]$. Substituting into the system, we have:
1. $\mu_2 - 4\mu + 4 = 28$
2. $\mu_2 + 4\mu + 4 = 12$
Subtract the second equation from the first:
\[
(\mu_2 - 4\mu + 4) - (\mu_2 + 4\mu + 4) = 28 - 12
\]
Simplifying:
\[
\mu_2 - 4\mu + 4 - \mu_2 - 4\mu - 4 = 16
\]
\[
-8\mu = 16
\]
\[
\mu = -2
\]
Now substitute $\mu = -2$ into one of the original equations, say the first one:
\[
\mu_2 - 4(-2) + 4 = 28
\]
\[
\mu_2 + 8 + 4 = 28
\]
\[
\mu_2 + 12 = 28
\]
\[
\mu_2 = 16
\]
Step 3: Finding the variance
The variance of $X$, denoted $\text{Var}(X)$, is given by:
\[
\text{Var}(X) = \mathbb{E}[X^2] - (\mathbb{E}[X])^2
\]
Substituting the values of $\mathbb{E}[X^2] = 16$ and $\mathbb{E}[X] = -2$:
\[
\text{Var}(X) = 16 - (-2)^2 = 16 - 4 = 12
\]
Final Answer:
The variance of $X$ is 12.