Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

05.2.1. Mínimos Cuadrados - Multivariable

Descargar como xlsx, pdf o txt
Descargar como xlsx, pdf o txt
Está en la página 1de 18

1 x x^2 y y* e=y-y* ||y-y*||^2

1 0.2 0.04 1.44 1.44 -6E-15 3.0815E-29


1 0.5 0.25 0.75 0.75 0 0
1 0.7 0.49 0.39 0.39 0 0
1 1 1 0 -9E-15 8.88E-15 7.8886E-29
Suma 1.3278E-28
1 1 1 1
At= 0.2 0.5 0.7 1
0.04 0.25 0.49 1

4 2.4 1.78
AtA= 2.4 1.78 1.476
1.78 1.476 1.3042

4.66993 -16.4314 12.2222


(AtA)^-1= -16.4314 66.9412 -53.3333
12.2222 -53.3333 44.4444

2.58 β= (AtA)^-1Aty
Aty= 0.936 2
0.4362 β= -3
1
y*∙e
-8E-15
0
0
-8E-29
||e||= 1.15E-14 -2E-14
1 x y x2 xy y2
n 2 3 4 1 2 1
1 0.9 1.8 0.81 1.62 3.24
2 0.91 1.81 0.8281 1.6471 3.2761
3 0.9 1.82 0.81 1.638 3.3124
4 0.95 1.8 0.9025 1.71 3.24
5 0.89 1.79 0.7921 1.5931 3.2041
6 0.88 1.78 0.7744 1.5664 3.1684
7 0.88 1.79 0.7744 1.5752 3.2041
8 0.92 1.81 0.8464 1.6652 3.2761
9 0.91 1.77 0.8281 1.6107 3.1329
10 0.94 1.82 0.8836 1.7108 3.3124

En una placa se registra la temperatura w en función de x e y


Hallar la mejor aproximación por el modelo: w=a+bx+cy
x y w
0.9 1.8 20.65
0.91 1.81 20.6
0.9 1.82 20.88
0.95 1.8 21.02
0.89 1.79 20.49
0.88 1.78 19.71
0.88 1.79 19.64
0.92 1.81 20.36
0.91 1.77 20.27
0.94 1.82 20.57
x3 f(x,y) w
2
0.729 18.648 20.65 18.65
0.753571 18.5799803 20.6 18.6
0.729 18.8830177 20.88 18.88
0.857375 19.0202074 21.02 19.02
0.704969 18.492278 20.49 18.49
0.681472 17.7105212 19.71 17.71
0.681472 17.6439632 19.64 17.64
0.778688 18.3555813 20.36 18.36
0.753571 18.2744319 20.27 18.27
0.830584 18.5674167 20.57 18.57
En una placa se registra la temperatura w en función de x e y
Hallar la mejor aproximación por el modelo: w=a+bx+cy

n 1 x y w w*=Aβ e=w-w*
1 1 0.9 1.8 18.65 18.348746702 0.301253298
2 1 0.91 1.81 18.6 18.542532981 0.057467019
3 1 0.9 1.82 18.88 18.537137203 0.342862797
4 1 0.95 1.8 19.02 18.846701847 0.173298153
5 1 0.89 1.79 18.49 18.154960422 0.335039578
6 1 0.88 1.78 17.71 17.961174142 -0.25117414
7 1 0.88 1.79 17.64 18.055369393 -0.41536939
8 1 0.92 1.81 18.36 18.642124011 -0.28212401
9 1 0.91 1.77 18.27 18.165751979 0.104248021
10 1 0.94 1.82 18.57 18.935501319 -0.36550132
Suma=

1 2 3 4 5 6
1 1 1 1 1 1
At= 0.9 0.91 0.9 0.95 0.89 0.88
1.8 1.81 1.82 1.8 1.79 1.78

10 9.08 17.99
AtA= 9.08 8.2496 16.3365
17.99 16.3365 32.3665

1313.64 59.0116 -759.935


(AtA)^-1= 59.0116 252.689 -160.341
-759.935 -160.341 503.349

184.19 -7.56959103
Atw= 167.309 β= (AtA)^-1Aty= 9.959102902
331.397 9.419525066

