rochioblogmz

2022-10-26

Fair die roll 8 times, number of of perfect squares
You have a fair die you roll 8 times. Let X be the number of times you roll a perfect square. What is $E\left({X}^{2}\right)$?
I tried doing summation from 1 to 8 of $\left(n/8\right)\cdot 2.5\right)+\left(8-n\right)/8\cdot \left(3.5\right)$ and divide by 8 but that was wrong. G

Do you have a similar question?

Want to know more about Two-wayTables?

Expert

Step 1
It is easy to see that $X\sim \mathrm{Bin}\left(8,1/3\right)$. That is, X follows a binomial distribution with 8 trials and probability of success 1/3. Thus $E\left(X\right)=8/3.$
To compute $E\left({X}^{2}\right)$ without resorting to the sum definition, we can be clever: Recall that $\mathrm{Var}\left(X\right)=E\left({X}^{2}\right)-\left[E\left(X\right){\right]}^{2}$. The variance of X is
$\mathrm{Var}\left(X\right)=np\left(1-p\right)=\frac{16}{9}$
Step 2
So $E\left({X}^{2}\right)=\frac{16}{9}+\frac{64}{9}=\frac{80}{9}$
which is twice the value you computed in the comments.

Still Have Questions?

varsa1m

Expert

Step 1
Doing summation is not wrong, if you know how to calculate probabilities from binomial distribution,
Step 2
$\begin{array}{rl}E\left({X}^{2}\right)& =\sum _{x=0}^{8}P\left(X=x\right)\cdot {x}^{2}\\ & =\sum _{x=0}^{8}\left(\genfrac{}{}{0}{}{8}{x}\right){\left(\frac{1}{3}\right)}^{x}{\left(\frac{2}{3}\right)}^{8-x}{x}^{2}\\ & =\frac{1}{{3}^{8}}\sum _{x=0}^{8}\left(\genfrac{}{}{0}{}{8}{x}\right){2}^{8-x}{x}^{2}\\ & =\frac{1\cdot 256\cdot 0+8\cdot 128\cdot 1+28\cdot 64\cdot 4+56\cdot 32\cdot 9\phantom{\rule{0ex}{0ex}}+70\cdot 16\cdot 16+56\cdot 8\cdot 25+28\cdot 4\cdot 36+8\cdot 2\cdot 49+1\cdot 1\cdot 64}{{3}^{8}}\\ & =\frac{58320}{{3}^{8}}\\ & =\frac{80}{9}\end{array}$

Free Math Solver