3

I have some issues with using the logarithm formulas, I have this expression for example where $\log$ is the natural logarithm:

$$ \log ( \frac{1}{3}\theta^{3y}) $$

Then we know the standard logarithm rules: $$ \log(a^b) = b\log(a) $$ $$ \log(\frac{a}{b}) = \log(a)-\log(b) $$

But If I apply them in various order I get two different results: $$ \log(\theta^{3y}) - \log(3) = 3y \log(\theta) - \log(3) $$

I am working through an old exam set, and the following is what my professor got in the same calculation: $$ \log ( \frac{1}{3}\theta^{3y}) = 3y\log(\frac{\theta}{3}) = 3y(\log(\theta)-\log(3)) = 3y\log(\theta) - 3y\log(3) $$

I think that my mistake might be that I am disregarding that exponents binds tigther than division so I can only apply these logarithm rules to the operator that binds the tightest at that moment? so my question is about composite functions and how to reason about when I can use which rules?

  • 1
    Did your professor treat $\dfrac 13 \theta^{3y} = \left(\dfrac{\theta}{3}\right)^{3y}$ by mistake? – peterwhy Apr 11 '23 at 23:13
  • @peterwhy arg okay, so in the assignment text the professor has $\lambda = \frac{1}{3}\theta^{3}$ and then it is specified that it is the parameter for a Poisson distribution, but then in the pmf it behaves as the term $\frac{\frac{1}{3}\theta^{3y}}{y!}$ that is part of something larger and then I am taking the logarithm of this entire expression for what we are doing. So Initially apparently we will apply the quotient rule and get $\log(\frac{1}{3}\theta^{3y}) - \log(y!)$ and that is where my question starts, how to know which rules applies to $\log(\frac{1}{3}\theta^{3y})$ now. – DenLilleMand Apr 11 '23 at 23:26
  • @peterwhy maybe I don't understand your comment, are you saying that in this case you would always use the quotient rule first and then the exponent rule like I did? if that is the case, then what is the logic behind that? You are basically applying rules based on the lowest precedence of operator then – DenLilleMand Apr 11 '23 at 23:30
  • 1
    When fully parenthesized, the two different calculations are about $\log \left( \frac{1}{3} \left( \theta^{3y}\right)\right)$ versus $\log \left( \left( \frac{1}{3} \theta\right)^{3y}\right)$. Those are different numbers. The confusion between you and your professor appears to be about which of those two is meant. Under normal conventions (in my dialect of mathematical English, "PEMDAS", but it goes by other names in other places) one has $\frac{1}{3} \theta^{3y} = \frac{1}{3} \left(\theta^{3y}\right)$. – JBL Apr 11 '23 at 23:47
  • @JBL yeah exactly, So, I have not been too aware of the parenthesis in my calculation, but my professor have not written them out explicitly either, actually from the text I can tell that $ \frac{1}{3}\theta^{3}$ is a part of the same parenthesis, so I must assume that inside of that then PEMDAS is the way to go. thanks for your answer, I will try to ask my professor. – DenLilleMand Apr 11 '23 at 23:52
  • 1
    The lower precedence operation (division) is also the outer operation. From your listed log identities, I know how log of the fraction $\log\left(\frac{\theta^{3y}}{3}\right)$ is related to the log of numerator $\log\left(\theta^{3y}\right)$ and the log of the denominator $\log(3)$. And only since then, I can apply your first log identity to transform $\log\left(\theta^{3y}\right)$. – peterwhy Apr 11 '23 at 23:59
  • @peterwhy yeah it's been very helpful to me, I think I have a better grasp of it now, I will try to clarify it with my professor. – DenLilleMand Apr 12 '23 at 00:04

1 Answers1

4

Except for the last part of your question, all the logarithm rules applied are correct . For instance,

$$\log \left( \frac{1}{3}\theta^{3y}\right) = 3y\log\left(\frac{\theta}{3}\right)$$

This is not correct. Because, observe that :

$$ \begin{align}3y\log\left(\frac{\theta}{3}\right)&=\log\left(\left(\frac{\theta}{3}\right)^{3y}\right)\\ &=\log\left(\frac{\theta}{3}\right)^{3y}\\ &=\log \left( \frac{\theta^{3y}}{3^{3y}}\right)\\ &≠\log\left(\frac {\theta^{3y}}{3}\right)\\ &=\log \left( \frac{1}{3}\theta^{3y}\right)\end{align} $$

or

$$ \begin{align}3y\log\frac{\theta}{3}&=\log\left(\frac{\theta}{3}\right)^{3y}\\ &=\log \frac{\theta^{3y}}{3^{3y}}\\ &≠\log\frac {\theta^{3y}}{3}\\ &=\log\left(\frac{1}{3}\theta^{3y}\right)\tag {*}\end{align} $$

The right steps can be written as follows :

$$ \begin{align}\log \left( \frac{1}{3}\theta^{3y}\right)&=\log\frac 13+\log \left(\theta^{3y}\right)\\ &=-\log 3+3y\log \theta\end{align} $$

Finally, note that the logarithm rules are hold within certain restrictions or in the domain in which they are defined :

$$\log \left(\theta^{3y}\right)=3y\log \theta$$

holds iff, when $\theta >0$ and $y\in\mathbb R\thinspace .$


$(^*)$

$\rm {Small \thinspace \thinspace supplement :}$

The following notations are exactly the same :

  1. $\log(a^b) = \log a^b$

  2. $\log\left(\dfrac{a}{b}\right )=\log \dfrac ab$

But,

$$3y\log\left(\frac{\theta}{3}\right)=\log\frac{{\theta}^{3y}}{{3}}$$

is not correct . The correct notation is :

$$3y\log\left(\frac{\theta}{3}\right)=\log\left(\frac{\theta}{3}\right)^{3y}$$

Because, when writing notation, not using parentheses where necessary leads to different results :

$$ \begin{align}\left(\frac {\theta}{ 3}\right)^{3y}=\frac {\theta^{3y}}{3^{3y}}≠{\frac {\theta} {3}}^{3y}=\frac {\theta^{3y}}{3}\thinspace .\end{align} $$

lone student
  • 14,709