A bag contains n balls out of which some balls are white. The probability that the bag contains i white balls is proportional to $i^2$. A ball is drawn at random from the bag and found to be white. Then find the probability that the bag contains exactly 2 white balls.
I found the probability of drawing the ball that's proportional to i but not any more.
My attempt:
Let the event of drawing the ball be $A_i$.
Its given that $P(A_i)$ is proportional to $i^2$, then $P(A_i)= k~i^2$.
Taking total probability, $1=k\sum_{i=0}^n i^2$
$k= 1/(\sum_{i=0}^n(i^2))$
Therefore, $P(A_i)= \dfrac{(6~i^2)}{n(n+1)(2 n+1)}$
Thanks in advance.
We want to compute:
$$\begin{align} P(i=2 \,| \,\text{white ball is drawn}) &= \dfrac{P(\text{white ball is drawn}\, | \,i=2) \cdot P(i=2)}{P(\text{white ball is drawn})} \\ &=\dfrac{\dfrac{2}{n} \cdot (\lambda\cdot 2^2)}{\sum_{i=0}^{n}\lambda \cdot i^2 \cdot \dfrac{i}{n}} \\ &=\dfrac{\dfrac{8}{n}}{\sum_{i=0}^{n}\dfrac{i^3}{n}} \\ &=\dfrac{8}{\sum_{i=0}^{n}i^3} \\ &=\dfrac{8}{(n(n+1)/2)^2} \\ &=\dfrac{32}{(n(n+1))^2} \\ \end{align}$$