# Binomial distribution and log-likelihood function

#### hellostudent

##### New Member
Hi everyone!
I'm struggling a lot with the log-likelihood function of the binomial distribution: I have these formulas on my notes: If I correctly understood, in the likelihood function of binomial distribution we compute the density function for each. trial and so we multiply the outcome (f(x1)*f(x2)*...f(xn)). I'm not understanding how it is possible that if in the likelihood formula there is the product sign, in the log-likelihood function there isn't the summation sign, link in this picture: I'm thinking more and more that my classmate did it wrong when He wrote the product sign in the first likelihood formula of the first image, because the product concerns situations in which there are n xi i.i.d. variables, and not a k number of successes.
Then, I'm noticing that in the highlighted formula of the second image there is a missing term: the natural logarithm of the binomial coefficient (n xi). Why?

Then I have other doubts: first of all, I cannot explain how, computing the likelihood, we haven't n^2 in this highlighted part: I mean, if you multiply f(x) n times, I can understand that you will obtain, on the exponent, the symbol ∑(xi), because the sum of the successes is definitely equal to k, but, if you benefit from the power properties, if you multiply (1-p)^n-xi n times, I think you will obtain n*n - ∑(xi), and not simply n - ∑(xi). For instance, if we have n=3 and consequently 3 random variables: x1,x2,x3, we will multiply f(x1)*f(x2)*f(x3) and, within this multiplication, we will multiply (1-p)^(n-x1)*(1-p)^(n-x2)*(1-p)^(n-x3): So the formula that I obtained, through n=3 and so the iid random variables x1,x2,x3, n that is summed to itself for n times (so n*n <=> n^2).
Finally, is this equivalence correct? (I mean the product of the binomial coefficient as a product of n terms, with all the n iid variables xi)