two population regressions

 

18.1 given:

For sample 1 : n = 28, ∑x2 = 142.35, ∑xy = 69.47, ∑y2 = 108.77,  = 14.7  = 32.0.

For sample 2 : n = 30, ∑x2 = 181.32, ∑xy = 97.40, ∑y2 = 153.59,  = 15.8  = 27.4.

a)      Test H0: β1 = β2 vs. H0: β1 ≠ β2.

b)      If H0 in part (a ) is not rejected, test H0 the elevations the two population regressions are the same, vs. HA: the two elevation are not the same.

c)       

sample 1                                              sample 2

n = 28                                                  n = 30

∑x2 = 142.35                                       ∑x2 = 181.32               

∑xy = 69.47                                        ∑xy = 97.40

∑y2 = 108.77                                       ∑y2 = 153.59

                         = 14.7                                                = 15.8

                         = 32.0                                                = 27.4

                        b=  = 0.4880                                 b=  =0.5371

                        residual SS =108.77 –   residual SS =153.59 –

=74.8670                                             = 101.2694

                        residual DF = 28-2 = 26                      residual DF = 30-2 = 28

                                                (s2y.x)p =  = 3.2617

                                                Sb1-b2  =  = 0.20224

                        T=  =

rejectH0if  ≥ tα  but not reject H0 because <  = 2.015

       I.             Sum of squares of x for common regression Ac = (∑x2)1 + (∑x2)

142.35 +181.32 = 323.67

    II.            Sum of crossproducts for common regression:  Bc = (∑xy)1+(∑xy)2

69.47 +97.40 = 166.87

 III.            Sum of squares of y for common regression: Cc = (∑y2)1+(∑y2)2

108.77 +153.59 =262.36

 IV.            Residual ss for common regression: SSc = Cc-

                                                 =176.32917

    V.            Residual DF for common regression: DF =n1+n2 -3

DF =28+30 -3 =55

 VI.            Residual MS  for common regression:( s2y.x) =  

                                                 =3.20598

VII.            bc for common regression:  =  = 0.515556

VIII.            then, the appropriate test statistic is: t =

t =  =  =10.6971

 

reject H0 because t =10.6971>

 

 

comparing two elevation for the tow lines in example 18.8 and fig 18.8 in 2 sample:

Sample1:                                 sample 2:

                                                        SSx = 1470.8712                     SSx =2272.4750

                                                        Scpxy = 4363.1624                   Scpxy =4928.8100

                                                        SSy = 13299.5296                   SSy =10964.0947

                                                        n = 26                                      n = 30

                                                        b = 2.97                                   b = 2.17

                                                        SSr = 356.7317                        SSr = 273.9142

                                                        a 1= 10.57                                a 2 = 24.91

                                                        = 10.57 + 2.97 xi                        = 24.91 + 2.17 xi

                                                                                 = 22.93                                          =18.95

           

 

 

 

 

                         = +               &           = +

             =10.57+  =66.406    &       =24.91+ = 65.706

           

=  =1.59264    =  

 =   = 1.0114

t =  =0.6921

do not reject H0 because tc = 0.6921 <    = 2.007   &     = 2.68

 

near regression equation

 

17.3 the frequency of electrical impulses emitted from electric fish is measured from fish at different temperatures. The resultant data are as follows:

temperature ©

