<s>[INST] Find $a$ and $b$ such that probability is the biggest Basketball player A hit the basket with probability $\frac{1}{2}$, and B with $\frac{1}{10}$. Player A can shoot $a$ times, and B $b$ times, $a+b=20$. Find $a$ and $b$ such that probability to make at least one point each is the biggest.
I just begging my course in probability and I have a problem with this. I tried to find max value of $(1-\frac{1}{2^{a}})(1-\frac{9^{20-a}}{10^{20-a}})$(complement of event that some of players doesn't make a point), and get solution a=1, b=19, but solution in book is a=5,b=15.
Sorry for my bad English, any help?
 [/INST] Denote the possible events of no hits/hits  by (no hits, hits). We get the following sequence for A:
$E_A=(0,1),(1,1),(2,1),....,(a-1,1)$ and similarly for b: $E_B=(0,1),(1,1),(2,1),....,(b-1,1)$. The probablities are:
$$
P(E_A)=(\frac{1}{2})^0(\frac{1}{2})^1+(\frac{1}{2})^1(\frac{1}{2})^1+(\frac{1}{2})^2(\frac{1}{2})^1...+(\frac{1}{2})^{a-1}(\frac{1}{2})^1\\=1-\frac{1}{2^a}\\
P(E_B)=(\frac{9}{10})^0(\frac{1}{10})^1+(\frac{9}{10})^1(\frac{1}{10})^1+(\frac{9}{10})^2(\frac{1}{10})^1...+(\frac{9}{10})^{b-1}(\frac{1}{10})^1\\=1-(\frac{9}{10})^b=1-(\frac{9}{10})^{20-a}
$$
Thus we have to maximize
$$P(a)=P(E_A)P(E_B)=(1-\frac{1}{2^a})(1-(\frac{9}{10})^{20-a})$$
Numerically I found that the maximum of $P(a)$ is at $a=4.764$. So the closest integer is:
$a=5$
and we have $b=15$
</s>