From: bo on
Linear model Poly8:
fittedmodel1(x) = p1*x^8 + p2*x^7 + p3*x^6 + p4*x^5 +
p5*x^4 + p6*x^3 + p7*x^2 + p8*x + p9
Coefficients (with 95% confidence bounds):
p1 = -8.739e-010 (-4.795e-008, 4.62e-008)
p2 = -1.338e-008 (-1.811e-006, 1.784e-006)
p3 = 7.195e-007 (-2.983e-005, 3.127e-005)
p4 = 8.171e-006 (-0.001298, 0.001315)
p5 = -0.0003242 (-0.01082, 0.01017)
p6 = -0.002373 (-0.2801, 0.2753)
p7 = -0.02718 (-1.754, 1.699)
p8 = -0.3535 (-17.13, 16.42)
p9 = 305.7 (239.8, 371.6)

Anyone can help me to solve this higher polynomial function ? Then compare the result?Thanks a lot
From: John D'Errico on
"bo " <bobpong1979(a)hotmail.com> wrote in message <hmlg2s$k88$1(a)fred.mathworks.com>...
> Linear model Poly8:
> fittedmodel1(x) = p1*x^8 + p2*x^7 + p3*x^6 + p4*x^5 +
> p5*x^4 + p6*x^3 + p7*x^2 + p8*x + p9
> Coefficients (with 95% confidence bounds):
> p1 = -8.739e-010 (-4.795e-008, 4.62e-008)
> p2 = -1.338e-008 (-1.811e-006, 1.784e-006)
> p3 = 7.195e-007 (-2.983e-005, 3.127e-005)
> p4 = 8.171e-006 (-0.001298, 0.001315)
> p5 = -0.0003242 (-0.01082, 0.01017)
> p6 = -0.002373 (-0.2801, 0.2753)
> p7 = -0.02718 (-1.754, 1.699)
> p8 = -0.3535 (-17.13, 16.42)
> p9 = 305.7 (239.8, 371.6)
>
> Anyone can help me to solve this higher polynomial function ? Then compare the result?Thanks a lot

Sigh.

This is an example of using a computer without ever
actually thinking about what you are doing. Just
throw the numbers at a computer, and let it think
for you.

By "solve" here, I assume that you intend to solve for
the roots of the equation

fittedmodel(x) == 0

and you wish to bring your uncertainty in the
coefficients of this model into the process. Thus,
if p1 through p9 are normally distributed, with
95% bounds as given, what might the distribution
of the roots be? (I cannot see any other meaning
for the word solve, but even if that is not your
intended meaning, many of my comments below
will still be meaningful.)

The first (and major) problem is in those bounds.
LOOK AT YOUR RESULTS. Do not just push numbers
through a computer without thinking. As soon as you
stop thinking, you begin to get computer generated
trash. Garbage in, garbage out.

Pick on of those coefficients arbitrarily to look at.

p8 = -0.3535 (-17.13, 16.42)

So this apparently means that the estimated value of
p8 is -0.3535, but with 95% bounds of -17.13 to
+16.42!!!!!!!!!! Do you see that this means p8 may
be essentially ANY number in that range? As such,
it is indistinguishable from zero.

This term should be dropped from your polynomial
model. Were you to learn about regression modeling,
such a course would tell you to drop coefficients with
such large bounds that contain zero from your model.
Start with the highest order terms first of course, then
keep reducing the order of the model until the terms
become statistically different from zero.

The point in all of this, is you should NEVER fit such
a high order polynomial model to data without thinking
about what you are doing. The regression model that
you have generated here is pure, unmitigated garbage.
It is meaningless crapola. The polynomial that you have
is useless. You are over-fitting the problem, with too
high order of a model to achieve meaningful predictions
of any sort.