Impulse frequency (number/sec

ni

20

225,230,239

3

22

251,259,265

3

23

266,273,280

3

25

287,295,302

3

27

301,310,317

3

28

307,313,325

3

30

324,330,338

3

 

(a)    Compute a and b for the linear regression equation relation impulse frequency to temperature. (b) test, by analysis of variance, H0:β = 0. (c) calculate the standard error of estimate of the regression. (d) calculate the coefficient of determination of the regression. (e) test H0: the population regression is linear.

 

N = 21

            ∑∑ xij = 525                      ∑∑ yij =6037              ∑∑xijyij =153143

            ∑∑xi2j = 13353                         ∑∑yi2j =1758389        ∑xy = 2218

∑ x2  = 228                       ∑ y2 =22895.23

 = 25                                  =287.47

b =   =  =9.728

a =   - b  =287.47 - 9.728(25) = 44.27

therefore, the least squares regression lin is  = 44.27 + 9.728 xij

H0: the population regression is linear.

HA: the population regression is not linear.

Ss total: ∑∑yi2j -  = 1758389 -  = 22895.238

 

 

 

among groups ss =  -  =  -  =22089.9

among groups DF k-1 = 6

Within groups ss = total ss - among groups ss = 22895.238 - 22089.9  = 805.338

Within groups DF = total DF - among groups DF = 20 – 6 = 14

Regression ss =  =  = 21576.859

Deviations from linearity ss = among groups ss –regression ss = 22089.9 - 21576.859 =513.041 Deviations from linearity DF = among groups DF– regression DF = 6 – 1 = 5

Regression with replication: test for linearity

 

source of variation

ss

Df

MS

total

22895.238

20

-

among groups

22089.9

6

-

linear Regression

21576.859

1

-

Deviations from linearity

513.041

5

102.6082

Within groups

805.338

14

57.52

 

F =  = 1.78387




Since F >table F , do not reject H0

 

source of variation

Ss

Df

MS

total

22895.238

20


linear Regression

21576.859

1

21576.859

residual

1318.379

19

69.38

 

F = 310.995

Since F  > table F , therefore reject H0

r 2=  = 0.942

sy.x=  = 8.329

 

1.      Adjusment for random data that has a binonmal distribut?


73

45

3


69

50

7


80

42

4


83

46

9


74

48

2

379

231

25

x

75.8

46.2

5

    Var 

    31.7

     9.2

    8.5

 

Arc sin =  58.693

Arc sin =42.130

Arc sin  =9.974

Arc sin

Arc sin  = 45.000

Arc sin  =15.341

Arc sin

Arc sin   40.396

Arc sin  = 11.536

Arc sin

Arc sin  =42.705

Arc sin  =17.457

Arc sin

Arc sin  =42.853

Arc sin  = 8.130

 


58.693

42.13

9.974


56.166

56.166

15.341


63.438

40.396

11.536


65.649

42.705

17.457


59.342

42.853

8.13

303.288

224.25

62.438

60.6576

44.85

12.4876

 

ماتریس

 

 

تمرين 1: رابطه (AB)'=B'A' را اثبات كنيد؟

A                             B

A×B    × = =   

(AB)=    (AB)'=

A   ⇒ A′          B  ⇒ B′

B′× A′=   =  =

⇒  B′× A′    =    (AB)'

تمرين 2:يك ماتريس 3×3 را inverse كنيد؟

A

سطر اول:

6(+1) +3(-1) +5(+1)

6(+1)]40-16] +3(-1)[70-18] +5(+1)[56-36]

6(+1)]24] +3(-1)[52] +5(+1)[+20]

6+]24] +3[-52] +5[+20]

144+(-156)+100 = 88                                                              همسازه سطر اول:

 

سطر دوم:

7(-1) +4(+1) +2(-1)

7(-1)]30-40] +4(+1)[60-45] +2(-1)[48-27]

7(-1)]-10] +4(+1)[15] +2(-1)[ 21]

7[+10] +4[+15] +2[-21]

 همسازه سطردوم:70+60+(-42) = 88                                                              

سطر سوم:

9(+1) +8(-1) +10(+1)

9(+1)]6-20] +8(-1)[12-35] +10(+1)[24-21]

9(+1)]-14] +8(-1)[-23] +10(+1)[+3]

9-]14] +8[+23] +10[+3]

همسازه سطرسوم:(-126) +184+30 = 88                                                            

 

C=        C′=

A-1 =  × C′    A-1 =  ×  =        

تمرين 3: ثابت كنيدA= I ×A-1

A                             │A│ = 8(9) – 5(6) = 72 – 30 = 42

A-1 =    =          ⇒      A     ,  A-1 =

