hypothesis testing problem I'm stuck at the following problem
We have people picking one of A,B,C.
According to a theoretical model people pick in the ratio $p^2:2p(1-p):(1-p)^2$ respectively.
From a sample we have 42,52,22.
Is the model correct?
I know that I have to use chi-square test and since we know nothing about $p$
I should use MLE
When I do  that I find $\hat{p}=\frac{1}{2}$ but according to the book it should be $\hat{p}=\frac{68}{116}$
I would like to know what I'm doing wrong?
 A: You have the ratios $p^2:2p(1-p):(1-p)^2$, which sum to $1$
You are given the count data  $42,52,22$ summing to $116$.  This suggests A is more common than C so you might guess $\hat p > \frac12$.
The likelihood is proportional to $$\left(p^2\right)^{42}\left(2p(1-p)\right)^{52}\left(1-p)^2\right)^{22}$$ which $($ignoring powers of $2)$ is proportional to $$p^{2\times 42+52}(1-p)^{52+2\times 22} = p^{136}(1-p)^{96}$$  and this is maximised when $\hat p =\frac{136}{136+96}=\frac{136}{232}=\frac{68}{116}=\frac{17}{29} \approx 0.5862$ as your book says.
If that was correct, it might suggest expected values for the counts of about $39.86,56.28,19.86$ and you can perform your chi-squared test (with two degrees of freedom) in the usual way.  Intuitively these modelled numbers look close to the observed numbers so you will not reject the null hypothesis.  In R:
obs <- c(42, 52, 22)
phat <- (2*obs[1] + obs[2]) / (2*sum(obs))
chisq.test(obs, p=c(phat^2, 2*phat*(1-phat), (1-phat)^2))


#         Chi-squared test for given probabilities
#  
# data:  obs
# X-squared = 0.66967, df = 2, p-value = 0.7155

