Why $e^{y \log(p)} = p^y$

57 Views Asked by At

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$?

2

There are 2 best solutions below

0
On BEST ANSWER

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$$

0
On

Some books and official programs define the real powers by that $e^{ylog(p)} = p^y$. (Because the definition of the exponential function does not include powers) Otherwise what it the definition of a real number to the power of another real number. Moreover, if we consider the power defined and that $e^{log(p)} = p$ , raise both sides to the power y.