{VERSION 4 0 "SUN SPARC SOLARIS" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier " 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Plot" 0 13 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {PARA 11 "" 1 "" {TEXT -1 0 "" }{TEXT 256 0 "" }{TEXT 257 9 "M ATH 2270" }}{PARA 257 "" 0 "" {TEXT -1 19 "Tuesday, November 7" }} {PARA 256 "" 0 "" {TEXT -1 30 "More notes on Body Mass Index." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 258 111 "Let's r evisit the U.S. height weight data which we discussed last week, and t alk a little bit about statistics." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "with(linalg):with(plots):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 293 "A1:=matrix([[35.9,38.9,41.9,44.3,4 7.2,49.6,51.4,53.6,55.7,\n 57.3,59.8,62.8,66.0,67.3,68.4,6 8.9,69.6,69.6],\n [29.8,34.1,38.8,42.8,48.6,54.8,60.8,66.5, 76.8,82.3,93.8,\n 106.8,124.3,132.6,142.1,145.1,155.3,153.2 ]]);\n #boy heights, weights: medians for ages 2-19" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%#A1G-%'matrixG6#7$74$\"$f$!\"\"$\"$*QF,$\"$>%F,$ \"$V%F,$\"$s%F,$\"$'\\F,$\"$9&F,$\"$O&F,$\"$d&F,$\"$t&F,$\"$)fF,$\"$G' F,$\"$g'F,$\"$t'F,$\"$%oF,$\"$*oF,$\"$'pF,FK74$\"$)HF,$\"$T$F,$\"$)QF, $\"$G%F,$\"$'[F,$\"$[&F,$\"$3'F,$\"$l'F,$\"$o(F,$\"$B)F,$\"$Q*F,$\"%o5 F,$\"%V7F,$\"%E8F,$\"%@9F,$\"%^9F,$\"%`:F,$\"%K:F," }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 260 "B1:=matrix([[35.4,38.4,41.1,43.9,46.6,48.9 ,51.4,53.1,55.7,\n 58.2,61.0,62.6,63.3,64.2,64.3,64.2,64.1, 64.5],\n [28.0,32.6,36.8,41.8,47.0,52.5,60.8,65.5,76.1,89.0, 100.1,\n 108.1,117.1,117.6,122.6,128.8,124.5,126.0]]);\n # girl data " }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%#B1G-%'matrixG6#7$74 $\"$a$!\"\"$\"$%QF,$\"$6%F,$\"$R%F,$\"$m%F,$\"$*[F,$\"$9&F,$\"$J&F,$\" $d&F,$\"$#eF,$\"$5'F,$\"$E'F,$\"$L'F,$\"$U'F,$\"$V'F,FE$\"$T'F,$\"$X'F ,74$\"$!GF,$\"$E$F,$\"$o$F,$\"$=%F,$\"$q%F,$\"$D&F,$\"$3'F,$\"$b'F,$\" $h(F,$\"$!*)F,$\"%,5F,$\"%\"3\"F,$\"%r6F,$\"%w6F,$\"%E7F,$\"%)G\"F,$\" %X7F,$\"%g7F," }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 44 "AB:=augment(A1,B1):\n #boys-girls combined \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "A2:=map(ln, AB): \n \+ #take ln of each matrix entry" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "A3:=map(evalf,A2): \n #get each decimal value" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "coldim(A3); \n #number of data p oints " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#O" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 50 "col2:=vector(coldim(A3),1): \n #a vector of 1's." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 131 "A4t:=delrows(A3,2 ..2): \n #remove the second row of A3, what remains\n #is the firs t row, which will be the first\n #column of A" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 19 "A4:=transpose(A4t):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "A:=augment(A4,col2): \n #This is our matrix for least squares" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "bt:=delro ws(A3,1..1):\nb:=transpose(bt):\n #This is the right-hand side for le ast squares" }}}{PARA 0 "" 0 "" {TEXT -1 75 "The next three commands f ind the least-squares solution, as in section 8.4." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "ATA:=evalm(t ranspose(A)&*A);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$ATAG-%'matrixG6 #7$7$$\"+Onc`d!\"($\"+!R\"RP9F,7$F-\"#O" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "ATb:=evalm(transpose(A)&*b);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$ATbG-%'matrixG6#7$7#$\"+uKpVi!\"(7#$\"+f " 0 "" {MPLTEXT 1 0 69 "linsolve(ATA,ATb);\n #get \+ the slope and intercept for the ln-ln data" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%'matrixG6#7$7#$\"+*=)[$f#!\"*7#$!+%40u.'F*" }}}{PARA 0 "" 0 "" {TEXT -1 54 " Graph the least-squares line fit for the ln-ln datat:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "lnlnplot:=pointp lot(\{seq([A3[1,j],A3[2,j]],j=1..coldim(A3))\}):\n #those are the points from the ln-ln data in\n #the A3 matrix" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 197 "line:=plot(2.5934881*x -6.037405, x=3.2. .4.5, color=black):\n #Now x is measuring ln(inches), and this is \n #a good x-range for our data\n #I used the mouse to paste in the coefficients" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "dis play(\{lnlnplot,line\});" }}{PARA 13 "" 1 "" {GLPLOT2D 308 253 253 {PLOTDATA 2 "6&-%'POINTSG6E7$$\"+b`)Q1%!\"*$\"+qjj)[%F)7$$\"+y_wOTF)$ \"+Dn0$o%F)7$$\"+H`)y9%F)$\"+r#GIw%F)7$$\"+6K+iTF)$\"+N!*GnZF)7$$\"+J' fN;%F)$\"+Cq#*3[F)7$$\"+kQ(36%F)$\"+'ophg%F)7$F7$\"+93Ee[F)7$$\"+C_mmT F)$\"+2>GO[F)7$$\"+kVWgTF)$\"+;dIC[F)7$$\"+&HP2e$F)$\"+%R3XR$F)7$$\"+^ U*4m$F)$\"+%Q(HHNF)7$$\"+FeGNPF)$\"+Z-UeOF)7$$\"+xY)4z$F)$\"+.\"Qlv$F) 7$$\"+$*QRaQF)$\"+JNi$)QF)7$$\"+M3*R!RF)$\"+%>!p.SF)7$$\"+s\"Q'RRF)$\" +*y*e2TF)7$$\"+o!\\:)RF)$\"+[>?(>%F)7$$\"+Z,)*>SF)$\"+SY?TVF)7$$\"+C1I [SF)$\"+36P5WF)7$$\"+hc+\"4%F)$\"+c[;TXF)7$$\"+t]&*RTF)$\"+Fz&4n%F)7$$ \"+UZl*=%F)$\"+**zpA[F)7$$\"+P-;4UF)$\"+yqL()[F)7$$\"+DGPDUF)$\"+N5`c \\F)7$$\"+yhlKUF)$\"+gJUx\\F)7$$\"+nXwUUF)$\"+I(e`/&F)7$F]s$\"+dUuJ]F) 7$$\"+?=rmNF)$\"+5X?KLF)7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$\"3`m;/GT)4J%Fav$ \"3))R\\ON53V^Fav7$$\"3+Me*3vF$QVFav$\"3q4\"[eR'*R@&Fav7$$\"3-++]+PXjV Fav$\"3\"[rZrCg\"z_Fav7$$\"3/L$3U(3D#R%Fav$\"3S4RZu`%QN&Fav7$$\"30nmm4 u+=WFav$\"3EEBoUYk?aFav7$$\"3e*\\i&[#paW%Fav$\"3u%yi]fm=\\&Fav7$$\"3_+ vVKPvrWFav$\"3#=C274N+c&Fav7$$\"3++++++++XFav$\"3`,++]9HLcFav-%'COLOUR G6&%$RGBG\"\"!FhelFhel-%+AXESLABELSG6$Q\"x6\"Q!6\"-%%VIEWG6$;$\"#K!\" \"$\"#XFffl%(DEFAULTG" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{PARA 0 "" 0 "" {TEXT 259 0 "" } }{PARA 0 "" 0 "" {TEXT 260 458 "You notice that until adolescence the \+ boy and girl data are more or less indistinguishable. The \"baby fat \" of small children may explain why the 2-year olds are slightly abov e the line, and the peaking near adulthood for both the males and fema les is quite likely to be the effect of their respective hormones. Bu t this data IS very close to a linear fit. One might wonder what sort of biological advantage this sort of scaling is a consequence of. I \+ do." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 262 11 "N ew Today: " }{TEXT -1 173 " In statistics one measures for a possible linear relationship between variables by using the sample correlation coefficient. (See attached xerox from the Math 3070 text, " }{TEXT 261 59 "Probability and Statistics for Engineering and the Sciences" } {TEXT -1 154 ", by J.L. Devore. ) We will discuss in class today the \+ way in which this is actually an measure of the cosine of the angle be tween the x and the y data. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "ln xav:=sum(A3[1,k],k=1..coldim(A3))/coldim(A3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&lnxavG$\"+hQv#*R!\"*" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "lnyav:=sum(A3[2,k],k=1. .coldim(A3))/coldim(A3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%&lnyavG$ \"+')[v " 0 "" {MPLTEXT 1 0 73 "lnxvectav: =vector(coldim(A3),lnxav):\nlnyvectav:=vector(coldim(A3),lnyav):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 "lnxvect:=row(A3,1):\nlnyvect :=row(A3,2):\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "costheta: =(x,y)->dotprod(x,y)/(norm(x,2)*norm(y,2));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%)costhetaGR6$%\"xG%\"yG6\"6$%)operatorG%&arrowGF)*&-% (dotprodG6$9$9%\"\"\"*&-%%normG6$F1\"\"#F3-F66$F2F8F3!\"\"F)F)F)" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "costheta(lnxvect-lnxvectav, lnyvect-lnyvectav);\n #this is the sample correlation coefficient fo r our \n #ln-ln data. " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+A(o[# **!#5" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "arccos(%);\n #a measure of how parallel our two vec tors are" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+g]eE7!#5" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "42 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }