Dat Auto (Auto.ls) mpg cylders dsplacemet horsepower weght accelerato year org ame 8.0 8 307.0 30 3504.0 70 chevrolet chevelle malbu 5.0 8 350.0 65 3693.5 70 buck skylark 30 3 8.0 8 38.0 50 3436.0 70 plymouth satellte 4 6.0 8 304.0 50 3433.0 70 amc rebel sst 5 7.0 8 30.0 40 3449 0.5 70 ford toro 6 5.0 8 49.0 98 434 0.0 70 ford galae 500 7 4.0 8 454.0 0 4354 9.0 70 chevrolet mpala 8 4.0 8 440.0 5 43 8.5 70 plymouth fury 9 4.0 8 455.0 5 445 0.0 70 potac catala 0 5.0 8 390.0 90 3850 8.5 70 amc ambassador dpl 5.0 8 383.0 70 3563 0.0 70 dodge challeger se 4.0 8 340.0 60 3609 8.0 70 plymouth 'cuda 340 3 5.0 8 400.0 50 376 9.5 70 chevrolet mote carlo 4 4.0 8 455.0 5 3086 0.0 70 buck estate wago (sw) 5 4.0 4 3.0 95 37 5.0 70 3 toyota coroa mark 6.0 6 98.0 95 833 5.5 70 plymouth duster 7 8.0 6 99.0 97 774 5.5 70 amc horet 8.0 6 00.0 85 587 6.0 70 ford maverck 9 7.0 4 97.0 88 30 4.5 70 3 datsu pl50 0 6.0 4 97.0 46 835 0.5 70 volkswage 3 delue seda 5.0 4 0.0 87 67 7.5 70 peugeot 504 4.0 4 07.0 90 430 4.5 70 aud 00 ls 3 5.0 4 04.0 95 375 7.5 70 saab 99e 4 6.0 4.0 3 34.5 70 bmw 00 5.0 6 99.0 90 648 5.0 70 amc greml 6 0.0 8 360.0 5 465 4.0 70 ford f50 7 0.0 8 307.0 00 4376 5.0 70 chevy c0 8.0 8 38.0 0 438 3.5 70 dodge d00
Dat Auto (Auto.tt) mpg cylders dsplacemet horsepower weght accelerato year org ame 37 9.0 4 35.0 84 55 6.0 8 dodge ares se 373 7.0 4 5.0 90 735 8.0 8 potac phoe 374 4.0 4 40.0 9 865 6.4 8 ford farmot futura 375 36.0 4 05.0 74 980 5.3 8 volkswage rabbt 376 37.0 4 9.0 68 05 8. 8 3 mazda glc custom l 377 3.0 4 9.0 68 970 7.6 8 3 mazda glc custom 378 38.0 4 05.0 63 5 4.7 8 plymouth horzo mser 379 36.0 4 98.0 70 5 7.3 8 mercury ly l 380 36.0 4 0.0 88 60 4.5 8 3 ssa staza e 38 36.0 4 07.0 75 05 4.5 8 3 hoda accord 38 34.0 4 08.0 70 45 6.9 8 3 toyota corolla 383 38.0 4 9.0 67 965 5.0 8 3 hoda 384 3.0 4 9.0 67 965 5.7 8 3 hoda cvc (auto) 385 38.0 4 9.0 67 995 6. 8 3 datsu 30 g 386 5.0 6 8.0 0 945 6.4 8 buck 387 38.0 6 6.0 85 305 7.0 8 oldsmoble cutlass cera 388 6.0 4 56.0 9 585 4.5 8 chrysler lebaro medallo 389.0 6 3.0 835 4.7 8 ford graada l 390 3.0 4 44.0 96 665 3.9 8 3 toyota celca gt 39 36.0 4 35.0 84 370 3.0 8 dodge charger. 39 7.0 4 5.0 90 950 7.3 8 chevrolet camaro 393 7.0 4 40.0 86 790 5.6 8 ford mustag gl 394 44.0 4 97.0 5 30 4.6 8 vw pckup 395 3.0 4 35.0 84 95.6 8 dodge rampage 396 8.0 4 0.0 79 65 8.6 8 ford rager 397 3.0 4 9.0 8 70 9.4 8 chevy s-0
Dat Auto (Auto.tt) Regresso: Mpg vs Dsplacemet Gova Latorre 3
Dat Auto (Auto.tt) Regresso: Mpg vs Dsplacemet R Retta d Regressoe: Mpg = 35. - 0.06 Dsplacemet R = 0.648 Gova Latorre 4
Dat Auto (Auto.tt) Regresso: Mpg vs Dsplacemet Resduals vs Dsplacemet Resdu formatv Gova Latorre 5
Dat Auto (Auto.tt) Regresso: Mpg vs Dsplacemet Resduals vs Ftted Mpg Resdu formatv Gova Latorre 6
Dat Auto (Auto.tt) Regresso: Mpg vs Dsplacemet Gova Latorre 7
Dat Auto (Auto.tt) Regresso: Mpg vs Dsplacemet Curva d Regressoe: Mpg = 4 0.379 Dsplacemet + + 0.000 Dsplacemet R = 0.6888 G. Latorre 8
Dat Auto (Auto.tt) Curva d Regressoe: Mpg vs Dsplacemet Resduals vs Dsplacemet Resdu o formatv G. Latorre 9
Dat Auto (Auto.tt) Curva d Regressoe: Mpg vs Dsplacemet Resduals vs Ftted Mpg Resdu o formatv G. Latorre 0
Dat Auto (Auto.tt) Regresso: Mpg vs Weght Gova Latorre
Dat Auto (Auto.tt) Regresso: Mpg vs Weght Retta d Regressoe: Mpg = 46. - 0.0076 Weght R = 0.696 Gova Latorre
Dat Auto (Auto.tt) Regresso: Mpg vs Weght Resduals vs Weght Resdu formatv Gova Latorre 3
Dat Auto (Auto.tt) Regresso: Mpg vs Weght Resduals vs Ftted Mpg Resdu formatv Gova Latorre 4
Dat Auto (Auto.tt) Regresso: Mpg vs Weght Gova Latorre 5
Dat Auto (Auto.tt) Regresso: Mpg vs Weght Curva d Regressoe: Mpg = 6 0.085 Weght + + 0.00000 Weght R = 0.75 G. Latorre 6
Dat Auto (Auto.tt) Curva d Regressoe: Mpg vs Weght Resduals vs Weght Resdu o formatv G. Latorre 7
Dat Auto (Auto.tt) Curva d Regressoe: Mpg vs Weght Resduals vs Ftted Mpg Resdu o formatv G. Latorre 8
Estesoe o leare Soo chamat strettamete lear modell e qual sa le varabl che parametr compaoo alla I^ poteza; esemp: Y = a + b X Y = a + b X + c X Soo chamat lear modell e qual solo parametr soo alla I^ poteza; esempo: Y = a + b X + c X = f(x) G. Latorre Parabola d equazoe: Y = -3 + 5X - X 9
Per determare a, b, e c Y = a + b X + c X () basta porre: X = X e X = X e determare a, b, e c Y = a + b X + c X () co la metodologa de modell multvarat. Nota: ) Modello leare (solo parametr soo alla I^ poteza); ) Modello strettamete leare (parametr e varabl soo etramb alla I^ poteza). G. Latorre 0
X=Dose d fertlzzate, Y= Raccolto medo d grao, 00 appezzamet d terreo X Y X Y X Y X Y,4,89 0,83 0,54 4,78 6,9 4,36 9,58 3,0 4,9 3,3,5 3,80, 3,57,,96 3,8 4,80 8,,90,43 4,57 8,3,74,34,63,33 5, 4,35,99 4,9,74 3,48 3,78,5,0,85,49 4,45 3,00 3,98,67 3,90,50,36 5,4,85 3,5,7 4,06 0,7,68,,86,6 3,07 5,9 5,5 5,98 3,3 3,46 3,7,4 4,3 8,8 3,97,49 5,43 3,5,48 3,3,75,57 4,78 7,69,43,53,8 4,03,40 3,98 3,4, 4,59 6,68 4,45 0,33 4,96 6,80 4,97 7,54 3,85 0,93 0,7 0, 3,46 3,36 3,9 3,55 0,86 0,8 3,08,9,76,43 0,80 0,7,34,53,48,0,4,4,8 0,8 5,45 3,60 3,76,8 3,97,0,0 4,9,59,4 4,7 7,69,9,9 0,53 7,33 3,58,86 0,65 9,03 5,07 5,08 0,88 9,3 5,48 3,09 0,96 0,6,9 3,39,36 4,08,45 3,0,79 3,47 5,0 7,8,38 3,0 4,03,69 0,79 0,8 4,84 6,83 3,57 3,54 0,8 9,73,64 3,0 3,4,44 4,3 9,5 0,75 9,44,43 4,0,4 3,07 3,68,88 4,4,46 0,7 9,38 3,37,4 4,86 6,73 G. Latorre 3,64,06,7,39 0,65 9,7 3,8 4,0,70 3,45,35,85
Stma del Modello: Y = a + b X M(X)=,9 M(Y)= 0,89 V(X)=,0 V(Y)= 8,06 Cov(X,Y)= -,06 b'= -,0 a'= 3,96 Modello Stmato: Y = 3,96 -,0 X G. Latorre
Y' e=y-y' Y' e=y-y' Y' e=y-y' Y' e=y-y',67, 3, -,57 9,08 -,89 9,5 0,07 0,88 4,04 0,76,75 0,08,03 0,3,90,96,85 9,06-0,84,0-0,59 9,9 -,6,8-0,84,9-0,96 8,63-4,8,93,36,6,3 0,0,4,7,4,44,0 0,89 3,09,3,67,4 0,95 8,4-5,57 0,64,63 9,8 0,90,4-0,,06 0,0 0,8 4,37 8,70 -,7 0,76,70 0,6,08 9,56-0,75 9,90,59 8,4-4,89,45 0,68,7 0,40 9,08 -,39,48,05,,9,5,47 0,47,65 9,7 -,59 9,4 0,9 8,89 -,09 8,88 -,34 0,03 0,90 3, -3,00 0,4,94 0,70,85 3,08 -,90 0,8,,6 0,7 3,4 -,4,59 -,06,43 0,58,5-0,,75 -,94 8,39-4,79 0,,69 9,90,,90,39,34 0,08 9,4 -,45 0,99,30 3,4-6,09 0,30,56 3,30-4,7 8,78-3,70 3,06-3,83 8,36-5,7,98 -,37 0,98,4,55,53,46,55,3,34 8,83 -,65,55 0,46 9,84,85 3,5 -,87 9,0 -,8 0,3 3,3 3, -3,39,8 0,73 0,48,96 9,74-0,3 3,9-3,75,48,53,50,57 0,0,68 9,63,83 3,3-3,85 0,5,90 8,99 -,6 0,4 0,8,8-9,79 3,30-3,58 0,7 3,3,,3,58-0,73 M(Y')= 0,99 M(e)= 0,00 V(Y')=,0 V(e)= 5,96 V(Y')+V(e)= 8,06 R = 0,6 G. Latorre 3
Aals de Resdu 6,00 e 4,00,00 0,00 0,00,00,00 3,00 4,00 5,00 6,00 -,00 X -4,00-6,00-8,00 G. Latorre 4
Aals de Resdu 6,00 e 4,00,00 0,00 7,50 8,50 9,50 0,50,50,50 3,50 Y -,00-4,00-6,00-8,00 G. Latorre 5
Dagramma scatter delle coppe d valor (, y ) 6,00 Y 4,00,00 0,00 8,00 6,00 4,00,00 G. Latorre 6 0,00 0,00,00,00 3,00 4,00 5,00 6,00 X
Dagramma scatter delle coppe d valor (, y ) e Retta d Regressoe: Y = 3,96,0 X 6,00 Y 4,00,00 0,00 8,00 6,00 4,00,00 G. Latorre 7 0,00 0,00,00,00 3,00 4,00 5,00 6,00 X
Stma del Modello: Y = a + b X + c X Poedo: X = X, X = X avremo: Y = a + b X + c X M(X)=,9 M(X)= 0,45 M(Y)= 0,99 V(X)=,0 V(X)= 74,38 V(Y)= 8,06 Cov(X,Y)= -,06 Cov(X,Y)= -6,5 Cov(X,X )=,94 a'= 5,7 b'= 6,9 c'= -, Modello Stmato: Y = 5,7 + 6,9 X, X G. Latorre 8
Valor caratterstc del Modello Stmato M(Y')= 0,99 M(e)= 0,00 V(Y')= 7,35 V(e)= 0,7 V(Y')+V(e)= 8,06 R^= 0,9 G. Latorre 9
Dagramma scatter delle coppe d valor (, y ) 6,00 4,00,00 0,00 8,00 6,00 4,00,00 G. Latorre 30 0,00 0,00,00,00 3,00 4,00 5,00 6,00
Dagramma scatter delle coppe d valor (, y ) e Modello d Regressoe: Y = 5,7 + 6,9 X, X 6,00 4,00,00 0,00 8,00 6,00 4,00,00 G. Latorre 3 0,00 0,00,00,00 3,00 4,00 5,00 6,00
,50 e Aals de Resdu,00,50,00 0,50 X 0,00 0,00,00,00 3,00 4,00 5,00 6,00-0,50 -,00 -,50 -,00 -,50 G. Latorre 3
,50 e Aals de Resdu,00,50,00 0,50 0,00 0,00,00 4,00 6,00 8,00 0,00,00 4,00 6,00 Y -0,50 -,00 -,50 -,00 -,50 G. Latorre 33
Dagramma d Dspersoe: mpg vs horsepower G. Latorre 34
Dagramma d Dspersoe: mpg vs horsepower Retta d Regressoe: mpg = 39.935-0.58 *horsepower (R =0.606) G. Latorre 35
Dagramma d Dspersoe: Resdu vs mpg(teorche) G. Latorre 36
Dagramma d Dspersoe: mpg vs horsepower Eq. del Modello: mpg = 56.900-0.466 * hp + 0.00 * hp (R =0.688) G. Latorre 37
Dagramma d Dspersoe: Resdu vs mpg(teorche) G. Latorre 38
Eserctazoe. I otto azede d u dato settore vegoo rlevate meslmete la produzoe (Y) mglaa d toellate d prodotto ed l umero d ore d lavoro (X): X 000 00 400 550 570 60 800 780 Y 48 88 0 90 0 40 50 80 Sapedo che: stmare parametr del Modello: Y = a + b X e dsegare l grafco, calcolare l coeffcete d determazoe R, calcolare la prevsoe d Y corrspodeza d X=000. G. Latorre 39
0833.44 476.5 78.5 7800 8 = = M(X)M(Y) = Cov(X, Y) 7543 7934.06 54737.5 M(X) = V(X) 476.5 80 8 = M(X) 60.44 78.5 303.48 8 M(Y) = V(Y) 78.5 46 8 = M(Y) y y y G. Latorre 40
b = Cov(X,Y) = 0833.44 V(X) 7543 = 0.76 a = M(Y)- b M(X)=78.5-0.76 476.5= =-9.49 r(x,y)= Cov(X,Y) V(X)V(Y) = 0833.44 7543 60.44 = = 0.97 R = r(x,y) = 0.97 = 0.94 Y = a + b X = -9.49 + 0.76 V( Y )=V( a + b X ) = b V(X)=0.76 7543 = 5753.75 R = V( Y ) V(Y) = 5753.75 60.44 = 0.94 G. Latorre 4
La prevsoe del valore d Y per X=000 è par a y = 3,9. G. Latorre 4
Eserctazoe. Per determare la temperatura ottmale alla quale otteere la stes d u certo farmaco, modo da mmzzare la quattà d mpurtà, vegoo esegut espermet co temperature dverse ( ) e per oguo d ess vee msurata la quattà d mpurtà (y ). I valor delle e delle y soo rportat ella seguete tabella: X Y -5 5,97 Sapedo che: -4 9,7-3 8,8 Σ = 0; Σ 4 = 958; Σ y = 36,83; - 3,48 Σ y = 893,4; Σ y =07,43; - 4,5 Σ 0,6 y = 83,67; Σ = Σ 3 = 0. 6,07 Stmare parametr del modello: 7,93 Y = a + b X + cx. 3 6,05 Ioltre, sapedo che Σ y 4 6,07 = 869,57 G. Latorre determare l valore d R 43. 5 37,5
Modello: a + b X + C X = Y Sstema Normale: y c b a y c b a y c b a 4 3 3 84.8 958 0 0 07.48 0 0 0 36.88 0 0 c b a c b a c b a da cu: b = 07,48/0 =,89 G. Latorre 44
Ioltre: 84.8 958 0 36.88 0 c a c a 84.8 958 0 36.88 0 0 36.88 c c c a 84.8 958 00 368.8 0 36.88 c c c a 0.95.89.94 0.95 0.95 0 36.88 c b a c a G. Latorre 45
Modello Stmato: Y =,94 +,89 X + 0,95 X oltre: V(Y) = 894.69 36.88 08.3 V(Y ) R = 869.57 V(Y ) V(Y) 36.88 06.03 08.3 0.98 06.03 G. Latorre 46
Eserctazoe 3. I u dage epdemologca vegoo rlevat l Età (X) e la Pressoe Arterosa (Y) d 300 pazet. I rsultat della rlevazoe soo rassut ella seguete tabella a doppa etrata: Y\X 59-6 63-66 67-70 7-74 75-78 90-09 0 0 0 0-9 7 8 4 0 30-49 5 5 7 50-69 63 9 5 70-89 0 7 8 3 90-09 0 0 0 7 0-9 0 0 4 Idcado co, y j e j, rspettvamete, valor cetral delle class d X, d Y e le frequeze cogute della dstrbuzoe bvarata (X, Y), s sa che: Σ. = 0.794; Σ y j.j = 49.340; Σ. =.445.99; Σ y j.j = 8.306.935; Σ Σ y j j =3.438.773. Stmare l modello Y = a + b X e G. Latorre valutare la botà dell adattameto (ftess) medate R.. 47
Rscrvamo, ache se o ecessaro, la tabella completata de total e de valor cetral delle class: 60,5 64,5 68,5 7,5 76,5 Y\X 59-6 63-66 67-70 7-74 75-78 Total 99,5 90-09 0 0 0 3 9,5 0-9 7 8 4 0 39,5 30-49 5 5 7 50 59,5 50-69 63 9 5 0 79,5 70-89 0 7 8 3 79 99,5 90-09 0 0 0 7 39 9,5 0-9 0 0 4 7 Total 6 45 8 84 7 300 M(X)= M(Y)= V(X)= j= r 44599 = 300 r s = r = y = r s = j= r s = j= s j= j = s j= j= s r j j j -69.3 j j j 0794 = 300 49390 = 300 - M(X) = 5.39 = = 69.3 = 64.63 V(Y)= = Cov(X,Y)= = r s y = j= r s 8306935 300 = j= -64.63 r = s j = j= r s - M(Y) y j= - M(X)M(Y)= 3438773-69.3 64.63 = 5.9 300 j = = 585.65 G. Latorre 48 j j
da cu otteamo: r(x,y) = Cov(X,Y) V(X)V(Y) = 5,9 5.39 585.65 = 0.54 b = Cov(X,Y) = 5.07 V(X) 5.39 = 3.33 a = M(Y) - b M(X) = 64.63-3.33 69.3= -66.35 R = r(x,y) = 0.9 ed l modello stmato: Y = - 66,35 + 3,33 X G. Latorre 49
Per comodtà rportamo la dstrbuzoe margale delle Y osservate e, utlzzado l modello stmato: Y =-66,35+3,33 X, otteamo ache la dstrbuzoe delle Y : Y fr(y) Y*fr(Y) Y *fr(y) Y' fr.(y') Y'*fr.(Y') Y *fr.(y') 99,50 3,00 98,50 9.700,75 35,6 6,00.64, 9.74,03 9,50,00.509,50 99.885,5 48,59 45,00 6.686,70 993.600,3 39,50 50,00 6.975,00 973.0,50 6,9 8,00 0.76,4 3.356.038,98 59,50 0,00 6.09,50.569.465,5 75,5 84,00 4.7,.579.930,3 79,50 79,00 4.80,50.545.399,75 88,58 7,00 5.09,7 960.06,73 99,50 39,00 7.780,50.55.09,75 Tot. 300,00 49.390,00 8.8.57,37 9,50 7,00.536,50 337.6,75 M(Y')=M(Y)= 64,63 V(Y')= 70,9 Tot. 300,00 49.390,00 8.306.935,00 V(Y)= 585,65 V(Y')=b *V()= 70,9 S ot che la dstrbuzoe delle Y ha u umero d modaltà dverse uguale a quello delle X, coè 5, metre la dstrbuzoe delle Y e ha be 7, coè tate quate soo le class d Y. Da rsultat precedet otteamo ache: R G. Latorre 50 = V(Y ) / V(Y) = 0,9 ; V(e) = V(Y) - V(Y ) = 44,73.
Aals de Resdu Per mettere rsalto le peculartà dell aals de resdu el caso d dat fort come dstrbuzoe bvarata s cosdero le seguet tabelle: I^ Tabella: rporta le frequeze cogute j della tabella orgara co le testazo rferte alle Y osservate (valor cetral delle class d Y) e le Y stmate (otteute dal modello stmato corrspodeza de valor cetral delle class d X). Y\Y' 35,6 48,59 6,9 75,5 88,58 Total 99,50 0 0 0 3 9,50 7 8 4 0 39,50 5 5 7 50 59,50 63 9 5 0 79,50 0 7 8 3 79 99,50 0 0 0 7 39 9,50 0 0 4 7 G. Latorre 5 Total 6 45 8 84 7 300
II^ Tabella: L tero della = y j -y. tabella rportata valor de resdu e j Y\Y' 35,6 48,59 6,9 75,5 88,58 99,50-35,76-49,09-6,4-75,75-89,08 9,50-5,76-9,09-4,4-55,75-69,08 39,50 4,4-9,09 -,4-35,75-49,08 59,50 4,4 0,9 -,4-5,75-9,08 79,50 44,4 30,9 7,58 4,5-9,08 99,50 64,4 50,9 37,58 4,5 0,9 9,50 84,4 70,9 57,58 44,5 30,9 III^ Tabella: L tero della tabella rporta valor d e j * j. Y\Y' 35,6 48,59 6,9 75,5 88,58 Total 99,50-7,5-49,09 0,00 0,00 0,00-0,6 9,50-0,3-3,7-69,68 -,50 0,00-64, 39,50,0-36,35-493,4-50,5-49,08-907,7 59,50 48,48 30,9-5,46-99,5-45,40-47,7 79,50 0,00 6,37 49,4 36,00-08,96 735,65 99,50 0,00 0,8 375,80 485,00 76,44.039,06 9,50 0,00 0,00 57,58 77,00 6,84 96,4 Total -,6 30,95 0,4 37,00-65,6 0,87 Nota: l totale geerale dovrebbe essere 0, l fatto che sa par ad 0,87 è da mputars G. Latorre 5 agl arrotodamet e calcol.
IV^ Tabella: L tero della tabella rporta valor d e j * j, pertato l totale geerale dvso per c darà: che cocde co l rsultato otteuto precedeza per altra va (V(e) = V(Y) - V(Y ) = 44,73). Y\Y' 35,6 48,59 6,9 75,5 88,58 Total 99,50.558.40 0 0 0 4.967 9,50.739 6.770 7.98 6.6 0.9 39,50 90.39.058 8.946.409 3.743 59,50.75.48 369 4.73 4.8.94 79,50 0 6.688 8.654 578 989 6.909 99,50 0 5.84 4.3.76 835 3.90 9,50 0 0 3.35 7.83.9 3.060 Total 5.56 3.79 44.77 40.047 0.373 4.48 G. Latorre 53
80 e 60 40 0 y 0 0,00 0,00 40,00 60,00 80,00 00,00 0,00 40,00 60,00 80,00 00,00-0 -40-60 -80 G. Latorre 54
Eserctazoe 4. S cosdero seguet dat: Y X X - - - 0 - - - - - S stmo parametr del modello: Y = β 0 + β X + β X e se e verfch la botà dell adattameto co R G. Latorre. 55
Sstema ormale: 8; ; ; 8; 0; 8; 0; 0; 8; 0 0 0 y y y y y y G. Latorre 56
0.5 0.5 8 0 0 0 8 0 8 0 0 0 0 0 0 da cu otteamo l modello stmato: Y = + 0,5 X 0,5 X da cu otteamo le y : Y',5,5 0,5 0,5 da cu otteamo: 0.5 0.50 0.5 R 0.5 8 8 = V(Y ) 0.50 8 8 = V(Y) 9; 8; y y y y y y G. Latorre 57
Altre Relazo No Lear Learzzabl: ) perbole, ) y = a - b Y = a - b X y = a Y = dove X = - b y = a - b ) espoezale; )y = a e b Y = A+b lg y = lg a+b Y = lg dove A= lg e e y a 3) logartmca. 3)y = a+blg y = a+b X dove X = lg G. Latorre 58
IPERBOLE G. Latorre 59
ESPONENZIALE G. Latorre 60
LOGARITMICA G. Latorre 6
Altre Relazo No Lear Learzzabl: 4) espoezaleperbole; 4)y = a e b Y = A+b X lg y = lg a+b Y = lg y dovea= lg a X = 5) espoezale-versa; 5)y = a+be Y = a+b - X y = a+be Y = dove y X = e - - 6) parabola. 6)y = a+b +c G. Latorre 6 y = a+b +c X dove X =
ESPONENZIALE - IPERBOLE G. Latorre 63
ESPONENZIALE INVERSA G. Latorre 64
PARABOLA G. Latorre 65
Altre Relazo No Lear Learzzabl: 7) espoezale. 7)y = a b e c lg y = lg a+c +b lg Y = A+c +b X Y = lg dovea= lg X = lg y a G. Latorre 66
y =. 4. e 0. ESPONENZIALE - G. Latorre 67
Altr esemp d relazo learzzabl Su utà statstche soo state rlevate le varabl esplcatve X e X e la varable rsposta Y. Il dagramma scatter d Y fuzoe d X suggerrebbe, tra X e Y, ua relazoe logartmca del tpo: Y = a + b lg X (fuzoe logartmca); l dagramma scatter d Y fuzoe d X suggerrebbe, tra X e Y, ua relazoe versa del tpo: Y = c + d (/X ) (fuzoe perbolca). Per catturare el modello etrambe le tedeze sarebbe, qud, potzzable la relazoe: Y = k + b lg X + d (/X ), cu parametr possoo essere stmat cosderado l modello: Y=k+bW+cZ, dove W=lg X G. elatorre Z=/X. 68
A dffereza della regressoe polomale la metodologa o-leare learzzable o può essere sempre estesa al caso multvarato. L estesoe è possble quado le relazo Y co ua partcolare X j rchede la trasformazoe della sola X j medesma e o ache della Y. Pertato soo learzzabl, geerale, le seguet fattspece d relazo: Y = a 0 + a f (X ) +.+ a k f k (X k ) oppure, pù geerale: g(y) = a 0 + a f (X ) +.+ a k f k (X k ). Ivece, se ad esempo, dall esame grafco (medate u dagramma d dspersoe) rsulta leare la relazoe tra Y ed X del tpo: g (Y) = a + f (X ), ed ache la relazoe tra Y ed X, del tpo: g (Y) = a + f (X ) allora o c è modo per G. Latorre 69 rassumere le due legg u uca relazoe tra X, X ed Y.
Esempo : La fuzoe della Produzoe Cobb Douglas Q = a K b L g dove: Q = quattà prodotta K = captale L = lavoro e a, b, g soo parametr del modello che devoo essere stmat. Il modello learzzato è dato da: da cu: lg Q = lg a + b lg K + g lg L Q = a + b K + g L co: Q = lg Q, a = lg a, K = lg K e L = lg L. G. Latorre 70
I dat: Eserctazoe X Y X Y X Y,37,8 7,73 8,345 3,090 0,9,353 3,06 7,633 8,865 3,597 0,370,867 3,378 7,53 7,70 3,636 9,885,533 5,55 8,56 8,40 3,855 9,096,560 4,65 8,36 8,93 4,803 0,080 3,06 4,85 8,875 9,66 4,53 9,88,834 4,698 8,78 9,07 5,070 0,054 3,787 4,967 9,09 8,559 5,655 9,657 3,87 5,87 9,786 9,8 5,389 0,843 3,880 7,0 0,50 8,65 6,3 0,3 4,463 6,74 0,64 9,373 6,30 0,967 4,38 6,393 0,774 8,54 6,39 0,75 5,39 6,46 0,5 8,374 7,93 9,735 5,563 7,640 0,8 8,78 7,09 0,563 5,835 7,033,78 8,457 7,45 9,994 6,34 6,594,586 0,090 8,06 9,888 6,435 7,09,456 9,808 8,46 0,374 6,04 8,07,345 0,49 8,9 8,768 6,608 8,09,70 0,077 8,749 0,99 7,76 7,650,638 9,376 8,79 0,36 G. Latorre 7
Il dagramma d dspersoe:,000 0,000 8,000 6,000 4,000,000 0,000 0,000,000 4,000 6,000 8,000 0,000,000 4,000 6,000 8,000 0,000 Provamo, prma approssmazoe, G. Latorre u modello del tpo Y = a + b 7 X. X
Rsultat dell aals: M(X)= 0,4 V(X)= 6,644 M(Y)= 8,34 V(Y)= 4,458 Cov(X,Y)= 9,599 b'= 0,360 a'= 4,660 Modello Stmato: Y = 4,66 + 0,36 X r(x,y)= 0,88 R =0,776,000 0,000 8,000 6,000 4,000,000 G. Latorre 73 0,000 0,000,000 4,000 6,000 8,000 0,000,000 4,000 6,000 8,000 0,000
,000,500,000 0,500 -,000 -,500 -,000 -,500-3,000-3,500,000,500,000 0,500 0,000-0,500 0,000,000 4,000 6,000 8,000 0,000,000 -,000 -,500 -,000 -,500-3,000-3,500 e e Aals de Resdu Y 0,000 0,000-0,500,000 4,000 6,000 8,000 0,000,000 I resdu soo formatv e suggerscoo d serre el G. Latorre 74 modello ua compoete logartmca. X
Provamo, allora, u modello d tpo Y = a + b lg X. Per poter utlzzare la metodologa d stma fora utlzzata è ecessaro rcodurc ad u modello strettamete leare, tale operazoe s realzza faclmete cosderado la uova varable X = lg X che c cosete d rscrvere l modello term d X : Y = a + b X. Ora possamo stmare parametr cogt el modo usuale: M(X )=,3; V(X )=0,46; Cov(X,Y)=,37; b =Cov(X,Y)/V(X )=3,00; a =M(Y)-b M(X ) Modello Stmato: Y =,9 + 3 lg X R =r(x,y) =Cov(X,Y) /[V(X ) V(Y)]=0,9. Avremo ache: V(Y )=b V(X )=4, e R =V(Y )/V(Y)=0,9. Il valore molto elevato d R c dce che l modello ha u fttg molto buoo, cò oostate effettuamo l aals de G. Latorre 75 resdu.
Dagramma Scatter de dat orgar,000 Y 0,000 8,000 6,000 4,000,000 X 0,000 G. Latorre 76 0,000,000 4,000 6,000 8,000 0,000,000 4,000 6,000 8,000 0,000
,000 Dagramma Scatter de dat orgar ed sovrmpressoe put rappresetatv del modello stmato: Y Y =,9 + 3 lg X 0,000 8,000 6,000 4,000,000 X 0,000 G. Latorre 77 0,000,000 4,000 6,000 8,000 0,000,000 4,000 6,000 8,000 0,000
Aals de Resdu e vs X,5,0 0,5 0,0-0,5 0 5 0 5 0 -,0 -,5 -,0,5 e vs Y'',0 0,5 0,0-0,5 0 4 6 8 0 -,0 -,5 -,0 I resdu soo totalmete o formatv, pertato l modello o rsulta essere mglorable. S ot, oltre che M(e)=0 e V(e)=0,34, G. Latorre 78 rsulta, qud verfcato che: V(Y) = V(Y ) + V(e).
I dat: Eserctazoe X Y X Y X Y 0,800 3,968,63 0,99,9 0,798 0,85 3,754,637,409,50 0,97 0,884,636,676,334,68,90 0,95,889,76,8,97,8,006,79,740,59,30,,030,687,757 0,885,353 0,960,095,764,770,99,46 0,98,3,85,8,384,430 0,673,53,389,85,088,476 0,878,73,43,86,30,497 0,87,9,57,884,48,5 0,84,8,3,906,059,566 0,84,34,83,948 0,995,584 0,739,373,644,005 0,76,639,57,406,57,04,0,704 0,97,436,554,05,78,743 0,933,449,558,080,87,806,5,467 0,966,40 0,933,830 0,79,56,43,63,94,886 0,8,590,47,75,4,93 0,948 G. Latorre 79
Il dagramma d dspersoe: 4,500 4,000 3,500 Y vs X 3,000,500,000,500,000 0,500 0,000 0,000 0,500,000,500,000,500 3,000 3,500 L adameto che è suggerto dal dagramma è d tpo perbolco, coè del tpo: Y G. = Latorre X / (c X + d). 80
Al fe d stmare parametr got della precedete relazoe dobbamo cosderare la seguete trasformazoe delle varabl che la rede strettamete leare: X =/X e Y =/Y da cu: Y = a + b X, co a = c e b = d. MX)= 0,598 V(X)= 0,050403955 Rsultat dell aals Modello Stmato:Y =,4-0,89 X, da cu:y = X / ( - 0,89 +,4 X ). M(Y)= 0,880 V(Y)= 0,06556653 Cov(X,Y)= -0,04476605 r(x,y)= -0,77870937 b'= -0,888456 a'=,40697459 R =r(x,y ) = 0,60638884 V(Y ')=b V(X )= 0,03975877 R =V(Y )/V(Y )= 0,60638884 Botà dell adattameto (fttg): R = r(x,y ) = 0,6, (avremo ache: V(Y )=b V(X )=0,05 e R =V(Y )/V(Y)=0,6). G. Latorre 8
Dagramma Scatter de dat orgar 4,500 Y vs X 4,000 3,500 3,000,500,000,500,000 0,500 G. Latorre 8 0,000 0,000 0,500,000,500,000,500 3,000 3,500
Dagramma Scatter de dat orgar ed sovrmpressoe put rappresetatv del modello stmato: Y = X / (,4 X 0,89 ) 4,500 Y vs X 4,000 3,500 3,000,500,000,500,000 0,500 G. Latorre 83 0,000 0,000 0,500,000,500,000,500 3,000 3,500