During the review of my lecture notes I stumbled upon an equation that gives me some trouble understanding. The big task that motivates the following is to express the entropy $S$ with the expected number of particles in an energy state $\langle n_i \rangle$.
Since the entropy also relates with the grand potential we are looking for an expression that gives a relation between the grand Potential $\Omega$ and $\langle n_i \rangle$ first.
An expression for $\langle n_i \rangle$ is for example $$\langle n_i \rangle = \frac{1}{e^{\beta(E_i-\mu)}+\gamma} \quad \text{with} \quad \gamma= \begin{cases} +1,\,& \text{Fermi-Dirac}\\ -1,\,& \text{Bose-Einstein}\\ 0^+,\,& \text{Maxwell-Boltzmann} \end{cases}.$$
Now my notes make the equation, where I can't understand the second equality $$\Omega = -\frac{1}{\beta}\ln \mathcal{Z}_G \stackrel{?}{=} \sum_i (E_i-\mu)\langle n_i\rangle.$$
I've seen an expression for $\ln \mathcal{Z}_G$ that looks like $$\ln \mathcal{Z}_G = \frac{1}{\gamma}\sum_i \ln\left[ 1+ \gamma e^{-\beta(E_i-\mu)}\right],$$
but I don't know if this can help me in any way. I tried to find the relation by doing some algebra, but I never seem to get to the equality $-\frac{1}{\beta}\ln \mathcal{Z}_G = \sum_i (E_i-\mu)\langle n_i\rangle$. I had the idea that maybe one needs to do some kind of approximation, but then again I am clueless what and how.
It would be great if someone could show how I get from the LHS to the RHS