       • To: mathgroup at smc.vnet.net
• Subject: [mg53039] Re: please solve [LinearAlgebra]
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Tue, 21 Dec 2004 05:19:16 -0500 (EST)
• Organization: The University of Western Australia
• References: <cprk0m\$r87\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <cprk0m\$r87\$1 at smc.vnet.net>, rcmcll at yahoo.com wrote:

> Could someone please solve this symbolically?
> This is just the ols formula for beta-hat but I need a symbolic
> solution for this special case.
>
> b = inv(x'x)x'y
>
> where
>
> x =  1  t  t^2
> 1  t  t^2
> 1  t  t^2
>
>
> and simplify simplify simplify!!

For a singular matrix you need to compute the PseudoInverse:

X = Table[t^(i-1), {3}, {i, 3}]

Y = Table[y[i], {i, 3}]

b = PseudoInverse[X] . Y // Simplify

Assuming that t is real, you obtain

Simplify[b, Element[t, Reals]]

{    (y + y + y)/(3 (t^4 + t^2 + 1)),
t  (y + y + y)/(3 (t^4 + t^2 + 1)),
t^2 (y + y + y)/(3 (t^4 + t^2 + 1))}

You get exactly the same result if you compute

PseudoInverse[Transpose[X] . X] . Transpose[X] . Y

and simplify.

In 5.1, if you paste the following cell into a Notebook and click on the
button it will take you to the advanced documentation:

Cell[TextData[{"See the ",
on pseudoinverse in the Basic Operations section of Section 4."}],
"Text"]

Cheers,
Paul

--
Paul Abbott                                   Phone: +61 8 6488 2734
School of Physics, M013                         Fax: +61 8 6488 1014
The University of Western Australia      (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

```

• Prev by Date: Re: Re: finite domains
• Next by Date: Re: All Factors of a number