0% found this document useful (0 votes)
331 views

Y = β β x y x

The document provides data on audited and book inventory values for 10 items. A linear regression model is fit to the data with audited value (Y) and book value (X). The model is Y = β0 + β1X. The regression outputs a slope (β1) of 0.99139 and intercept (β0) of 0.72, indicating a strong linear relationship between audited and book values. A second linear regression is performed on housing price and year data from 1972-1979. The model Y = β0 + β1X + ε is fit, where Y is median housing price and X is year. The results show an annual housing price increase (β1) of $
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
331 views

Y = β β x y x

The document provides data on audited and book inventory values for 10 items. A linear regression model is fit to the data with audited value (Y) and book value (X). The model is Y = β0 + β1X. The regression outputs a slope (β1) of 0.99139 and intercept (β0) of 0.72, indicating a strong linear relationship between audited and book values. A second linear regression is performed on housing price and year data from 1972-1979. The model Y = β0 + β1X + ε is fit, where Y is median housing price and X is year. The results show an annual housing price increase (β1) of $
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

DEVINE CAGADAS

MS AMS
AMS 532 General Linear Models

11.4 Auditors are often required to compare the audited (or current) value of an inventory item with book (or
listed) value. If a company is keeping its inventory and books up to date, there should be a strong linear
relationship between the audited and book values. A company sampled ten inventory items and obtained the
audited and book values given in the accompanying table. Fit the model Y = β0 + β 1 x to these data.

Item Audit Value ( y i) Book Value ( x i)


1 9 10
2 14 12
3 7 9
4 29 27
5 45 47
6 109 112
7 40 36
8 238 241
9 60 59
10 170 167
Answer:

yi xi xi yi x i2
9 10 90 100
14 12 168 144
7 9 63 81
29 27 783 729
45 47 2115 2209
109 112 12208 12544
40 36 1440 1296
238 241 57358 58081
60 59 3540 3481
170 167 28390 27889

n n n n

∑ yi =721 ∑ x i=720 ∑ x i y i=106155 ∑ xi2=106554


i=1 i=1 i=1 i=1
n
1
x́= ∑x=
n i=1 i
n
( 1n ) ( 720 )=72
1
ý= ∑ y i=
n i=1
n
( 1n ) (721) =72.1n n n
1
S xy =∑ ( x i− x́ ) ( y i− ý )=∑ x i yi − ∑ x i ∑ y i
i=1 i=1 n i=1 i=1
1
S xy =106155− (720 )( 721 )=106155−51912=54,243
10
n n n 2
1
S xx =∑ ( x i− x́ )2=∑ xi2− ∑ x i
i=1 i=1 n i=1 ( )
1
S xx =106554− ( 720 )2=106554−51840=54,714
10
S 54243
β 1= xy =
^ =0.99139
S xx 54714
^
β 0= ý − ^
β1 x́=72.1−( 0.99139 )( 72 )=72.1−71.38=0.72

Given that ^y = β^0 + β^1 x then ^y =0.72+ 0.99 x


If x=100 then ^y =0.72+ 0.99 ( 100 )=0.72+99=99.72
11.5 What did housing prices look like in the “good old days”? The median sale prices for new single-family
houses are given in the accompanying table for the years 1972 through 1979. Letting Y denote the median
sales price and x the year (using integers 1,2 , … ,8 ), fit the model Y = β0 + β 1 x + ε . What can you conclude
from the results?
Year Median Sales Price (×1000 )
1972 (1) $27.6
1973 (2) $32.5
1974 (3) $35.9
1975 (4) $39.3
1976 (5) $44.2
1977 (6) $48.8
1978 (7) $55.7
1979 (8) $62.9

Answer:

yi xi xi yi x i2
27.6 1 27.6 1
32.5 2 65 4
35.9 3 107.7 9
39.3 4 157.2 16
44.2 5 221 25
48.8 6 292.8 36
55.7 7 389.9 49
62.9 8 503.2 64

n n n n

∑ yi =346.9 ∑ xi =36 ∑ xi y i=1764.4 ∑ x i2=204


i=1 i=1 i=1 i=1
n
1
x́= ∑x=
n i=1 i
n
( 18 ) ( 36 )=4.5
1
ý= ∑ y i=
n i=1
n
( 18 ) (346.9 )=43.3625
n n n
1
S xy =∑ ( x i− x́ ) ( y i− ý )=∑ x i yi − ∑ x i ∑ y i
i=1 i=1 n i=1 i=1
1
S xy =1764.4− ( 36 ) ( 346.9 )=1764.4−1561.05=20 3.35
8
n n n 2
1
S xx =∑ ( x i− x́ )2=∑ xi2− ∑ x i
i=1 i=1
( )
n i=1
1
S xx =204− ( 36 )2 =204−162=4 2
8
S 203.35
β 1= xy =
^ =4 . 842
S xx 42
^
β 0= ý − ^β1 x́=43.3625−( 4.8416667 )( 4.5 )=43.3625−21.7875=21. 5 7 5