𝑦=−7.56959103+9.959102
En una placa se registra la temperatura w en función de x e y
Hallar la mejor aproximación por el modelo: w=a+bx+cy
||w-w*||^2 x y w
0.09075355 0.9 1.8 18.65
0.003302458 0.91 1.81 18.6
0.117554897 0.9 1.82 18.88
0.03003225 0.95 1.8 19.02
0.112251519 0.89 1.79 18.49
0.06308845 0.88 1.78 17.71
0.172531733 0.88 1.79 17.64
0.079593957 0.92 1.81 18.36
0.01086765 0.91 1.77 18.27
0.133591214 0.94 1.82 18.57
0.813567678

7 8 9 10
1 1 1 1
0.88 0.92 0.91 0.94
1.79 1.81 1.77 1.82

9103+9.9591029𝑥+9.41952507𝑦
En una placa se registra la temperatura w en función de x e y
Hallar la mejor aproximación por el modelo: w=a+bx+cy+dx^2+exy+fy^2
x y w w*=Aβ e=w-w* ||w-w*||^2
0.9 1.8 18.65
0.91 1.81 18.6
0.9 1.82 18.88
0.95 1.8 19.02
0.89 1.79 18.49
0.88 1.78 17.71
0.88 1.79 17.64
0.92 1.81 18.36
0.91 1.77 18.27
0.94 1.82 18.57

n 1 x y x2 xy y2 w
1 1 0.9 1.8 0.81 1.62 3.24 18.65
2 1 0.91 1.81 0.8281 1.6471 3.2761 18.6
3 1 0.9 1.82 0.81 1.638 3.3124 18.88
4 1 0.95 1.8 0.9025 1.71 3.24 19.02
5 1 0.89 1.79 0.7921 1.5931 3.2041 18.49
6 1 0.88 1.78 0.7744 1.5664 3.1684 17.71
7 1 0.88 1.79 0.7744 1.5752 3.2041 17.64
8 1 0.92 1.81 0.8464 1.6652 3.2761 18.36
9 1 0.91 1.77 0.8281 1.6107 3.1329 18.27
10 1 0.94 1.82 0.8836 1.7108 3.3124 18.57

1 2 3 4 5 6 7
1 1 1 1 1 1 1
0.9 0.91 0.9 0.95 0.89 0.88 0.88
1.8 1.81 1.82 1.8 1.79 1.78 1.79
At= 0.81 0.8281 0.81 0.9025 0.7921 0.7744 0.7744
1.62 1.6471 1.638 1.71 1.5931 1.5664 1.5752
3.24 3.2761 3.3124 3.24 3.2041 3.1684 3.2041

10 9.08 17.99 8.2496 16.3365 32.3665


9.08 8.2496 16.3365 7.499702 14.843901 29.394467
17.99 16.3365 32.3665 14.843901 29.394467 58.236281
AtA= 8.2496 7.499702 14.843901 6.8221605 13.495877 26.711396
16.3365 14.843901 29.394467 13.495877 26.711396 52.893885
32.3665 29.394467 58.236281 26.711396 52.893885 104.79118

24270850 -4274080 -24862190 1511322 830949.82 6714607


-4274080 5183954 2134797 42441.17 -2924268 144831.57
(AtA)^-1= -24862190 2134797 26604122 -1706652 557525.11 -7550987
1511322 42441.177 -1706652 838590.21 -877404 698863.3
830949.93 -2924268 557525 -877404 2518618 -793852
6714607 144831.61 -7550987 698863.31 -793852 2304374

184.19
167.3088
Atw= 331.397 β= (AtA)^-1Aty=
152.06622
301.05271
596.29942

𝑦=−1481+1516.305𝑥+887.4108𝑦+2
w*=Aβ e=w-w* ||w-w*||^2
18.48815 0.1618543 0.0261968
18.650524 -0.050524 0.00255264
18.801533 0.0784668 0.00615703
18.982467 0.037533 0.00140873
18.152949 0.3370515 0.1136037
17.644919 0.0650811 0.00423555
17.987242 -0.347242 0.12057694
18.658381 -0.298381 0.08903136
18.325939 -0.055939 0.00312919
18.497935 0.0720647 0.00519332
Suma= 0.37208386
8 9 10
1 1 1
0.92 0.91 0.94
1.81 1.77 1.82
0.8464 0.8281 0.8836
1.6652 1.6107 1.7108
3.2761 3.1329 3.3124

