You are on page 1of 7
108 Chopter 2 Matrices ‘The economic systems described in Examples 7 and 8 are, of course, simple ones. In the real world, an economic system would include many industries or industrial groups. For example, an economic analysis of some of the producing groups in the United States would include the products listed below (taken from the Statistical Abstract of the United States. 1. Farm products (grain, livestock, poultry, bulk milk) Processed foods and feeds (beverages, dairy products) Textile products and apparel (yarns, threads, clothing) Hides, skins, and leather (shoes, upholstery) Fuels and power (coal, gasoline, electricity) ‘Chemicals and allied products (drugs, plastic resins) Rubber and plastic products (ies, plastic containers) Lumber and wood products (plywood, pencils) Pulp, paper, and allied products (cardboard, newsprint) 10. Metals and metal products (plumbing fixtures, cans) 11. Machinery and equipment (tractors, drills, computers) 12, Fumiture and household durables (carpets, appliances 13. Nonmetallic mineral products (glass, concrete, bricks) 14, Transportation equipment (automobiles, wucks, planes) 15. Miscellaneous products ((oys, cameras, linear algebra texts) A matrix of order 15 15 would be required to represent even these broad industrial groupings using the Leontief input-output model, A more detailed analysis could easily require an input-output matrix of order greater than 100 x 100, Cleatly, this type of analy- sis could be done only with the aid of a computer. Least Squares Regression Analysis ‘You will now look at a procedure that is used in statistics to develop linear models. The next example demonstrates a visual method for approximating a line of best fit for a given set of data points. EXAMPLE 9] _ A Visual Straight-Line Approximation Determine the straight line that bes isthe points (1,1), 2,2), 4), (4.4), and (5,6) soLurion Plot the points, as shown in Figure 2.2. It appears that a good choice would be the line whose slope is 1 and whose y-intercept is 0.5. The equation of this line is y= 05 +x, ‘An examination of the line shown in Figure 2.2 reveals that you can improve the fit by rotating the line counterclockwise slightly, as shown in Figure 2.3. It seems clear that this new line, the equation of which is y= 1.2x, fits the given points better than the original line Model 2 Figuee 2.4 6 Section 2.5 Applications of Matrix Operations 109 Figure 2.2 Figure 23 ‘One way of measuring how well a function y = f(x) fits a set of points Oxy. Yi)s Oa Yad 6 2 ge Yd is to compute the differences between the values from the function f(x,) and the actual values y,, as shown in Figure 24, By squaring these differences and summing the results, you obtain a measure of error that is called the sum of squared error. The sums of squared errors for our two linear models are shown in Table 2.1 below. TABLE 2.1 Model 1:f() = 05 + x Model 2: 0) = 12x * fe) | be fG0P x fe) | b-FooP 14 1s | (0s rot a2 | op 2 2 2s | (05) 2 2 24 | Coap 34 as | Gos 3436 | (04 44 as | (05) 4 4 48 | Cos 56 ss | Gos s 6 60 | (+00) Toval 125 Total 1.00 The sums of squared errors confirm that the second model fits the given points better than the frst ‘Of all possible linear models for a given set of points, the model that has the best ft is defined to be the one that minimizes the sum of squared error. This model is called the least squares regression line, and the procedure for finding it is called the method of least squares. 110 Chopter 2 Matrices Definition of Least Squares Regression Line For a set of points (x94), (iy ¥a).- - -+ ly Yq) the least squares regression line is given by the linear function LO) = dy + ax that minimizes the sum of squared error Ly —s/0)P + Ly. — Fl) P + + Dy — SO). To find the least squares regression line for a set of points, begin by forming the system of linear equations vi = foe) + Dy — fle] ys = fx) + Ds — fls)] Jn = £05) + Dn — 050) where the right-hand term, [y,— f(;)] of each equation is thought of as the errr in the approximation of y, by fx). Then waite this error as ey Sl) so that the system of egutions takes the fom 1 lay + ax) + ey ra (a tam) +6 Yn = (dy + ayy) + Ee Now, if you define ¥, X,A, and E as vy tox ea 4, Jn. Tay, en. the m linear equations may be replaced by the matrix equation Y=XA+E. Note that the matrix X has ovo columns, a column of I's (corresponding to a,) and a column containing the 2's. This matrix equation can be used to determine the coefficients of the least squares regression line, as follows. Matrix Form for Linear Regression Section 2.5 Applications of Matrix Operations YI REMARK: You will learn more about this procedure in Section 5.4, Example 10 demonstrates the use of this procedure to find the least squares regression line for the set of points from Example 9. Find the least squares regression line for the points (1, 1), (2,2), (3,4), (4,4), and (5, 6) EXAMPLE 10] _ Finding the Least Squares Regression Line (see Figure 2.5), Then find the sum of squared ertor for this regression line. SoLvTION Using the five points below, the matrices X and Y are Least Squares Regression Line Figure 25 ta 1 12 2 x-]1 3] ma y-/s 14 4 Los 6 This means that toa 12 pride SIs ee[Tasaalli apis s 1 4 1 5 and 1 2 baadd "7 ry = - er-[ta sa alfel-Loh 4 6 112 Chapter 2. Matrices Now, using (X7X)~! to find the coefficient matrix A, you have A= (XTXIIXTY [-ssl[e]-["3] ‘The least squares regression line is y= 702+ 126 (See Figure 2.5.) The sum of squared error for this line can be shown to be 0.8, which ‘means that this line fits the data better than either of the two experimental linear models determined earlier. S) Ae (0) PRY Exercises Stochastic Matrices In Exercises 1-6, determine whether the matrix is stoclastc. v2 r v2 Tr Lo os oo. 01 toad 1 0 0 0 Lad o 1 0 0 Sis ge Slo 0 1 0 pogo d 0 0 0 1 887, The maker fescach depriment at a mutating. plant determines that 20% of the people who purchase the plants produet during any month will not purchase it the next month, ‘On the other hand, 30% of the people who do not purchase the produet during any month will purchase it the next month. In a population of 1000 people, 100 people purchased the product {his month, How many will purchase the product next month? Ia, 2 months? ‘A medical researcher is studying the spread of a virus in a population of 1000 laboratory mice. During any week there is an ‘80% probability that an infected mouse will evercome the Virus, and during the same week there is a 10% probability that a noninfected mouse will become infected. One hundred mice are currently infected with the virus How many will be infected next ‘week? In 2 weeks? Bs, 9B 9. A population of 10.00% grouped as flows: 5000 nonsmokers 2500 smokers af ne pack resp day. and 2500 scr of fe tha oe ack er da. Due aa) moth thee is 8% Probshly tht nensoker wil bei stekng a pack et ies pr day, anda 2% probably hata nensmoker wl een smoking me than pack pe ay. Ter smoker wh se peck oss pe day thee 10% ebabliy ef uring and a Tos probably of ncresing to more tan pack pet or smoker who smoke more than a pck pet day, there i 05% probaly of quting and 410% probaly of roping toa pack rls er day, How many people wl be in ech ofthe Soup in Toa Hx as? A population of 100000 consumers it grouped as follows 20.00 ses of Brand A 30.000 ues ef Band B, and 30000 eho wn tran Ding ay oct «Bea Aust has 20% probly of wichng to Brand Banda SY pebbiliy of sot ng eer Mand, A Brand B ws bs 15% poke Diy of swithing to Brand A and a 10% probability ene sing ste rand A none hasa10% probaly of purchas ing rand A anda 19% probably of purchasing Brand 8 How ty people il bein each rou nT month? 2 ont? a Simeths! A college dormitory houses 200 stents, Those who wach an ture area tlvson on anyday lay wach fees an tm bur te next da. One-Tourh of hose ho wath eleven feces than an our ne day wil wach a out rote he et tay Hal ofthe state's watched lve for an oa mee tod, How any Wil wath levi fra her of mee temo? tn days In 30 days? B10. Bu. 48 12 Foc the mati of trans probbilis Jos ot on P=|02 07 01 02 02 08. find P2X and POX forthe state mateix [ 100" x =| 100 | s00, ‘Then find the steady state matrix for P. 43, Prove that the product of (wo 2x2 stochastic mattices is stochastic. AA, Let P be a 2 x 2 stochastic matrix, Prove that there exists a 2 x 1 slate matrix X with nonnegative entries such that PX = X. Cryptography Jn Exercises 15-18, find the uncaded row matrices of the indicated size for the given messages, Then encode the message using the rate A, AS. \essoge: SELL CONSOLIDATED Row Matrix Sie: 13 1-1 0 Encoding Mor: A=] 1 0 —1 6 203 16, sessoge: PLEASE SEND MONEY Row Matrix Size: 13 4022 Encoaing Mout A= ]=3 —3 =I 30201 17. \Messase: COME HOME SOON Row Matrix Size: 1 2 12 3S 18, sesoge: HELP 1S COMING Row Matrix Size: 1% 4 rates A [ -203 -1 71 -1 ort -b-1 12 31-2 =4 Encoding Morr: A= Section 2.5 Applications of Matrix Operations 113, In Bxereises 19-22, find AW and use it to decade the exyptogram, - way jl 11 os 2 #39352 4 07555 9 my wal 3] 85 120 6 8 10 15 84 117 42 56 90 125 60 80 30 45 19 26 1 2 3 o. <1 -4 -7 13 19 10 -1 -33 -773 -2 -14.41 -a7 41-9 3-42 o 2 4-5 3 mA RAR 112 —140 83 19 —25 13 72 —76 61 95 —118 71 20 21 38 35 -23 36 42 —48 32 23. The ceyptogram below was encoded with a 2 2 matrix. 8 21 -15 10 13 -13 § 10 5 255 19 -1 6 20 40 18 18 1 16 ‘The last word ofthe message is _RON. What isthe message? 24, The exyplogram below was encoded with a x 2 matrix $225 1-2-7 -15 -15 32 M4 8 -13 38 19-19 1937 16 ‘The last word ofthe message is_SUE, What isthe message? B25. Use a graphing utility or computer software program with ‘matrix eapabilties to find AW!, Then decode the eryptogram 10 2 as|2-1 1 o 1 2 38 —14 29 56 —15 62 17 3 38 18 20 76 18 -5 21 29 =7 32 32.9 77 36-8 48 38 —5 S141. 3-79 121 26 58 —22 49 63 —19 69 28 § 67 31 -11 27 41 —I8 28, 114 Chopter 2 Matrices 26. A code breaker intercepted the encoded message below: 45 —35 38 -30 18 —18 35 -30 81 —60 42 -28 75 (@) You know that [45 — 35171 = [10.15] and [38 - 30/4? = [8 14], where A! is the inverse of the encoding matrix A, Write and solve two systems of equations to find w. x,y, and z (©) Decode the message. Leontief Input-Output Models 27. A system composed of two industries, coal and steel, has the following input requirements. (@) To produce $1.00 worth of output, tke coul industry equites $0.10 ofits own product and $0.80 of steel () To produce $1.00 worth of output, the stee] industry requires $0.10 of its own product and $0.20 of coal Find D, the input-output matrix for this system, Then solve for the output matrix X in the equation X = DX + E, where the extemal demand is 10,000 20,000) 28, An industrial system has two industries with the following inp requirements. (@) To produce $1.00 worth of output, Industy A requites $0.30 of its own product and $0.40 of Industry B's product. () To produce $1.00 worth of outpot, Industry B requires $0.20 of its own product and $0.40 of Industy A's product Find D, the input-ontput matrix for this system, Then solve for ‘he ouput matsix X in the equation X = DX + E, where the external demand is 50,000" 30,000! ‘A small community inchudes a farmer, a baker, anda grover and bas the input-oupot matix D and extemal demand matrix E shown below E= E Farmer Baler Grocer 040 050 050) Famer 1000 D={030 000 030) saier and =| 1000 020 020 0.00} Grocer 1000. Solve forthe output matix X in the equation X = DX + E. 40. An indi system has thee indies and the input sit nats D and extemal demand mati E shown below 02 04 of 5000) p=|o4 02 02) and 2000 00 02 02, 000 | Solve forthe output matix Xin the equation X = DX + E Least Squares Regression Analysis In Exercises 31-34, (a) sketch the line that appears to be the best fit for the given points, (b) use the method of least squares to find the least squares regression line, and (¢) calculate the sum of the squared error. (26) In Exercises 3542, find the least squares regression line. 35. 0,0),(1,1),2.4) 36. (1,.),8,3).(5,6) i 0.(0.0).(,2) (-4,-1,2.0,2,4,045) 39. (~5,1),(1, 3), (2,3). (2,5) 40. (-3,4),(-1,2).(1, 0.8.0) 41. (5,10), (1,8), 6,6), 7.4.5.8) 42. 0.6),(4.3), (5.0). (8, ~4), (10, -5)

You might also like