Question: ![enter image description here](https://i.stack.imgur.com/wVR1Y.png)
can sombody explain the above calculation in the red circle marked with "why?"?
I am studying MLE with Bernoulli Distribution, and in the middle of a video clip, the lecturer says $ 1\over{n} \sum\_{i=1}^{n}x\_i$ becomes $ n\bar x $. But I can't see anything like $1\over{n}$ in any of the calculation steps in the picture.

Answer: 
Equations shown involve straightforward application of rules of logarithms.
In the red circle, all he is saying is that the sum\_i(x\_i) -- showing at the
bottom in the product log(p)\*sum\_i(x\_i) -- can alternatively be written as
N\*average(x\_i). 

That's it.
Logarithms are not needed here. I think it's pretty clear $$\frac{1}{N}\sum^N\_{i=1}x\_i = \frac{x\_1 + x\_2 + ... + x\_N}{N} = \overline{x}$$
by the definition of what a mean is ($\overline{x}$ represents the mean of $x$).