This question comes from the generalized linear model.
Say Y~Bernoulli($p_i$), $f(y_i;p_i) = p_i^{y_i} (1-p_i)^{1-y_i}$. The goal is to express this pdf in the following format: $f(y_i) = e^{\frac{y_i \gamma_i - b(\gamma_i)}{\tau^2}} - c(y_i, \tau)$.
Then we have $f(y_i;p_i) = e^{y_i \log(p_i) + (1-y_i)\log(1-p_i)} = e^{y_i \log(\frac{p_i}{1-p_i}) - (-\log(1-p_i)))}$
I understand that $e^{\log(p)} = p$. Can someone explain why $e^{y\log(p)} = p^y$?
We all know that $a\log b=\log b^a$ So in the same manner $$e^{y\log p}=e^{\log p^y}$$ Now let $p^y=x$ As you said that you know that $e^{\log x}=x$
In the same manner you'll have $$e^{\log p^y}=p^y$$