Sunteți pe pagina 1din 2

Se dau urmatoarele date de observatie de fiabilitate cu 3 parametri

x1, x2 si x3 cu valorile din tabelul urmator:


x1 2 4 7 4 4
x2 5 9 6 2 3
x3 7 5 9 10 6
y 80 60 40 20 10
Utilizand ecuatia matriceala [B] = Inv([XT x X]) x [XT x Y] [B]
unde:
XT este transpusa matricii X ce se construieste corespunzator b0
modelului matematic dorit cu valorile parametrilor xi ; b1
Inv([XT x X]) este inversa matricii obtinute prin inmultirea transpusei b2
matricii X cu matricea X; b3
Y este matricea valorilor de fiabilitate observate ; b12
B este matricea - coloana a coeficientilor modelului dorit; b23
b13
Se doreste un model de forma: b123
y* = b0 + b1x1 + b2x2 + b3x3 +b12x1x2 + b23x2x3 + b13x1x3 + b123x1x2x3
Construim matricea X in conformitate cu modelul
Prima coloana are atatea valori de 1 cate valori sunt observate (5)
A doua coloana corespunde valorilor parametrului x1
A treia coloana corespunde valorilor parametrului x2
A patra coloana corespunde valorilor parametrului x3
Coloanele V, VI si VII corespund valorilor produselor de doi parametri
Coloana VII corespunde valorilor produsului celor trei parametri
X 5x8
I II III IV V VI VII VIII
1 2 5 7 10 35 14 70
1 4 9 5 36 45 20 180
1 7 6 9 42 54 63 378
1 4 2 10 8 20 40 80
1 4 3 6 12 18 24 72
x1 x2 x3 x1x2 x2x3 x1x3 x1x2x3
Obtinem transpusa cu functia TRANSPOSE selectaind in prealabil
5 x 8 celule, apeland apoi functia si selectand matricea ce trebuie
transpusa si apasand in final simultan tastele Ctrl Shift si Enter.
XT 8x5
1 1 1 1 1
2 4 7 4 4
5 9 6 2 3
7 5 9 10 6
10 36 42 8 12
35 45 54 20 18
14 20 63 40 24
70 180 378 80 72
Calculam matricea XT x X utilizand functia MMULT
XT x X 8x5 5 x8 ; Rezulta o matrice 8 x 8
Selectam 8 x 8 campuri si apelam functia MMULT. Dupa selectarea matricilor
XT si X - in aceasta ordine - se apasa simultan tastele Ctrl Shift Enter
si rezulta matricea de mai jos:
XT x X 5 21 25 37 108 172 161 780
[8 x 8] 21 101 108 161 538 780 805 4114
25 108 155 172 678 998 780 4614
37 161 172 291 780 1264 1309 6024
108 538 678 780 3368 4614 4114 24560
172 780 998 1264 4614 6890 6024 33858
161 805 780 1309 4114 6024 6741 33322
780 4114 4614 6024 24560 33858 33322 191768
pe care o inversam cu funtia MINVERSE, selectand in prealabil 8 x 8 celule,apeland apoi
functia, selectand matricea ce trebuie inversata si apasand in final simultan tastele
Ctrl Shift Enter Rezulta matricea Inv([XT x X]) pe care o inmultim cu matricea [XT x Y]
calculata mai jos:
Inv([XT x X]) 6E+16 -1.44732E+16 -5E+16 5.45E+15 1.1E+16 3.89E+15 -1.709E+15 -7.7E+14
-2E+16 3.790451E+15 1.3E+16 -1.4E+15 -3E+15 -1E+15 4.5E+14 2E+14
4E+15 -9.23932E+14 -3E+15 4.77E+14 6.6E+14 1.91E+14 -1.359E+14 -3.8E+13
-1E+16 2.458209E+15 8E+15 -8.9E+14 -2E+15 -6.3E+14 2.778E+14 1.25E+14
-4E+14 1.047404E+14 2.9E+14 -6.4E+13 -7E+13 -1.5E+13 1.735E+13 3E+12
-2E+14 3.655541E+13 1.4E+14 -3.9E+13 -3E+13 -7.2E+12 1.042E+13 1.36E+12
3E+15 -6.59311E+14 -2E+15 2.41E+14 4.9E+14 1.7E+14 -7.534E+13 -3.4E+13
-8E+13 1.72573E+13 5.4E+13 -1.8E+12 -1E+13 -5E+12 8.733E+11 1E+12
Se utilizeaza functia MMULT
Y XT x Y [B] = Inv([XT x X]) x [XT x Y]
80 210 [B] Rezulta coeficientii:
60 800 b0 -94208
40 1250 b1 5120 x1
20 1480 b2 3328 x2
10 4920 b3 512 x3
8240 b12 -736 x1x2
5880 b23 88 x2x3
33840 b13 512 x1x3
b123 12 x1x2x3

x1 2 4 7 4 4
x2 5 9 6 2 3
x3 7 5 9 10 6
y 80 60 40 20 10

Tema
De construit matricile si de refacut calcule pentru un model
y** = b0 + b1x1 + b2x2 + b3x3+b11x1^2+b22x2^2+b33x3^2
Matricea inversa va fi de tip 7 x 7

S-ar putea să vă placă și