Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Solving underdefined multivariate quadratic equation

Subject: Solving underdefined multivariate quadratic equation

From: Cary Frydman

Date: 22 Jan, 2009 22:38:02

Message: 1 of 6

Hi,

I'd like to solve a a single quadratic equation for a 50 dimensional vector x. (There will of course be many solutions because it is underdefined.) FAdditionally, I need each element of the solution to be constrained to the interval [0.2, 0.8]. Is there a way to do this in Matlab? I'm not sure if Fsolve can use constraints.

Thanks,
Cary

Subject: Solving underdefined multivariate quadratic equation

From: Roger Stafford

Date: 22 Jan, 2009 23:40:05

Message: 2 of 6

"Cary Frydman" <cfrydman@caltech.edu> wrote in message <glasga$3o3$1@fred.mathworks.com>...
> Hi,
>
> I'd like to solve a a single quadratic equation for a 50 dimensional vector x. (There will of course be many solutions because it is underdefined.) FAdditionally, I need each element of the solution to be constrained to the interval [0.2, 0.8]. Is there a way to do this in Matlab? I'm not sure if Fsolve can use constraints.
>
> Thanks,
> Cary

  The statement of your problem does not sound at all well-formulated to me, even with the given constraints. With fifty unknowns and a single equation to be satisfied, you are likely to find either no solutions or such a vast infinity of them you won't know how to deal with the situation. Even with two variables you would ordinarily get a one-dimensional curve segment of solutions within the square of constraints, or else the curve would miss the constraint square altogether.

  Surely there is something in addition to these constraints that you can say about these variables to narrow things down further.

Roger Stafford

Subject: Solving underdefined multivariate quadratic equation

From: Cary Frydman

Date: 23 Jan, 2009 00:10:04

Message: 3 of 6

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <glb04l$ebi$1@fred.mathworks.com>...
> "Cary Frydman" <cfrydman@caltech.edu> wrote in message <glasga$3o3$1@fred.mathworks.com>...
> > Hi,
> >
> > I'd like to solve a a single quadratic equation for a 50 dimensional vector x. (There will of course be many solutions because it is underdefined.) FAdditionally, I need each element of the solution to be constrained to the interval [0.2, 0.8]. Is there a way to do this in Matlab? I'm not sure if Fsolve can use constraints.
> >
> > Thanks,
> > Cary
>
> The statement of your problem does not sound at all well-formulated to me, even with the given constraints. With fifty unknowns and a single equation to be satisfied, you are likely to find either no solutions or such a vast infinity of them you won't know how to deal with the situation. Even with two variables you would ordinarily get a one-dimensional curve segment of solutions within the square of constraints, or else the curve would miss the constraint square altogether.
>
> Surely there is something in addition to these constraints that you can say about these variables to narrow things down further.
>
> Roger Stafford

Perhaps if I explain the situation it may help narrow down solution concepts. What I'm looking to do is to construct two 50 dimensional vectors that are mutually orthogonal. One vector represents the 50 statistical means of 50 distinct underlying probability mass functions. That is, each element of this vector is the mean of a distinct pmf. The other vector contains the corresponding variance of the pmf. I want to make these two 50 dimensional vectors orthogonal, so I have a set of probability mass functions whose mean and variance are not correlated.

The way I plan to do this is to exogenously define the support of the 50 pmf's, and then use some type of nonlinear equation solver to find the probabilities that characterize each pmf, subject to the orthogonality constraint. Ie, the probability of the first outcome of each pmf fully characterizes that pmf. The "constained" part of my nonlinear equation is that the variables to be solved for must be probabilities, ie, must be between 0 & 1, although I'd like them to be between 0.2 and 0.8. Hopefully this clears things up, thanks for the initial response.

Subject: Solving underdefined multivariate quadratic equation

From: Roger Stafford

Date: 23 Jan, 2009 01:23:02

Message: 4 of 6

"Cary Frydman" <cfrydman@caltech.edu> wrote in message <glb1ss$cpq$1@fred.mathworks.com>...
> .......
> Perhaps if I explain the situation it may help narrow down solution concepts. What I'm looking to do is to construct two 50 dimensional vectors that are mutually orthogonal. One vector represents the 50 statistical means of 50 distinct underlying probability mass functions. That is, each element of this vector is the mean of a distinct pmf. The other vector contains the corresponding variance of the pmf. I want to make these two 50 dimensional vectors orthogonal, so I have a set of probability mass functions whose mean and variance are not correlated.
>
> The way I plan to do this is to exogenously define the support of the 50 pmf's, and then use some type of nonlinear equation solver to find the probabilities that characterize each pmf, subject to the orthogonality constraint. Ie, the probability of the first outcome of each pmf fully characterizes that pmf. The "constained" part of my nonlinear equation is that the variables to be solved for must be probabilities, ie, must be between 0 & 1, although I'd like them to be between 0.2 and 0.8. Hopefully this clears things up, thanks for the initial response.
-----------------
  You say "use some type of nonlinear equation solver to find the probabilities that characterize each pmf" and "the probability of the first outcome of each pmf fully characterizes that pmf." This would mean you have found some magic way to characterize each pmf distribution in terms of a single parameter, in this case the probability of the first outcome. What I find remarkable is that this could lead to a simple quadratic equation to satisfy. That would mean there are 50 different parameters which determine both the mean and variance of each pmf that somehow lead to a quadratic expression in 50 variables. You certainly haven't shown us the steps in that process. What are these variables?

  There is another aspect of this problem that bothers me. You say "I want to make these two 50 dimensional vectors orthogonal, so I have a set of probability mass functions whose mean and variance are not correlated." However, for these to be truly uncorrelated you would have to have the means all offset by the mean of these means and the variances by the mean of the variances in this "quadratic" expression. Is that what you really meant? Doing this will not by any means make these pmf distributions necessarily mutually independent.

  If I were you I would endeavor to boil everything down to just one parameter, hopefully one that would be assured of creating a valid pmf for each value of the parameter over a certain range. That is, use some perhaps random technique in each of the fifty cases that depend on the same parameter, but of course in fifty different ways. This way your means and variances and hence the appropriate over-all correlation value could be expressed in terms of that one parameter. Then you could use 'fzero' to find a value of this parameter that actually results in no correlation. I don't see that you have gained much by having numerous parameters instead of one.

  I know that is a vague description, but then so is your statement of the problem.

