To solve the problem of finding the mean and variance of the random variable \(X\), which represents the number of heads when 4 coins are tossed, we can follow these steps:
### Step 1: Define the Random Variable
Let \(X\) be the random variable representing the number of heads obtained when tossing 4 coins. The possible values of \(X\) are \(0, 1, 2, 3, 4\).
### Step 2: Calculate the Probability Distribution
We need to find the probabilities for each value of \(X\):
1. **Probability of \(X = 0\)** (no heads):
\[
P(X = 0) = \frac{1}{16}
\]
(Only one outcome: TTTT)
2. **Probability of \(X = 1\)** (one head):
\[
P(X = 1) = \frac{4}{16} = \frac{1}{4}
\]
(Outcomes: HTTT, THTT, TTHT, TTTT)
3. **Probability of \(X = 2\)** (two heads):
\[
P(X = 2) = \frac{6}{16} = \frac{3}{8}
\]
(Outcomes: HHTT, HTHT, HTTH, THHT, THTH, TTHH)
4. **Probability of \(X = 3\)** (three heads):
\[
P(X = 3) = \frac{4}{16} = \frac{1}{4}
\]
(Outcomes: HHHT, HHTH, HTHH, THHH)
5. **Probability of \(X = 4\)** (four heads):
\[
P(X = 4) = \frac{1}{16}
\]
(Only one outcome: HHHH)
The complete probability distribution is:
- \(P(X = 0) = \frac{1}{16}\)
- \(P(X = 1) = \frac{1}{4}\)
- \(P(X = 2) = \frac{3}{8}\)
- \(P(X = 3) = \frac{1}{4}\)
- \(P(X = 4) = \frac{1}{16}\)
### Step 3: Calculate the Mean (Expected Value)
The mean \(E(X)\) is calculated using the formula:
\[
E(X) = \sum (x_i \cdot P(X = x_i))
\]
Calculating this:
\[
E(X) = 0 \cdot \frac{1}{16} + 1 \cdot \frac{1}{4} + 2 \cdot \frac{3}{8} + 3 \cdot \frac{1}{4} + 4 \cdot \frac{1}{16}
\]
\[
= 0 + \frac{1}{4} + \frac{6}{8} + \frac{3}{4} + \frac{4}{16}
\]
\[
= 0 + \frac{1}{4} + \frac{3}{4} + \frac{3}{4} + \frac{1}{4}
\]
\[
= 2
\]
### Step 4: Calculate the Variance
The variance \(Var(X)\) is calculated using the formula:
\[
Var(X) = E(X^2) - (E(X))^2
\]
First, we need to calculate \(E(X^2)\):
\[
E(X^2) = \sum (x_i^2 \cdot P(X = x_i))
\]
Calculating this:
\[
E(X^2) = 0^2 \cdot \frac{1}{16} + 1^2 \cdot \frac{1}{4} + 2^2 \cdot \frac{3}{8} + 3^2 \cdot \frac{1}{4} + 4^2 \cdot \frac{1}{16}
\]
\[
= 0 + \frac{1}{4} + \frac{12}{8} + \frac{9}{4} + \frac{16}{16}
\]
\[
= 0 + \frac{1}{4} + \frac{3}{2} + \frac{9}{4} + 1
\]
\[
= 0 + \frac{1}{4} + \frac{6}{4} + \frac{9}{4} + \frac{4}{4}
\]
\[
= \frac{20}{4} = 5
\]
Now, substituting back into the variance formula:
\[
Var(X) = E(X^2) - (E(X))^2 = 5 - 2^2 = 5 - 4 = 1
\]
### Final Results
Thus, the mean and variance of \(X\) are:
- Mean \(E(X) = 2\)
- Variance \(Var(X) = 1\)