A-1× A =

 ×  =  =

 

باند اعتماد

 

تمرين 1: براي داده هاي زير، باند اعتماد را براي ŷ و  رسم كنيد.

طول بال

1.4

1.5

2.2

2.4

3.1

3.2

3.2

3.9

4.1

4.7

4.5

5.2

5

روز

3

4

5

6

8

9

10

11

12

14

15

16

17

 

ü      باند اعتماد براي ŷ:

a= 0.715 cm                   b = 0.27cm                      ssx = 262 day2

n = 13                Ms e = 0.047701                   = 2.201

sŷ =                         ŷi = a +bxi                  L =  ŷi ± tsŷi

0.0769

1.      Xi = 3                   ŷ3 = 0.715+0.27(3)    = 1.525           sŷ =    = =0.111

L =  1.525 ± 2.201(0.111 )    ⇒ L1 = 1.525+0.244311= 1.769311       &        L2 = 1.525+0.244311=1.280

2.      Xi =  4                  ŷ3 = 0.715+0.27(4)    = 1.795              sŷ =    = 0.101

L= 1.795 ± 2.201(0.101 )    ⇒ L1 = 1.795+0.222301=  2.017301     &   L2 = 1.795-0.222301=1.572699

3.      Xi = 5                   ŷ3 = 0.715+0.27(5)    = 2.065              sŷ =    = 0.0906

L = 2.065± 2.201(0.0906) ⇒ L1 = 2.065+0.1994106=2.2644106     &    L2 = 2.065 +0.1994106=1.8655894

4.      Xi =  6                 ŷ3 = 0.715+0.27(6)    = 2.335              sŷ =    = 0.0811

L = 2.335 ± 2.201(0.0811) ⇒ L1 = 2.335+0.1785011=2.5135011    &    L2 = 2.335 +0.1785011=2.1564989

5.      Xi =  8                  ŷ3 = 0.715+0.27(8)    =   2.875            sŷ =    = 0.0663

L = 2.875± 2.201(0.0663) ⇒ L1 = 2.875+0.1459263=3.0209263     &      L2 = 2.875+0.1459263=2.7290737

 

6.      Xi = 9                  ŷ3 = 0.715+0.27(9)    = 3.145              sŷ =    = 0.0620

L =  3.145± 2.201(0.0620 ) ⇒ L1 = 3.145+0.136462=3.281462     &     L2 = 3.145+0.136462=3.008538

7.      Xi =  10                  ŷ3 = 0.715+0.27(10)    =  3.415             sŷ =    = 0.0605

L = 3.415 ± 2.201(0.0605) ⇒ L1 = 3.415+0.1331605=3.5481605    &      L2 = 3.415+0.1331605=3.2818395

8.      Xi =  11                  ŷ3 = 0.715+0.27(11)    =  3.685             sŷ =    = 0.0620

L =  3.685± 2.201(0.0620) ⇒ L1 = 3.685+0.136462=3.821462       &      L2 = 3.685+0.136462=3.548538

9.      Xi =  12                  ŷ3 = 0.715+0.27(12)    =   3.955            sŷ =    = 0.0663

L =  3.955± 2.201(0.0663 ) ⇒ L1 = 3.955+0.1459263=4.1009263      &   L2 = 3.955+0.1459263=3.8090737

10.  Xi =14                   ŷ3 = 0.715+0.27(14)    =  4.495             sŷ =    = 0.0811

L = 4.495 ± 2.201(0.0811 ) ⇒ L1 = 4.495+0.1785011=4.6735011    &      L2 = 4.495+0.1785011=4.3164989

11.  Xi = 15                   ŷ3 = 0.715+0.27(15)    =  4.765             sŷ =    = 0.0906

L =  4.765± 2.201(0.0906 ) ⇒ L1 = 4.765+0.1994106=4.9644106     &   L2 = 4.765+0.1994106=4.5655894

12.  Xi = 16                   ŷ3 = 0.715+0.27(16)    =  5.035             sŷ =    = 0.101

