Assuming I need to find the ML estimator for p, p being the chance of success in a Binomial experiment $Bin(N,p)$, I would expect my density function to be:
$$ f(y) = {{N}\choose{y}} p^y(1-p)^{N-y} $$
And so my likelihood function should be:
$$L(p) = \prod_i^n(f(y_i)) = \prod_i^n({{N}\choose{y_i}})p^{\sum_i^n y_i} (1-p)^{nN-\sum_i^n yi}$$
However, the last exponent, $nN-\sum yi$ seems to be wrong because when I derive the log likelihood and isolate $p$, I get $p = \frac{\sum_i^ny_i}{nN}$, while it should be $p = \frac{\sum_i^ny_i}{N}$. Indeed, when checking online, I find different exponents:
Here they have $N-\sum yi$, for no obvious reason to me (last time I checked, $\sum_i^n(N-y_i) = nN-\sum y_i$ !)
Here as well, but there they start from the likelihood function of a Bernoulli experiment. It makes sense that $\sum_i^n(1-y_i) = n-\sum y_i$, but what is more obscure to me is why they take the likelihood function of a Bernoulli while the problem is clearly about a Binomial. I am aware of the link between the two, but not enough to see why their likelihood functions seem to be substitutable to estimate p, especially since it doesn't give me the same result.