An urn contains black and white balls. A sample of size n is drawn with replacement.
(1) What is the maximum-likelihood estimator of the ratio R of black to white balls in the urn?
(2) Suppose that one draws balls one by one with replacement until a black ball appears. Let X be the number of draws required (not counting the last draw). This operation is repeated n times to obtain a sample ($X_1,X_2$. . . . $X_n$). What is the maximum-likelihood estimator of R on the basis of this sample ?
I tried as follows :
(1) We are given R= (Number of black balls/Number of white balls). We need to approximate (R).
Probability of getting a black ball from the urn would be : $\dfrac{R}{1+R}$
So considering a sample ($X_1,X_2$. . . . $X_n$) where $X_i$ ~ Bernoulli($\frac{R}{1+R}$)
So L(R) = $\Pi_{i=0}^{n}(\frac{R}{1+R})^{x_i}(1+R)^{x_i - 1}$ => $(\frac{R}{1+R})^{\sum x_i}(1+R)^{\sum x_i - n}$
So taking a log , differentiating with respect $R$ and equating to zero gives : $\hat{R}=\dfrac{\sum x_i}{n- \sum x_i}$
(2) Quite similar to the first part, here we should consider $X_i$ ~ Geometric($\frac{R}{1+R}$) , i.e $f(x_i)=(\frac{R}{1+R}){(1+R)^{x_i-1}}$
Again proceeding like (1) gives $\hat{R} = \dfrac{n}{n-\sum x_i}$
Are these M.L.E's correct ? Could anyone help ?