$\newcommand{\cost}{\operatorname{cost}}$My cost-metric is in following form

\begin{equation} \cost(x,y) = A(x,y_1) \times \sum_{i}b_i B_i(x,y_i)\tag{1} \end{equation}

where $A$ and $B$'s follow normal distribution. For my computer implementation, I am thinking of taking $\log(\cdot)$ to avoid computing exponential. By taking log of (1), I get

\begin{equation} \log(\cost(x,y)) = \log(A(x,y_1)) + \log\left(\sum_i b_i B_i(x,y_i)\right) \end{equation}

which simplifies first term but second term remains unchanged. Can I bring $\log(\cdot)$ inside the summation?

  • 1
    $\begingroup$ No, you cannot. $\endgroup$
    – Jay Zha
    May 24, 2017 at 23:12
  • $\begingroup$ Are $A$ and $B_i$ all independent of each other? In what what do they depend on $x$ and $y$? Are those supposed to be parameters identifying which normal distribution it is? $\endgroup$ May 24, 2017 at 23:42

1 Answer 1


No, you can't bring the logarithm inside the summation because that's equivalent to saying that the logarithm of a sum is the sum of logarithms.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.