Given that ^y = β^0 + β^1 x then ^y =21.575+ 4 . 842 x

It will have an annual increase of $ 4,842.00, since ^


β 1 is equal to 4.842 multiply by 1000.

11.17 a. Calculate SSE and S2 for Exercise 11.5


b. It is sometimes convenient, for computational purposes, to have x -values spaced symmetrically and
equally about zero. The x -values can be rescaled (or coded) in any convenient manner, with no loss of
information in the statistical analysis. Refer to Exercise 11.5. Code the x -values (originally given on
the scale of 1 to 8) by using the formula
x−4.5
x ¿=
.5
¿ ¿ ¿
Then fit the model Y = β0 + β 1 x + ε . Calculate SSE. (Notice that the x -values are integers
¿

symmetrically spaced about zero.) Compute SSEand compare your answer to the result of part (a).

Answer:
yi xi xi yi x i2 y i2
27.6 1 27.6 1 761.76
32.5 2 65 4 1056.25
35.9 3 107.7 9 1288.81
39.3 4 157.2 16 1544.49
44.2 5 221 25 1953.64
48.8 6 292.8 36 2381.44
55.7 7 389.9 49 3102.49
62.9 8 503.2 64 3956.41

n n n n n

∑ yi =346.9 ∑ xi =36 ∑ xi y i=1764.4 ∑ x i =204 ∑ y i2 =16045.29 2

i=1 i=1 i=1 i=1 i=1

a.
n n n 2
1
S yy =∑ ( y i− ý ) 2=∑ y i2−
i=1 i=1 n ( )
∑ yi
i=1
1
S yy =16045.29− ( 346.9 )2 =16045.29−15042.45125=1002.8388
8
^
β 1=4. 84166 … 4.842 and S xy =20 3 .35
SSE=S yy− ^ β 1 S xy=1002.8388−( 4.84166 ) ( 203.35 )=1002.8388−984.5516=18.286
SSE 18.286
S2 = = =3.04 787
n−2 8−2
b.
yi y i2 x i¿ x ¿i y i x ¿2
i
27.6 761.76 -7 -193.2 49
32.5 1056.25 -5 -162.5 25
35.9 1288.81 -3 -107.7 9
39.3 1544.49 -1 -39.3 1
44.2 1953.64 1 44.2 1
48.8 2381.44 3 146.4 9
55.7 3102.49 5 278.5 25
62.9 3956.41 7 440.3 49

n n n n n
2 ¿ ¿
∑ yi =346.9 ∑ y i =16045.29 ∑ x i =0 ∑ x i y i=406.7 ∑ x ¿2
i =168
i=1 i=1 i=1 i=1 i =1
n
1 1
x́ ¿=∑
n i=1
n
x ¿i=
8 ()
( 0 )=0

1 1
ý= ∑ y i=
n i=1
n
8 ()
(346.9 )=43.3625
n n n
1
S x y =∑ ( x ¿i − x́¿ ) ( y i− ý )=∑ x ¿i y i−
¿
∑ x ¿i ∑ y i
i =1 i=1 n i=1 i=1
1
S x y =406.7− ( 0 ) ( 346.9 )=406.7−0=406.7
¿
8
n n n 2
1 2
S x x =∑ ( x − x́ ) =∑ x − ∑ x ¿i
¿ ¿

i=1 i=1
¿
i
¿
n i=1
¿2
i ( )
1
S x x =168− ( 0 )2=168−0=16 8
¿ ¿
8
S 406.7
β 1= x y =
¿
^ =2.42
Sx x 168
¿ ¿

^
β 0= ý − ^β1 x́ ¿=43.3625−( 2.42 ) ( 0 ) =43.3625−0=43.3625

Given that ^y = β^0 + β^1 x then ^y =43.3625+2.42 x

n n n 2
1
S yy =∑ ( y i− ý ) 2=∑ y i2−
i=1 i=1 n ( )
∑ yi
i=1
1
S yy =16045.29− ( 346.9 )2 =16045.29−15042.45125=1002.8388
8
^
β 1=2.420833 2.42 and S xy =406.7
SSE=S yy − ^β 1 S x y =1002.8388−( 2.420833 ) ( 406.7 ) =1002.8388−984.5527=18.286
¿

SSE 18.286
S2 = = =3.04 787
n−2 8−2

It has the same SSE and S2 with part (a).

11.18 a. Calculate SSE and S2 for Exercise 11.8


b. Refer to Exercise 11.8 Code the x -values in a convenient manner and fit a simple linear model to
the LC50 measurements presented there. Compute SSE and compare your answer to the result of part (a).

