How to find the minimum value of an integral using Matlab?

3 ビュー (過去 30 日間)
Yufei Cao
Yufei Cao 2019 年 10 月 4 日
コメント済み: Walter Roberson 2019 年 10 月 6 日
I want to find the θ value, which makes takes the minimum value. is given by
,
where is a known function, and is the PDF of Student's t distribution.
I am not sure: (1) how to convert this equation into Matlab language, and (2) which Matlab function is the best to find the minimum value in general?
  2 件のコメント
Dimitris Kalogiros
Dimitris Kalogiros 2019 年 10 月 4 日
編集済み: Dimitris Kalogiros 2019 年 10 月 4 日
The minimume value with respect to what parameter? Theta I guess... am I right ?
Yufei Cao
Yufei Cao 2019 年 10 月 5 日
Yes. I want to find the value theta which minimize the function f(theta).

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2019 年 10 月 5 日
編集済み: Walter Roberson 2019 年 10 月 5 日
The critical points of a function (max, min, saddle points) are where the derivative of the function are 0. But you have the derivative: it is the part inside the integral.
If f(x) is not infinite then one zero occurs when theta is -inf*sign(g(x)) as that makes exp(-inf)*f(x) which is 0*f(x) which is 0 when f(x) is finite.
There are also solutions wherever f(x) is 0 independent of finite theta*g(x), but f(x)=0 with g(x) infinite and theta the same sign as g(x) would lead to infinity times 0 which is undefined.
There are also solutions whenever g(x) is infinite and f(x) is finite, in which case theta = arbitrary positive times -sign(g(x)) again leads to 0
If g(x) is finite and f(x) is non-zero and theta is restricted to be finite, then you can be sure that the expression is non-zero and so not a critical point.
You can see that the only one of these that is dependent on specific value of theta is the infinite case. Therefore choose -inf*sign(g(x)) after which you just have to go through and find the infinite f(x) to remove those from the solution set.
  2 件のコメント
Yufei Cao
Yufei Cao 2019 年 10 月 6 日
編集済み: Yufei Cao 2019 年 10 月 6 日
Hi, Walter, thanks for your reply.
After reading your method, I am confuesd with in the case that when theta takes -inf*sign(g(x)). For example, let X be a Gaussian random variable. Its moments generating function is:
Following your method without sovling the integral, I think takes the minimum value when θ is -inf*sign(x). Am I right? How to use your method to analyse the above equation in a proper way?
Walter Roberson
Walter Roberson 2019 年 10 月 6 日
Examine what is being integrated, and notice that for real-valued theta, exp(theta*x) can never be negative, and exp(-x^2/2) can also never be negative. Therefore the minima of the integral can never be negative. Can the minima of the integral be 0?
Potentially it can be -- if theta is permitted to be a function of x rather than a constant. If it can be a function of x then let theta be -inf*sign(x) . It is being multipled by x, so you get -inf*sign(x)*x . For negative x that would be -inf * -1 * a negative value, which would be a triple negative that would multiply out to -inf and exp(-inf) is 0. For positive x, it would be -inf * 1 * a positive value, which is a single negative, which would multiply out to -inf and exp(-inf) is 0.
But what if you require theta to be a constant? If you set it to inf then for the negative values the inf times negative would give -inf and exp(-inf) is 0. However, with inf then for the postiive values of x, inf times positive would give +inf and exp(+inf) is +inf and you now have an infinite integral. If you try theta = -inf then the bottom half is +inf and the top half is 0. Therefore if theta is to be constant it cannot be either -inf or +inf . But potentially it could be 0, which would give exp(0*x) which would be exp(0) which is 1.
If you do the integral you posted here for H(0) assuming constant theta, then it turns out to be exp(theta^2/2) which obviously has a minima when theta is 0.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by