L = 5.035± 2.201(0.101)    ⇒ L1 = 5.035+0.222301=5.257301       &          L2 = 5.035+0.222301=4.812699

13.  Xi = 17                    ŷ3 = 0.715+0.27(17)    =   5.305            sŷ =    = 0.111

L =  5.305± 2.201( 0.111 ) ⇒ L1 = 5.305+0.244311= 5.549311      &    L2 = 5.305+0.244311=5.060689

 

 

 

ü   باند اعتماد براي :

a = 0.715                        b = 0.270                    = 2.201             s2b = 0.0135  

=                 k = b2-t2×s2b                        +  ±  

K= 0.272 -2.2012 ×(0.0135)2 = 0.0720

1.      Yi = 1.4      1.4=  = 2.53          

+  ±    

10+(-7.556)±30.569   2.431±2.034               ⇒L1=0.397     L2= 4.465

2.      Yi = 1.5     1.4=  = 2.90

+  ±  

10+(-7.18125)±30.569       2.81875±2.018             ⇒L1=0.80075     L2=4.83675

3.      Yi = 2.2      1.4=  = 5.5

+  ±  

10+(-4.55625)±30.569      5.44375 ± 1.1923              ⇒L1=4.25145     L2=6.63605

 

 

4.      Yi = 2.4      1.4=  = 6.24

+  ±  

10+(-3.80625)±30.569       6.19375± 1.761              ⇒L1=4.43275     L2=7.95475

5.      Yi = 3.1      1.4=  = 8.83

+  ±  

10+(-1.18125)±30.569       8.81875± 1.83              ⇒L1=6.98875     L2=10.64875

6.      Yi = 3.2      1.4=  = 9.20

+  ±  

10+(-0.80625)±30.569       9.19375±1.84               ⇒L1=7.35375    L2=11.03375

7.      Yi = 3.2      1.4=  = 9.20

+  ±  

10+(-0.80625)±30.569      9.19375 ± 1.84              ⇒L1=7.35375     L2=11.03375

8.      Yi = 3.9      1.4=  = 11.79

+  ±  

10+(1.81875)±30.569       11.81875 ±1.869               ⇒L1=9.94975     L2=13.68775

9.      Yi = 4.1      1.4=  = 12.53

+  ±  

10+(2.56875)±30.569      12.56875±1.866               ⇒L1=10.70275     L2=14.43475

10.  Yi = 4.7      1.4=  = 14.75

+  ±  

10+(4.81875)±30.569       14.81875±1.930               ⇒L1= 12.88875    L2=16.74875

11.  Yi = 4.5      1.4=  = 14.01

+  ±  

10+(4.06875)±30.569       14.06875± 1.911              ⇒L1=12.15775     L2=15.97975

12.  Yi = 5.2      1.4=  = 16.61

+  ±  

10+(6.69375)±30.569       16.69375±1.997               ⇒L1=14.69675     L2=18.69075

13.  Yi = 5      1.4=  = 15.87

+  ±  

10+(5.94375)±30.569       15.94375± 1.969              ⇒L1= 13.97475    L2=17.91275

 

تابعیت

 

17.1. the following data are the rates of oxygen consumption of birds, measures at different environmental tem-

peratures:

 


Temperature

( ̊C)

oxygen consumption (ml/g/hr)

-18

5.2

-15

4.7

-10

4.5

-5

3.6

0

3.4

5

3.1

10

2.7

19

1.8

 

 

xi

-18

-15

-10

-5

0

5

10

19

N=8

∑=-14

X = -1.75

yi

5.2

4.7

4.5

3.6

3.4

3.1

2.7

1.8

N=8

∑=29

y=3.625

 

b = (x׳x)-1x׳y

 

( *  )-1*  *

   =  

                                                                   ⇒ a=              b =

 

Ss total= y׳y-ny2

Ss total =  * - 8(3.625)2 = 8.915    ⇒ss total = 8.915

   

   

Ss regression: β׳x׳y - ny2