det= 4.269E-23

-1481
1516.305
887.411
24.162583
-861.733
-26.56964

+887.4108𝑦+24.1626𝑥^2−861.733𝑥𝑦−265696𝑦^2
En una placa se registra la temperatura w en función de x e y
Hallar la mejor aproximación por el modelo: w=a+bx+cy+dx^2+exy+fy^2+()x^3+()x^2y+()xy^2+()y^3
x y w w*=Aβ e=w-w* ||w-w*||^2
0.9 1.8 18.65
0.91 1.81 18.6
0.9 1.82 18.88
0.95 1.8 19.02
0.89 1.79 18.49
0.88 1.78 17.71
0.88 1.79 17.64
0.92 1.81 18.36
0.91 1.77 18.27
0.94 1.82 18.57

n 1 x y x2 xy y2 x3
1 1 0.9 1.8 0.81 1.62 3.24 0.729
2 1 0.91 1.81 0.8281 1.6471 3.2761 0.753571
3 1 0.9 1.82 0.81 1.638 3.3124 0.729
4 1 0.95 1.8 0.9025 1.71 3.24 0.857375
5 1 0.89 1.79 0.7921 1.5931 3.2041 0.704969
6 1 0.88 1.78 0.7744 1.5664 3.1684 0.681472
7 1 0.88 1.79 0.7744 1.5752 3.2041 0.681472
8 1 0.92 1.81 0.8464 1.6652 3.2761 0.778688
9 1 0.91 1.77 0.8281 1.6107 3.1329 0.753571
10 1 0.94 1.82 0.8836 1.7108 3.3124 0.830584

1 2 3 4 5 6 7
1 1 1 1 1 1 1 1
2 0.9 0.91 0.9 0.95 0.89 0.88 0.88
3 1.8 1.81 1.82 1.8 1.79 1.78 1.79
4 At= 0.81 0.8281 0.81 0.9025 0.7921 0.7744 0.7744
5 1.62 1.6471 1.638 1.71 1.5931 1.5664 1.5752
6 3.24 3.2761 3.3124 3.24 3.2041 3.1684 3.2041
7 0.729 0.753571 0.729 0.857375 0.704969 0.681472 0.681472
8 1.458 1.498861 1.4742 1.6245 1.417859 1.378432 1.386176
9 2.916 2.981251 2.98116 3.078 2.851649 2.788192 2.819608
10 5.832 5.929741 6.028568 5.832 5.735339 5.639752 5.735339

1 10 9.08 17.99 8.2496 16.3365 32.3665 7.499702


2 9.08 8.2496 16.3365 7.499702 14.843901 29.394467 6.82216052
3 17.99 16.3365 32.3665 14.843901 29.394467 58.236281 13.49587689
4 8.2496 7.499702 14.843901 6.8221605 13.495877 26.711396 6.2096805518
5 AtA= 16.3365 14.843901 29.394467 13.495877 26.711396 52.893885 12.277809768
6 32.3665 29.394467 58.236281 26.711396 52.893885 104.79118 24.28798883
7 7.499702 6.8221605 13.495877 6.2096806 12.27781 24.287989 5.6557266416
8 14.843901 13.495877 26.711396 12.27781 24.287989 48.070474 11.176607029
9 29.394467 26.711396 52.893885 24.287989 48.070474 95.187199 22.098009797
10 58.236281 52.893885 104.79118 48.070474 95.187199 188.57712 43.713465201

1 1.949E+13 -1.72E+12 -3.17E+13 -5.46E+12 7.405E+12 1.577E+13 -3.19467E+11


