Finding argmax of an integral — can I take logarithm of one of the terms?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Suppose I need to solve for the argmax of $x$ for an integral that can be factored as follows:



$$
A = mathrmargmax_x int_Y f(x,y)g(y)dy
$$



Where both $f()$ and $g()$ are strictly positive, and the form of $f(x,y)$ is sufficiently horrible that I can't solve the integral directly. However, what is easy to solve is this different integral



$$
int_Y logleft[f(x,y)right]g(y)dy
$$



Since $x$ only appears in the $f()$ function, and the integrand is factored like so, it seems to me that the argmax of the second integral is equal to the argmax of the first integral, because the logarithm is continuous and strictly increasing. So, am I allowed to do:



$$
A = mathrmargmax_x int_Y logleft[f(x,y)right]g(y)dy
$$



?



I think I can, but I want to double check to see if there are any subtleties to this.



(If it helps to give stronger conditions / motivate what I'm trying to do: $f()$ and $g()$ are both probability density functions, and I need to marginalize over $y$ and get the MLE for $x$. Assume that the functions are continuous and otherwise obey enough regularity conditions for all of this to make sense).







share|cite|improve this question

















  • 1




    No you cannot, just like you cannot take the logarithm of terms of a sum.
    – LinAlg
    Aug 2 at 22:02










  • I know that it changes the value of the integral, but I don't care about the value of the integral. All I care about is whether the operation preserves the argmax of $x$, and I can't see why it doesn't.
    – dain
    Aug 2 at 23:43











  • you can take the logarithm of a sum and keep the same maximizer but you cannot take the logarithm of the individual terms (which is essentially what you are doing with the integral).
    – LinAlg
    Aug 3 at 1:28














up vote
0
down vote

favorite












Suppose I need to solve for the argmax of $x$ for an integral that can be factored as follows:



$$
A = mathrmargmax_x int_Y f(x,y)g(y)dy
$$



Where both $f()$ and $g()$ are strictly positive, and the form of $f(x,y)$ is sufficiently horrible that I can't solve the integral directly. However, what is easy to solve is this different integral



$$
int_Y logleft[f(x,y)right]g(y)dy
$$



Since $x$ only appears in the $f()$ function, and the integrand is factored like so, it seems to me that the argmax of the second integral is equal to the argmax of the first integral, because the logarithm is continuous and strictly increasing. So, am I allowed to do:



$$
A = mathrmargmax_x int_Y logleft[f(x,y)right]g(y)dy
$$



?



I think I can, but I want to double check to see if there are any subtleties to this.



(If it helps to give stronger conditions / motivate what I'm trying to do: $f()$ and $g()$ are both probability density functions, and I need to marginalize over $y$ and get the MLE for $x$. Assume that the functions are continuous and otherwise obey enough regularity conditions for all of this to make sense).







share|cite|improve this question

















  • 1




    No you cannot, just like you cannot take the logarithm of terms of a sum.
    – LinAlg
    Aug 2 at 22:02










  • I know that it changes the value of the integral, but I don't care about the value of the integral. All I care about is whether the operation preserves the argmax of $x$, and I can't see why it doesn't.
    – dain
    Aug 2 at 23:43











  • you can take the logarithm of a sum and keep the same maximizer but you cannot take the logarithm of the individual terms (which is essentially what you are doing with the integral).
    – LinAlg
    Aug 3 at 1:28












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Suppose I need to solve for the argmax of $x$ for an integral that can be factored as follows:



$$
A = mathrmargmax_x int_Y f(x,y)g(y)dy
$$



Where both $f()$ and $g()$ are strictly positive, and the form of $f(x,y)$ is sufficiently horrible that I can't solve the integral directly. However, what is easy to solve is this different integral



$$
int_Y logleft[f(x,y)right]g(y)dy
$$



Since $x$ only appears in the $f()$ function, and the integrand is factored like so, it seems to me that the argmax of the second integral is equal to the argmax of the first integral, because the logarithm is continuous and strictly increasing. So, am I allowed to do:



$$
A = mathrmargmax_x int_Y logleft[f(x,y)right]g(y)dy
$$



?



I think I can, but I want to double check to see if there are any subtleties to this.



(If it helps to give stronger conditions / motivate what I'm trying to do: $f()$ and $g()$ are both probability density functions, and I need to marginalize over $y$ and get the MLE for $x$. Assume that the functions are continuous and otherwise obey enough regularity conditions for all of this to make sense).







share|cite|improve this question













Suppose I need to solve for the argmax of $x$ for an integral that can be factored as follows:



$$
A = mathrmargmax_x int_Y f(x,y)g(y)dy
$$



Where both $f()$ and $g()$ are strictly positive, and the form of $f(x,y)$ is sufficiently horrible that I can't solve the integral directly. However, what is easy to solve is this different integral



$$
int_Y logleft[f(x,y)right]g(y)dy
$$



Since $x$ only appears in the $f()$ function, and the integrand is factored like so, it seems to me that the argmax of the second integral is equal to the argmax of the first integral, because the logarithm is continuous and strictly increasing. So, am I allowed to do:



$$
A = mathrmargmax_x int_Y logleft[f(x,y)right]g(y)dy
$$



?



I think I can, but I want to double check to see if there are any subtleties to this.



(If it helps to give stronger conditions / motivate what I'm trying to do: $f()$ and $g()$ are both probability density functions, and I need to marginalize over $y$ and get the MLE for $x$. Assume that the functions are continuous and otherwise obey enough regularity conditions for all of this to make sense).









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Aug 3 at 11:29
























asked Aug 2 at 19:53









dain

1084




1084







  • 1




    No you cannot, just like you cannot take the logarithm of terms of a sum.
    – LinAlg
    Aug 2 at 22:02










  • I know that it changes the value of the integral, but I don't care about the value of the integral. All I care about is whether the operation preserves the argmax of $x$, and I can't see why it doesn't.
    – dain
    Aug 2 at 23:43











  • you can take the logarithm of a sum and keep the same maximizer but you cannot take the logarithm of the individual terms (which is essentially what you are doing with the integral).
    – LinAlg
    Aug 3 at 1:28












  • 1




    No you cannot, just like you cannot take the logarithm of terms of a sum.
    – LinAlg
    Aug 2 at 22:02










  • I know that it changes the value of the integral, but I don't care about the value of the integral. All I care about is whether the operation preserves the argmax of $x$, and I can't see why it doesn't.
    – dain
    Aug 2 at 23:43











  • you can take the logarithm of a sum and keep the same maximizer but you cannot take the logarithm of the individual terms (which is essentially what you are doing with the integral).
    – LinAlg
    Aug 3 at 1:28







1




1




No you cannot, just like you cannot take the logarithm of terms of a sum.
– LinAlg
Aug 2 at 22:02




No you cannot, just like you cannot take the logarithm of terms of a sum.
– LinAlg
Aug 2 at 22:02












I know that it changes the value of the integral, but I don't care about the value of the integral. All I care about is whether the operation preserves the argmax of $x$, and I can't see why it doesn't.
– dain
Aug 2 at 23:43





I know that it changes the value of the integral, but I don't care about the value of the integral. All I care about is whether the operation preserves the argmax of $x$, and I can't see why it doesn't.
– dain
Aug 2 at 23:43













you can take the logarithm of a sum and keep the same maximizer but you cannot take the logarithm of the individual terms (which is essentially what you are doing with the integral).
– LinAlg
Aug 3 at 1:28




you can take the logarithm of a sum and keep the same maximizer but you cannot take the logarithm of the individual terms (which is essentially what you are doing with the integral).
– LinAlg
Aug 3 at 1:28















active

oldest

votes











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870435%2ffinding-argmax-of-an-integral-can-i-take-logarithm-of-one-of-the-terms%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870435%2ffinding-argmax-of-an-integral-can-i-take-logarithm-of-one-of-the-terms%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?