Ss regression: * *  - 8(3.625)2 =8.7452

 

Ss residual =  ss total – ss regression

⇒ Ss residual = 8.915 - 8.7452 = 0.1698

 


F

MS

SS

DF

S.O.V

 

**

309.01

8.7452

8.7452

1

regression



0.0283

0.1698

6

residual




8.915

7

Total

 

r 2=    = = 0.980

1-      r 2 = 1-0.980 = 0.02

b =

sb =    =  = 0.0049

t =  :  = 17.918      18

لیون تست

 

داده های زیر مربوط به وزن تولد یک گله گوسفند  میباشند و دارای مادرانی با سنین متفاوت هستنند که شامل مادران شکم اول (2ساله )تا ششم(7 ساله)  میباشد تفاوت  واریانس میان دسته ها را با آزمون leven test آزمون کنید.

7

6

5

4

3

2

Age of dam→

3.4

3.6

3.5

3.5

3.4

3.3

1

3.5

3.7

3.6

3.5

3.4

3.4

2

3.7

3.8

3.8

3.7

3.6

3.5

3

3.8

4

3.9

3.8

3.7

3.6

4

4

4.2

4.1

4.1

4

3.8

5

18.4

19.3

18.9

18.6

18.1

17.6

3.68

3.86

3.78

3.72

3.62

3.52

0.057

0.058

0.057

0.062

0.062

0.037

var

 

H0:  = = =

H0:  ≠

First:

ابتدا داده ها را از طریق فرمول  =   تبدیل میکنیم و داده های جدید ایجاد میکنیم.بدین شکل که هر رکورد را از میانگین گروه خودش کم کرده و از آن قدر مطلق میگیریم.

 =     

7

6

5

4

3

2

  داده های تبدیل شده یا :Zij

7

6

5

4

3

2

Age of dam→

0.28

0.26

0.28

0.22

0.22

0.22

1

0.18

0.16

0.18

0.22

0.22

0.12

2

0.02

0.06

0.02

0.02

0.02

0.02

3

0.12

0.14

0.12

0.08

0.08

0.08

4

0.32

0.34

0.32

0.38

0.38

0.28

5

0.92

0.96

0.92

0.92

0.92

0.72

0.184

0.192

0.184

0.184

0.184

0.144

0.01468

0.01192

0.01468

0.01968

0.01968

0.01108

var

W=  

N = 6×5 = 30      k = 6                    = 0.179

Second:

در ادامه برای بدست آوردن صورت کسر یا Ni   ابتدا میانگین هر گروه را از میانگین کل کم کرده وپس از به توان رساندن  در تعداد تکرار گروه خودش ضرب کرده و در نهایت عدد حاصل برای تمام گرو هها را با هم جمع نمایید.

Ni 2

5 = 0.0062   &  5  =0.00085      &   5  =0.00085 & 5 =0.00085    &  5 =0.00085     &    5 =0.00013

Result:

→ 0.00973

Third:

در ادامه کار برای بدست آوردن مخرج کسر یا  ابتدا تک تک دادها را از میانگین گروه خودش کم کرده و به توان دو رسانده و با هم جمع کرده و در نهایت عدد بدست آمده برای هر گروه را بااعداد بدست آمده دیگر گروه ها جمع نمایید.

Because

∑Z2:

(0.22-0.144)2 = 0.0058 &   (0.12-0.144)2 =0.00058 &   (0.02-0.144)2 =0.016 &   0.08-0.144)2 = 0.0041 &   (0.28-0.144)2 =0.0185   = 0.045

∑Z3:

(0.22-0.184)2  =0.0013  &    (0.22-0.184)2  =0.0013   &    (0.02-0.184)2  = 0.027  &    (0.08-0.184)2  = 0.011  &    (0.38-0.184)2  =0.039   = 0.08

∑Z4:

(0.22-0.184)2 = 0.0013     &   (0.22-0.184)2 =0.0013  &   (0.02-0.184)2 =0.027&   (0.08-0.184)2 = 0.011  &   (0.38-00.184)2 = 0.039   = 0.08

