0
$\begingroup$

I have a Gaussian random variable $z$, whose mean $\mu$ and variance $\sigma^2$ are functions of two variables $x$ and $y$. Is there any way in MATLAB so that I can find the values of $x$ and $y$ for which $P(z)$ = $N(z$;$\mu$$(x,y)$,$\sigma$$(x,y))$ is maximised for a given value of $z$? Thanks in advance.

$\endgroup$
  • $\begingroup$ I don't understand your writing. Could you rephrase it? $\endgroup$ – Royi Apr 12 '16 at 5:01
  • $\begingroup$ I have rephrased the question. Please have a look. $\endgroup$ – Ajay Agarwal Apr 12 '16 at 8:48
  • 1
    $\begingroup$ $P(z)$ is always maximum for $z=\mu$. You need to find $x,y$ such that $\mu(x,y)=z$. $\endgroup$ – MBaz Apr 12 '16 at 13:57
  • $\begingroup$ As @MBaz says, $P(z)$ will be maximized when $z = \mu(x,y),$ unless there are constraints on the values of $x$ and $y$ or on the function $\mu$ that mean $z = \mu(x,y)$ is impossible. Are there any other things about the problem that you're not telling us? $\endgroup$ – Peter K. Apr 12 '16 at 14:59
2
$\begingroup$

Try this:

[argvalue, argmin] = min(x);
[argvalue, argmax] = max(x);

Also, have a look to this question.

$\endgroup$
0
$\begingroup$

If you can express $\mu$ in an functional form, you could use fsolve.

$\endgroup$

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