beautypg.com

Multiple linear fitting, Multiple linear fitting ,18-57 – HP 50g Graphing Calculator User Manual

Page 624

background image

Page 18-57

Multiple linear fitting

Consider a data set of the form

Suppose that we search for a data fitting of the form y = b

0

+ b

1

⋅x

1

+ b

2

⋅x

2

+

b

3

⋅x

3

+ … + b

n

⋅x

n

. You can obtain the least-square approximation to the

values of the coefficients b = [b

0

b

1

b

2

b

3

… b

n

], by putting together the

matrix X:

_

_

_

_

Then, the vector of coefficients is obtained from b = (X

T

X)

-1

X

T

y, where y is

the vector y = [y

1

y

2

… y

m

]

T

.

For example, use the following data to obtain the multiple linear fitting

y = b

0

+ b

1

⋅x

1

+ b

2

⋅x

2

+ b

3

⋅x

3,

x

1

x

2

x

3

x

n

y

x

11

x

21

x

31

x

n1

y

1

x

12

x

22

x

32

x

n2

y

2

x

13

x

32

x

33

x

n3

y

3

.

.

.

.

.

.

.

.

.

.

.

x

1,m-1

x

2,m-1

x

3,m-1

x

n,m-1

y

m-1

x

1,m

x

2,m

x

3,m

x

n,m

y

m

1

x

11

x

21

x

31

x

n1

1

x

12

x

22

x

32

x

n2

1

x

13

x

32

x

33

x

n3

.

.

.

.

.

.

.

.

.

.

.

1

x

1,m

x

2,m

x

3,m

x

n,m