Answer:
a.
Toxicant LC50 Flow-Through ( y ) LC50 Static ( x )
1 23.00 39.00
2 22.30 37.50
3 9.40 22.20
4 9.70 17.50
5 .15 .64
6 .28 .45
7 .75 2.62
8 .51 2.63
9 28.00 32.00
10 .39 .77
yi xi xi yi x i2 y i2
23.00 39.00 897 1521 529
22.30 37.50 836.25 1406.25 497.29
9.40 22.20 208.68 492.84 88.36
9.70 17.50 169.75 306.25 94.09
.15 .64 0.096 0.4096 0.0225
.28 .45 0.126 0.2025 0.0784
.75 2.62 1.965 6.8644 0.5625
.51 2.36 1.3413 6.9169 0.2601
28.00 32.00 896 1024 784
.39 .77 0.1463 0.5929 0.1521
n n n n n

∑ yi =94. 4 8 ∑ x i=155. 05 ∑ x i y i=3011.371 ∑ x i2=4763 . 979 ∑ y i2=1993.816


i=1 i=1 i=1 i=1 i=1
n
1
x́= ∑ x i=
n i=1
n
( 101 ) ( 155.05 )=15. 505
1
ý= ∑ y i=
n i=1
n
( 101 )( 94.4 8)=9. 44 8
n n n
1
S xy =∑ ( x i− x́ ) ( y i− ý )=∑ x i yi − ∑ x i ∑ y i
i=1 i=1 n i=1 i=1
1
S xy =3011.371− ( 155.05 )( 94.48 )=3011.371−1 464.912=1546 . 459
10
n n n 2
1
S xx =∑ ( x i− x́ )2=∑ xi2− ∑ x i
i=1 i=1 n i=1 ( )
1
S xx =4765.326− ( 155.05 )2=4765.326−2404.05=2359 . 92 9
10
S 1546.459
β 1= xy =
^ =0.65 5
S xx 2359.929
^
β 0= ý − ^
β1 x́=9.448−( 0.655299 ) (15 .5 05 ) =9.448−10.15975=−0 . 71175 −0.712

Given that ^y = β^0 + β^1 x then ^y =−0 .712+0 . 655 x


n n n 2
1
2
S yy =∑ ( y i− ý ) =∑ y i − ∑ y i
i=1 i=1 n i=1
2
( )
1
S yy =1993.816− ( 9 4.48 )2=1993.816−892.647=1 101.1686
10
^
β 1=0.6552528 … 0.655 and S xy =1546.459
SSE=S yy− ^ β 1 S xy=1101.1686−( 0.6552528 )( 1546.459 )=1101.1686−1013.259=87.8473
SSE 87.8473
S2 = = =10.98091 10.98
n−2 10−2
¿
b. Use the code x i =x i− x́

yi x i¿ x i¿ y i x i¿2 y i2
23.00 23.496 540.408 552.062016 529
22.30 21.996 490.5108 483.824016 497.29
9.40 6.696 62.9424 44.836416 88.36
9.70 1.996 19.3612 3.984016 94.09
.15 -14.864 -2.2296 220.938496 0.0225
.28 -15.054 -4.21512 226.622916 0.0784
.75 -12.884 -9.663 165.997456 0.5625
.51 -13.144 -6.70344 172.764736 0.2601
28.00 16.496 461.888 272.118016 784
.39 -14.734 -5.74626 217.090756 0.1521
n n n n n
2 ¿ ¿
∑ yi =94.48 ∑ y i =1993.816 ∑ x i =0 ∑ x i y i=1546. 459 ∑ x ¿2
i =2360.239
i=1 i=1 i=1 i=1 i=1
n
1 1
x́ ¿=∑
n i=1
n
x ¿i=
10 ( )
( 0 )=0

1 1
ý= ∑ y i=
n i=1
n
10 ( )
( 94.48 )=9.448
n n n
1
S x y =∑ ( x ¿i − x́¿ ) ( y i− ý )=∑ x ¿i y i−
¿
∑ x ¿i ∑ y i
i =1 i=1 n i=1 i=1
1
S x y =1546.459− ( 0 ) ( 94.48 )=1546.459−0=1546.459
¿
10
n n n 2
2 1
S x x =∑ ( x − x́ ) =∑ x − ∑ x ¿i
¿ ¿

i=1
¿
i
¿

i=1 n i=1
¿2
i ( )
1
S x x =2360.239− ( 0 )2=2360.239−0=2360.239
¿ ¿
10
S 1546.459
β 1= x y =
¿
^ =0.655
S x x 2360.239
¿ ¿

^
β 0= ý − ^β1 x́ ¿=9.448−( 0.655 ) ( 0 ) =9.448−0=9.448

Given that ^y = β^0 + β^1 x then ^y =9.448+0.655 x¿

n n n 2
1
S yy =∑ ( y i− ý ) 2=∑ y i2−
i=1 i=1 n ( )
∑ yi
i=1
1
S yy =1993.816− ( 94.48 )2=1993.816−892.647=1 101.1686
10
β 1=0.6552528 … 0.655 and S x y =1546.459
^ ¿

SSE=S yy− ^ β 1 S x y =1101.1686− ( 0.6552528 )( 1546.459 ) =1101.1686−1013.259=87.8473


¿

SSE 87.8473
S2 = = =10.98091 10.98
n−2 10−2

It has the same SSE and S2 with part (a).

You might also like