Next, you forget (or maybe don't actually know) that
those bounds on your coefficients are not independent
bounds. In fact, the coefficients actually have a complete
covariance matrix. So when these bounds are so large,
the covariances will also be huge, and very significant in
any procedure that you later apply.

I should point out that in terms of polynomial modeling,
more is not always better. If a low order fit is nice, but
not good enough, don't just make the order higher and
expect to trust what you get. Just because you can force
the computer to generate arbitrarily high order models
means nothing.

Whenever you use a computer to analyze your data, think
about the results that you get, at every step. Make sure
that you understand the tools you use to do the analysis,
and that you understand the output of those tools. Stop
at every step and plot everything. Look at what you get
to ensure that it is meaningful. Otherwise, expect garbage
like this.

John
From: Walter Roberson on
bo wrote:
> Linear model Poly8:
> fittedmodel1(x) = p1*x^8 + p2*x^7 + p3*x^6 + p4*x^5 +
> p5*x^4 + p6*x^3 + p7*x^2 + p8*x + p9
> Coefficients (with 95% confidence bounds):
> p1 = -8.739e-010 (-4.795e-008, 4.62e-008)
> p2 = -1.338e-008 (-1.811e-006, 1.784e-006)
> p3 = 7.195e-007 (-2.983e-005, 3.127e-005)
> p4 = 8.171e-006 (-0.001298, 0.001315)
> p5 = -0.0003242 (-0.01082, 0.01017)
> p6 = -0.002373 (-0.2801, 0.2753)
> p7 = -0.02718 (-1.754, 1.699)
> p8 = -0.3535 (-17.13, 16.42)
> p9 = 305.7 (239.8, 371.6)
>
> Anyone can help me to solve this higher polynomial function ? Then
> compare the result?Thanks a lot

[27.99708697, 21.78654449+16.78673556*I, -1.715081315+23.37905185*I,
-25.56879926+16.62652042*I, -32.31309110, -25.56879926-16.62652042*I,
-1.715081315-23.37905185*I, 21.78654449-16.78673556*I]

The two real roots fit to within 10^(-6)
From: bo on
"John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <hmljbd$jjt$1(a)fred.mathworks.com>...
> "bo " <bobpong1979(a)hotmail.com> wrote in message <hmlg2s$k88$1(a)fred.mathworks.com>...
> > Linear model Poly8:
> > fittedmodel1(x) = p1*x^8 + p2*x^7 + p3*x^6 + p4*x^5 +
> > p5*x^4 + p6*x^3 + p7*x^2 + p8*x + p9
> > Coefficients (with 95% confidence bounds):
> > p1 = -8.739e-010 (-4.795e-008, 4.62e-008)
> > p2 = -1.338e-008 (-1.811e-006, 1.784e-006)
> > p3 = 7.195e-007 (-2.983e-005, 3.127e-005)
> > p4 = 8.171e-006 (-0.001298, 0.001315)
> > p5 = -0.0003242 (-0.01082, 0.01017)
> > p6 = -0.002373 (-0.2801, 0.2753)
> > p7 = -0.02718 (-1.754, 1.699)
> > p8 = -0.3535 (-17.13, 16.42)
> > p9 = 305.7 (239.8, 371.6)
> >
> > Anyone can help me to solve this higher polynomial function ? Then compare the result?Thanks a lot
>
> Sigh.
>
> This is an example of using a computer without ever
> actually thinking about what you are doing. Just
> throw the numbers at a computer, and let it think
> for you.
>
> By "solve" here, I assume that you intend to solve for
> the roots of the equation
>
> fittedmodel(x) == 0
>
> and you wish to bring your uncertainty in the
> coefficients of this model into the process. Thus,
> if p1 through p9 are normally distributed, with
> 95% bounds as given, what might the distribution
> of the roots be? (I cannot see any other meaning
> for the word solve, but even if that is not your
> intended meaning, many of my comments below
> will still be meaningful.)
>
> The first (and major) problem is in those bounds.
> LOOK AT YOUR RESULTS. Do not just push numbers
> through a computer without thinking. As soon as you
> stop thinking, you begin to get computer generated
> trash. Garbage in, garbage out.
>
> Pick on of those coefficients arbitrarily to look at.
>
> p8 = -0.3535 (-17.13, 16.42)
>
> So this apparently means that the estimated value of
> p8 is -0.3535, but with 95% bounds of -17.13 to
> +16.42!!!!!!!!!! Do you see that this means p8 may
> be essentially ANY number in that range? As such,
> it is indistinguishable from zero.
>
> This term should be dropped from your polynomial
> model. Were you to learn about regression modeling,
> such a course would tell you to drop coefficients with
> such large bounds that contain zero from your model.
> Start with the highest order terms first of course, then
> keep reducing the order of the model until the terms
> become statistically different from zero.
>
> The point in all of this, is you should NEVER fit such
> a high order polynomial model to data without thinking
> about what you are doing. The regression model that
> you have generated here is pure, unmitigated garbage.
> It is meaningless crapola. The polynomial that you have
> is useless. You are over-fitting the problem, with too
> high order of a model to achieve meaningful predictions
> of any sort.
>
> Next, you forget (or maybe don't actually know) that
> those bounds on your coefficients are not independent
> bounds. In fact, the coefficients actually have a complete
> covariance matrix. So when these bounds are so large,
> the covariances will also be huge, and very significant in
> any procedure that you later apply.
>
> I should point out that in terms of polynomial modeling,
> more is not always better. If a low order fit is nice, but
> not good enough, don't just make the order higher and
> expect to trust what you get. Just because you can force
> the computer to generate arbitrarily high order models
> means nothing.
>
> Whenever you use a computer to analyze your data, think
> about the results that you get, at every step. Make sure
> that you understand the tools you use to do the analysis,
> and that you understand the output of those tools. Stop
> at every step and plot everything. Look at what you get
> to ensure that it is meaningful. Otherwise, expect garbage
> like this.
>
> John

Thanks a lot John.But tell you I have only learnt matlab 2 weeks. Have not learnt how to walk but to run already.No choice it is my project.Anyway, thanks for your time and patience.
From: dpb on
bo wrote:
> "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message
> <hmljbd$jjt$1(a)fred.mathworks.com>...

....[a very nice commentary on regression modeling elided only for
brevity]...

> Thanks a lot John.But tell you I have only learnt matlab 2 weeks. Have
> not learnt how to walk but to run already.No choice it is my
> project.Anyway, thanks for your time and patience.


This is _NOT_ a Matlab issue John is addressing. It is the fundamentals
of the problem and the methodology itself. Unless and until you follow
the esteemed John D'E's advice and understand the bases and meaning of
regression modeling and what can (and probably even more importantly
canNOT) be inferred your project is doomed to failure.

Start w/ a tutorial on regression and/or other modeling techniques. If
you must, find the consulting statistics group in your university and
make use of them to at least get pointers to appropriate texts.

--