∑Z5:

(0.28-0.184)2 =0.0093&    (0.18-0.184)2 =0.000016&    (0.02-0.184)2 =0.027&    (0.12-0.184)2 =0.0041 &    (0.32-0.184)2 = 0.0185  = 0.059

 

∑Z6:

 

(0.26-0.192)2=0.0047&    (0.16-0.192)2 = 0.0011   &    (0.06-0.192)2=0.018  &    (0.14-0.192)2=0.0028  &    (0.34-0.192)2= 0.022  = 0.049

∑Z7:

(0.28- )2=0.0093  & (0.18- )2= 0.000016    & (0.02- )2= 0.027   & (0.12- )2= 0.0041   & (0.32- )2= 0.019  = 0.06

Result:

→  = 0.373

 

W=    =    =(4.8)( 0.026) = 0.125

 

 =    0.05 =2.62  →w =0.125< F =0.05 =2.62

Therefore do not rejects the null hypothesis that the variances are equal.

 

رگرسیون

1 :                          n = 33, ∑x2 = 744.32, ∑xy = 2341.37, ∑y2 = 7498.91,

For sample 2 :                          n = 34, ∑x2 = 973.14, ∑xy = 3147.68, ∑y2 = 10366.97

For sample 3 :                          n = 29, ∑x2 = 664.42, ∑xy = 2047.73, ∑y2 = 6503.32

For the total of all samples :    n = 96, ∑x2 = 3146.72, ∑xy = 7938.25, ∑y2 = 20599.33

 

a)      Test H0: β1 = β2 = β3 vs. HA:all ther β’s are not equal .

b)      If H0 in part (a ) is not rejected, test H0 the three  population regressions lines  have the same elevation, vs. HA: the lines do not have the same elevation...

روی ادامه مطلب کلیک فرمایید.

نمودار پراكنش و خط تابعيت

بنام خدا

 براي داده هاي زير، نمودار پراكنش و خط تابعيت رسم كنيد.

3

 

1.4







4

1.5








5

2.2








6

2.4








8

3.1








9

3.2








10

3.2








11

3.9








12

4.1








14

4.7








15

4.5








16

5.2








17

5








 

17.1. the following data are the rates of oxygen consumption of birds, measures at different environmental tem-

peratures: a)  calculate a and b for the regression of oxygen consumption rate on temperature.

b)  Test, by analysis of variance, the hypothesis H0:= 0.

c)  Calculate the standard error of estimate of the regression.

d)  Calculate the coefficient of determination of regression.


Temperature

( ̊C)

oxygen consumption (ml/g/hr)

-18

5.2

-15

4.7

-10

4.5

-5

3.6

0

3.4

5

3.1

10

2.7

19

1.8

 

xi

yi

xy

X2

Y2

-18

5.2

-93.6

324

27.04

-15

4.7

-70.5

225

22.09

-10

4.5

-45

100

20.25

-5

3.6

-18

25

12.96

0

3.4

0

0

11.56

5

3.1

15.5

25

9.61

10

2.7

27

100

7.29

19

1.8

34.2

361

3.24

N=8

N=8

N=8

N=8

N=8

∑=-14

∑=29

-150.4

1160

114.04

X = -1.75

y=3.625

-

-

-

 

 

b =       =    =   = - 0.0877

a = Yi – bX = 3.625 – (-0.0877)(-1.75) = 3.4715

Ŷ = 3.4697+ 0.0674 xi

 

H0: b = 0     ,     H1: b  0 

Ss total: ∑Yi2  =  114.04  -  = 8.915

Ss regression =  =  =  8.745

Ss residval = ssT – ssR = 8.915 - 8.7451 = 0.17

 


F

MS

SS

DF

S.O.V

 

**

309.01

8.745

8.745

1

regression



0.0283

0.17

6

residval




8.915

7

Total

 

آزمون معني دار است يعني تابعيت از نظر آماري وجود دارد.