2 -1.46E+12 6.969E+11 2.096E+12 7.06E+11 -1.49E+12 -7.94E+11 137712211325
3 -3.18E+13 2.522E+12 5.185E+13 8.763E+12 -1.16E+13 -2.59E+13 465086984282
4 -5.27E+12 7.614E+11 8.421E+12 1.799E+12 -2.66E+12 -4E+12 155466787862
5 (AtA)^-1= 6.93E+12 -1.54E+12 -1.08E+13 -2.6E+12 4.333E+12 4.926E+12 -3.10067E+11
6 1.596E+13 -1E+12 -2.61E+13 -4.23E+12 5.383E+12 1.32E+13 -1.81302E+11
7 -2.64E+11 1.37E+11 3.723E+11 1.429E+11 -3E+11 -1.33E+11 33694701241
8 3.337E+12 -6.32E+11 -5.26E+12 -1.22E+12 1.931E+12 2.442E+12 -1.37768E+11
9 -3.61E+12 7.484E+11 5.654E+12 1.337E+12 -2.18E+12 -2.6E+12 155880216940
10 -2.36E+12 6.334E+10 3.902E+12 5.599E+11 -6.33E+11 -2E+12 7531282993

1 184.19
2 167.3088
3 331.397
4 152.06622
5 Atw= 301.05271
6 596.29942 β= (AtA)^-1Aty=
7 138.29637
8 273.65141
9 541.75079
10 1073.0338
2y+()xy^2+()y^3

x2y xy2 y3 w w*=Aβ e=w-w* ||w-w*||^2


1.458 2.916 5.832 18.65 11.27420294 -8.929670898 79.7390224
1.498861 2.981251 5.929741 18.6 11.28438151 7.3156184932 53.5182739
1.4742 2.98116 6.028568 18.88 11.60178144 7.2782185581 52.9724654
1.6245 3.078 5.832 19.02 11.72819183 7.2918081741 53.1704664
1.417859 2.851649 5.735339 18.49 11.03385337 7.45614663 55.5941226
1.378432 2.788192 5.639752 17.71 10.19255147 7.5174485312 56.5120324
1.386176 2.819608 5.735339 17.64 10.17050128 7.4694987187 55.7934111
1.531984 3.014012 5.929741 18.36 11.06575682 7.2942431758 53.2059835
1.465737 2.850939 5.545233 18.27 10.75468451 7.5153154932 56.479967
1.608152 3.113656 6.028568 18.57 11.36511088 7.2048891197 51.9104272
Suma= 58.236281 Suma 792.494003
8 9 10
1 1 1
0.92 0.91 0.94
1.81 1.77 1.82
0.8464 0.8281 0.8836
1.6652 1.6107 1.7108
3.2761 3.1329 3.3124
0.778688 0.753571 0.830584
1.531984 1.465737 1.608152
3.014012 2.850939 3.113656
5.929741 5.545233 6.028568

14.843901 29.394467 58.236281


13.495877 26.711396 52.893885
26.711396 52.893885 104.79118
12.27781 24.287989 48.070474
24.287989 48.070474 95.187199 det= 4.392379E-66
48.070474 95.187199 188.57712
11.176607 22.09801 43.713465
22.09801 43.713465 86.515394
43.713465 86.515394 171.31079
86.515394 171.31079 339.38001

3.526E+12 -3.84E+12 -2.28E+12


-6E+11 7.178E+11 2.707E+10
-5.59E+12 6.05E+12 3.798E+12
-1.24E+12 1.364E+12 5.172E+11
1.917E+12 -2.17E+12 -5.5E+11
2.63E+12 -2.82E+12 -2E+12
-1.31E+11 1.486E+11 -2E+08
8.879E+11 -9.85E+11 -2.88E+11
-9.81E+11 1.102E+12 2.979E+11
-3.23E+11 3.391E+11 3.165E+11

-198168.5
78119.656
291383
-82403.25
-2902.75
-161608
39650.95
-14787.19
8332.6875
28600.438
En una placa se registra la temperatura w en función de x e y
Hallar la mejor aproximación por el modelo: w=a+bx+cy+dx^2+exy+fy^2+()x^3+()x^2y+()xy^2+()y^3
x y w w*=Aβ e=w-w* ||w-w*||^2
0.9 1.8 18.65
0.91 1.81 18.6
0.9 1.82 18.88
0.95 1.8 19.02
0.89 1.79 18.49
0.88 1.78 17.71
0.88 1.79 17.64
0.92 1.81 18.36
0.91 1.77 18.27
0.94 1.82 18.57

