I have the following problem:
We toss two unfair coins each 5 times. First, we 5 times toss a coin that has probability $\frac{1}{4}$ for heads (H), followed by tossing 5 times a coin that has probability $\frac{3}{4}$ for H. All coin tosses can be assumed to be independent. Let $X$ denote the total number of heads. Compute Var($X$).
The following is my computation:
Let $X_{1}$ and $X_{2}$ be the number of heads for the first coin and the second coin respectively. Since these events are independent we have, \begin{equation}\text{Var}(X)=\text{Var}(X_{1})+\text{Var}(X_{2})\end{equation} So now I compute the separate variances, \begin{equation}\text{Var}(X_{1})=\mathbb{E}[X_{1}^{2}]-(\mathbb{E}[X_{1}])^{2}\end{equation} \begin{equation}\text{Var}(X_{1})=5^{2}\cdot\frac{1}{4}-(5\cdot\frac{1}{4})^{2}\end{equation} \begin{equation}\text{Var}(X_{1})=\frac{25}{4}-\frac{25}{16}=\frac{75}{16}\end{equation} and for $X_{2}$, \begin{equation}\text{Var}(X_{2})=\mathbb{E}[X_{2}^{2}]-(\mathbb{E}[X_{2}])^{2}\end{equation} \begin{equation}\text{Var}(X_{2})=5^{2}\cdot\frac{3}{4}-(5\cdot\frac{3}{4})^{2}\end{equation} \begin{equation}\text{Var}(X_{2})=\frac{75}{4}-\frac{225}{16}=\frac{75}{16}\end{equation} So now to conclude I compute, \begin{equation}\text{Var}(X)=\frac{75}{16}+\frac{75}{16}=\frac{75}{8}\end{equation}
The teacher did not give any solutions for our exercises so the reason I put this question on here is so that someone can check my work. Could someone do that?
no, it's wrong.
Setting (as you did)
$$X_1\perp\!\!\!\!\!\!\perp X_2$$
You have that $X_1\sim Bin(5;0.25)$ and $X_1\sim Bin(5;0.75)$. Knowing that for a binomial rv its variance is $n p(1-p)$, the total variance is
$$\mathbb{V}[X]=5\times\frac{1}{4}\times\frac{3}{4}+5\times\frac{1}{4}\times\frac{3}{4}=\frac{15}{8}$$
FYK, this is the distribution of Heads
I calculate it manually...it is not difficult, if you want to do an exercise...