Roger Stafford

Subject: Solving underdefined multivariate quadratic equation

From: Cary Frydman

Date: 23 Jan, 2009 07:57:03

Message: 5 of 6

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <glb65m$5ag$1@fred.mathworks.com>...
> "Cary Frydman" <cfrydman@caltech.edu> wrote in message <glb1ss$cpq$1@fred.mathworks.com>...
> > .......
> > Perhaps if I explain the situation it may help narrow down solution concepts. What I'm looking to do is to construct two 50 dimensional vectors that are mutually orthogonal. One vector represents the 50 statistical means of 50 distinct underlying probability mass functions. That is, each element of this vector is the mean of a distinct pmf. The other vector contains the corresponding variance of the pmf. I want to make these two 50 dimensional vectors orthogonal, so I have a set of probability mass functions whose mean and variance are not correlated.
> >
> > The way I plan to do this is to exogenously define the support of the 50 pmf's, and then use some type of nonlinear equation solver to find the probabilities that characterize each pmf, subject to the orthogonality constraint. Ie, the probability of the first outcome of each pmf fully characterizes that pmf. The "constained" part of my nonlinear equation is that the variables to be solved for must be probabilities, ie, must be between 0 & 1, although I'd like them to be between 0.2 and 0.8. Hopefully this clears things up, thanks for the initial response.
> -----------------
> You say "use some type of nonlinear equation solver to find the probabilities that characterize each pmf" and "the probability of the first outcome of each pmf fully characterizes that pmf." This would mean you have found some magic way to characterize each pmf distribution in terms of a single parameter, in this case the probability of the first outcome. What I find remarkable is that this could lead to a simple quadratic equation to satisfy. That would mean there are 50 different parameters which determine both the mean and variance of each pmf that somehow lead to a quadratic expression in 50 variables. You certainly haven't shown us the steps in that process. What are these variables?
>
> There is another aspect of this problem that bothers me. You say "I want to make these two 50 dimensional vectors orthogonal, so I have a set of probability mass functions whose mean and variance are not correlated." However, for these to be truly uncorrelated you would have to have the means all offset by the mean of these means and the variances by the mean of the variances in this "quadratic" expression. Is that what you really meant? Doing this will not by any means make these pmf distributions necessarily mutually independent.
>
> If I were you I would endeavor to boil everything down to just one parameter, hopefully one that would be assured of creating a valid pmf for each value of the parameter over a certain range. That is, use some perhaps random technique in each of the fifty cases that depend on the same parameter, but of course in fifty different ways. This way your means and variances and hence the appropriate over-all correlation value could be expressed in terms of that one parameter. Then you could use 'fzero' to find a value of this parameter that actually results in no correlation. I don't see that you have gained much by having numerous parameters instead of one.
>
> I know that is a vague description, but then so is your statement of the problem.
>
> Roger Stafford

Hi,
I guess the important thing I forgot to mention is that the cardinality of the support of each pmf is 2. That is, there are only two points with positive mass, so after exogenously defining these two points, each pmf can be characterized by the probability of the first outcome, call it p1.

If you construct the sample covariance between the means of the pmf's and the variance of the pmf's as a function of the 50 p1's, and set to 0, you get a well defined single multivariate quadratic equation, where the 50 unknowns are the 50 p1's of each pmf. Fsolve will do this. However, I don't know if I can use fsolve while constraining the solutions to be in the range of a probability measure. Ie, having each coordinate of the solution lie in the [0,1] interval. Any other methods are very welcome, this was just a first approach…

Thanks

Subject: Solving underdefined multivariate quadratic equation

From: Matt

Date: 23 Jan, 2009 10:28:02

Message: 6 of 6

"Cary Frydman" <cfrydman@caltech.edu> wrote in message <glbt8f$l78$1@fred.mathworks.com>...

> If you construct the sample covariance between the means of the pmf's and the variance of the pmf's as a function of the 50 p1's, and set to 0, you get a well defined single multivariate quadratic equation, where the 50 unknowns are the 50 p1's of each pmf.
----------------------------------------

I don't think so. For a Bernouilli random variable, the mean is p1 and the variance is p1*(1-p1). Multiply them together and you geta cubic, not quadratic, function of the p1s.

Possibly, though, I am confused by your terminology. The means and variances of a pmf are deterministic quantities, not random variables, so it is not entirely clear what you mean by their "sample covariance".

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us