n 1 x y x2 xy y2 x3
1 1 0.9 1.8 0.81 1.62 3.24 0.729
2 1 0.91 1.81 0.8281 1.6471 3.2761 0.753571
3 1 0.9 1.82 0.81 1.638 3.3124 0.729
4 1 0.95 1.8 0.9025 1.71 3.24 0.857375
5 1 0.89 1.79 0.7921 1.5931 3.2041 0.704969
6 1 0.88 1.78 0.7744 1.5664 3.1684 0.681472
7 1 0.88 1.79 0.7744 1.5752 3.2041 0.681472
8 1 0.92 1.81 0.8464 1.6652 3.2761 0.778688
9 1 0.91 1.77 0.8281 1.6107 3.1329 0.753571
10 1 0.94 1.82 0.8836 1.7108 3.3124 0.830584

1 2 3 4 5 6 7
1 1 1 1 1 1 1 1
2 0.9 0.91 0.9 0.95 0.89 0.88 0.88
3 1.8 1.81 1.82 1.8 1.79 1.78 1.79
4 At= 0.81 0.8281 0.81 0.9025 0.7921 0.7744 0.7744
5 1.62 1.6471 1.638 1.71 1.5931 1.5664 1.5752
6 3.24 3.2761 3.3124 3.24 3.2041 3.1684 3.2041
7 0.729 0.753571 0.729 0.857375 0.704969 0.681472 0.681472

1 10 9.08 17.99 8.2496 16.3365 32.3665 7.499702


2 9.08 8.2496 16.3365 7.499702 14.843901 29.394467 6.82216052
3 17.99 16.3365 32.3665 14.843901 29.394467 58.236281 13.49587689
4 AtA= 8.2496 7.499702 14.843901 6.8221605 13.495877 26.711396 6.2096805518
5 16.3365 14.843901 29.394467 13.495877 26.711396 52.893885 12.277809768
6 32.3665 29.394467 58.236281 26.711396 52.893885 104.79118 24.28798883
7 7.499702 6.8221605 13.495877 6.2096806 12.27781 24.287989 5.6557266416
1 2.46E+09 -8.42E+09 92912178 9.387E+09 -91889538 -2616270 -3418655869
2 -8.42E+09 2.911E+10 -4.05E+08 -3.24E+10 317606430 32401267 11818144850
3 92912206 -4.05E+08 32299353 452171679 -3926172 -8002201 -165316399.7
4 9.387E+09 -3.24E+10 452171583 3.617E+10 -3.58E+08 -35260420 -13174797865
5 (AtA)^-1= -91889591317606609 -3926174 -3.58E+08 6048509 -438623 130149052
6 -2616264 32401247 -8002201 -35260397 -438623 2340122 13097464.912
7 -3.42E+09 1.182E+10 -1.65E+08 -1.32E+10 130148980 13097473 4798665182

1 184.19
2 167.3088
3 331.397
4 Atw= 152.06622 β= (AtA)^-1Aty=
5 301.05271
6 596.29942
7 138.29637
2y+()xy^2+()y^3

w*=Aβ e=w-w* ||w-w*||^2

w w*=Aβ e=w-w* ||w-w*||^2


18.65 18.689148 -0.037712 0.001422202
18.6 18.609718 -0.009718 9.44485E-05
18.88 18.86817 0.0118301 0.000139952
19.02 19.013305 0.0066955 4.48296E-05
18.49 18.46451 0.02549 0.000649741
17.71 17.684416 0.0255836 0.00065452
17.64 17.675109 -0.035109 0.001232655
18.36 18.324396 0.0356041 0.00126765
18.27 18.282284 -0.012284 0.000150891
18.57 18.591962 -0.021962 0.000482325
Suma= 0.006139214
8 9 10
1 1 1
0.92 0.91 0.94
1.81 1.77 1.82
0.8464 0.8281 0.8836
1.6652 1.6107 1.7108
3.2761 3.1329 3.3124
0.778688 0.753571 0.830584

det= 8.897E-33
-31330
104702.86
-555.9991
-115008
274.62399
87.786902
41898.091

También podría gustarte