{VERSION 5 0 "SUN SPARC SOLARIS" "5.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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 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 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 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 O utput" 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 "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 1 }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 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 13 258 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 }} {SECT 0 {PARA 11 "" 1 "" {TEXT 256 13 "ACCESS - MATH" }}{PARA 257 "" 0 "" {TEXT -1 9 "July 2005" }}{PARA 256 "" 0 "" {TEXT -1 49 "Notes on \+ Body Mass Index and actual national data" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 258 28 "W hat is the Body Mass Index?" }}{PARA 0 "" 0 "" {TEXT -1 383 " If y ou read newspapers and magazines it is likely that once or twice a yea r you run across an article about the body mass index (B.M.I.) , and i ts use in determining health risk factors for overweight and underweig ht people. If you search the internet for \"body mass index\" you wil l find many sites which let you compute your B.M.I., and which tell yo u a little bit about it. " }}{PARA 0 "" 0 "" {TEXT -1 931 " A pe rson's B.M.I. is computed by dividing their weight by the square of th eir height, and then multiplying by a universal constant. If you meas ure weight in Newtons, i.e. mass in kilograms, and height in meters, t his constant is the fine number one. If you use pounds and inches inst ead, and are good at conversions you will work out that the constant i s about 703. Or you might just find a calculator on the internet whic h confirms this. Since your B.M.I. is supposed to indicate health ris ks, proponants of the B.M.I index are claiming that if for two diffe rent people, their weights are the same multiple (i.e. their common B. M.I.) of their heights-squared, then these people have comparable heal th risks. Thus, unless height itself is a health risk, the B.M.I. hyp othesis can be interpreted as a biometric scaling law that says that o n average, weight should scale proportionately to the square of height in people." }}{PARA 0 "" 0 "" {TEXT -1 906 " As we have discussed in class, if people were to scale equally in all directions (\"self-s imilar\") when they grew, volume and hence weight would scale as the c ube of height. That particular power law seems a little high, since \+ adults don't look like uniformly expanded versions of babies; we seem \+ to get relatively stretched out when we grow taller. One might expect the best predictive power for weight as a function of height to be so mewhere between 2 and 3, if one expected a power law at all. If there is a predictive power, and if it is much larger than 2, then one coul d argue that the body mass index might need to be modified to reflect \+ this fact. (In fact, when you find body mass index tables, they often \+ explain how and why you should modifiy the acceptable BMI values for c hildren. Is it possible that if a different power law had been used, n o such modification would have been needed?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 386 " You women did a great job collecting height-weight data -we got over 100 points, including the \+ three which I snuck in, and unlike in previous years I don't have to g o back into my archives and add old data points. Each group will use o ur common data, see if it is consistent with a power law relating wei ghts to heights, and decide whether the B.M.I. power of 2 is a good ch oice. " }}{PARA 0 "" 0 "" {TEXT -1 873 " Several years ago I found a national data base at the U.S. Center for Disease Control web site. It contained a wide variety of body measurements collected between 1 976 and 1980, including national median heights and weights for boys a nd girls, age 2-19. By using only the national medians a lot of the v ariance has been taken out of the data, compared to what yours will lo ok like. The national data is very consistent with a power law, with p ower = 2.6. When you do a literature and computer search into the hi story of the B.M.I. index and height-weight scaling laws, as part of y our project work for this week, you might discover that (by centuries) we're not the first people to stumble upon a power other than 2, base d on empirical data. As far as I know their is no mathematical model \+ to explain the correct empirical law for height-weight scaling in peop le!" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 31 "H ow do you test for power laws?" }}{PARA 0 "" 0 "" {TEXT -1 249 " W hen you studied logarithms in high school you might have wondered what they were good for. From both Meagan's and Ken's talks this week you know that one important application is in looking for power laws. Re member how the discussion goes: " }}{PARA 0 "" 0 "" {TEXT -1 148 " \+ Suppose we have a set of \"n\" data points, which you can think of \+ as your height-weight data, but which could really be any set of paire d data:" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#7'7$&%\"xG6#\"\"\"&% \"yGF'7$&F&6#\"\"#&F*F-7$&F&6#\"\"$&F*F2%$...G7$&F&6#%\"nG&F*F8" }}} {PARA 0 "" 0 "" {TEXT -1 68 "We want to see if there is a power m and \+ a proportionality constant " }{XPPEDIT 18 0 "b;" "6#%\"bG" }{TEXT -1 21 " so that the formula" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/% \"yG*&%\"bG\"\"\")%\"xG%\"mGF'" }}}{EXCHG {PARA 11 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 36 "effectively mirrors the real data. \+ " }{TEXT 259 60 "Taking (natural) logarithms of the proposed power la w yields" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/-%#lnG6#%\"yG,&-F% 6#%\"bG\"\"\"*&%\"mGF,-F%6#%\"xGF,F," }}}{PARA 0 "" 0 "" {TEXT -1 15 " So if we write " }{XPPEDIT 18 0 "Y = ln(y);" "6#/%\"YG-%#lnG6#%\"yG" } {TEXT -1 7 " and " }{XPPEDIT 18 0 "X = ln(x);" "6#/%\"XG-%#lnG6#%\"x G" }{TEXT -1 3 ", " }{XPPEDIT 18 0 "B = ln(b);" "6#/%\"BG-%#lnG6#%\"b G" }{TEXT -1 59 ", this becomes the equation of a line in the new vari ables " }{XPPEDIT 18 0 "X;" "6#%\"XG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "Y;" "6#%\"YG" }{TEXT -1 1 ":" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"YG,&%#mXG\"\"\"%\"BGF'" }}}{PARA 0 "" 0 "" {TEXT -1 5 "Thus," }{TEXT 263 1 " " }{TEXT 264 321 "in order for there to be a power law for the original data, the ln-ln data should (approximate ly) satisfy the equation of a line. Furthermore, this process is reve rsible; if the ln-ln data lies on a line with slope m and intercept B, then the original data satisfies a power law with power m and proport ionality constant" }{TEXT 265 1 " " }{XPPEDIT 18 0 "b = exp(B);" "6#/% \"bG-%$expG6#%\"BG" }{TEXT 262 1 "." }{TEXT -1 43 " That's because of the rules of exponents:" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/% \"YG,&%\"BG\"\"\"*&%\"mGF'%\"XGF'F'" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #/-%$expG6#%\"YG-F%6#,&%\"BG\"\"\"*&%\"mGF,%\"XGF,F," }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/-%$expG6#%\"YG*&-F%6#%\"BG\"\"\")-F%6#%\"XG%\"mGF, " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"yG*&%\"bG\"\"\")%\"xG%\"mGF'" }}}{PARA 0 "" 0 "" {TEXT -1 148 "In real experiments, it is not too ha rd to see if the ln-ln data is well approximated by a line, so this tr ick with the logarithm is quite useful. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 261 24 "National data exam ple: " }{TEXT -1 162 "I used colons after most of these commands to s uppress the output. If you want to go back and see what each command \+ is doing, replace the colons with semicolons." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 257 0 "" }{TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name cha ngecoords has been redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 334 "boyhw:=[[35.9,29.8],[38.9,34.1],[41.9,38.8],[44.3,42.8],\n \+ [47.2,48.6],[49.6,54.8],[51.4,60.8],[53.6,66.5],\n [55.7,7 6.8],[57.3,82.3],[59.8,93.8],[62.8,106.8],\n [66.0,124.3],[67.3 ,132.6],[68.4,142.4],[68.9,145.1],\n [69.6,155.3],[69.6,153.2]] :\n#boy heights (inches) weights (pounds): Ntl medians for ages 2-19" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 336 "girlhw:=[[35.4,28.0],[38 .4,32.6],[41.1,36.8],[43.9,41.8],\n [46.6,47.0],[48.9,52.5],[51 .4,60.8],[53.1,65.5],\n [55.7,76.1],[58.2,89.0],[61.0,100.1],[6 2.6,108.1],\n [63.3,117.1],[64.2,117.6],[64.3,122.6],[64.2,128. 8],\n [64.1,124.5],[64.5,126]]:\n#girl heights(inches) weights \+ (pounds): Ntl medians for ages 2-19 " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 138 "boys:=pointplot(boyhw):\ngirls:=pointplot(girlhw):\n display(\{boys,girls\},\n title=`plot of [height,weight], National \+ medians ages 2-19`);\n" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{PARA 0 " " 0 "" {TEXT -1 29 "And now for the ln-ln data. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "with(linalg): #one of two linear algebra pac kages in Maple" }}{PARA 7 "" 1 "" {TEXT -1 80 "Warning, the protected \+ names norm and trace have been redefined and unprotected\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 237 "B:=evalm(boyhw): #\"evalm\" stand s for evaluate as a matrix,\n #converts an array of points\n #into a matrix, which will be easiser to manipulate in Maple\nG:=evalm(girl hw):\nBG:=stackmatrix(B,G): #stack the matrices on top of eachother. " }}}{EXCHG {PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 240 "lnBGa:=map(ln,BG): #take ln of the boy and girl h eight-weights\nlnBG:=map(evalf,lnBGa): #Get decimal (floating point) \+ values.\n #This speeds up computations later in the\n #least squares fit - otherwise Maple tries working\n #symbolically." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "lnlnplot:=pointplot(lnBG):\ndisplay (lnlnplot,title=`ln-ln data`);\n" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 266 58 "How do I find the best li ne fit to a collection of points?" }}{PARA 0 "" 0 "" {TEXT -1 37 " \+ From Calculus, there is a slope " }{XPPEDIT 18 0 "m;" "6#%\"mG" } {TEXT -1 15 " and intercept " }{XPPEDIT 18 0 "B;" "6#%\"BG" }{TEXT -1 151 " yielding a line which minimizes the sum of the squared vertical \+ distances between your data points and the points on a line. If the n data points are" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 11 " " 1 "" {XPPMATH 20 "6#7'7$&%\"XG6#\"\"\"&%\"YGF'7$&F&6#\"\"#&F*F-7$&F& 6#\"\"$&F*F2%$...G7$&F&6#%\"nG&F*F8" }}}{PARA 0 "" 0 "" {TEXT -1 5 "th en " }{XPPEDIT 18 0 "m" "6#%\"mG" }{TEXT -1 5 " and " }{XPPEDIT 18 0 " B" "6#%\"BG" }{TEXT -1 30 " solve the system of equations" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/*&-%'matrixG6#7$7$-%$SumG6$*$)&%\"XG6 #%\"iG\"\"#\"\"\"/F2;F4%\"nG-F+6$F/F57$F8F7F4-F&6#7$7#%\"mG7#%\"BGF4-F &6#7$7#-F+6$*&F/F4&%\"YGF1F4F57#-F+6$FIF5" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 711 "You could solve this sy stem with several \"do-loops\" to compute the matrix entries, followed by a \"solve\" command to solve the system, but the method is so comm on that every decent mathematical software or graphing calculator alre ady has a command to do all of that work for you. In statistics this \+ procedure is called linear regression as well as the method of least s quares. If you looked through the help directory in your menu bar you would eventually find MAPLE's version of this command living in the s tats library packag, and called \"fit[leastsquare]\". Here's how the \+ command works. I've used it to check the example we just worked by ha nd in class. You must be careful with brackets and parantheses." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(stats):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 293 "fit[leastsquare[[X,Y]]]([[0,2,4],[ 1,2,1]]);#the syntax here is\n#to first name your variables, then give two lists, one of the first variable\n#values, and the second with th e corresponding second variable values. Thus\n#we are trying to find \+ the best line fit for the points [0,1],[2,2],[4,1].\n" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "Now that we' ve tested the command, we can use it on the national data:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 264 "Xs:=convert(col(lnBG,1),list): #co nvert the first column of\n #the ln-ln data into a list of the \"x's \" The least squares\n #command wants to have lists input, not matri x columns, even\n #though it's hard for us to see any difference\nYs: =convert(col(lnBG,2),list):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "fit[leastsquare[[X,Y]]]([Xs,Ys]); \n" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 258 "" 0 "" {TEXT -1 65 "We can paste in the e quation of the line and see how well we did." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 132 "line:=plot(-6.038703303+2.593828004*X, X=3.4..4 .5,Y=2.7..5.7,\n color=black):\ndisplay(\{line,lnlnplot\}, title=`le ast squares fit`);\n" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "Finally, we can go back from the least sq uares line fit to a power law" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "m:=2.593828004; #power\nb:=exp(-6.038703303); #proportionality \+ constant\n" }}{PARA 11 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 254 "powerplot:=plot(b*h^m,h=0..80,w=0..200,color=blac k):\ndisplay(\{powerplot,boys,girls\},title=\n `power law approximati on for national height-weight data`);\n#by calling the variables h and w, and giving their ranges, I\n#get Maple to label the axes as I want \n" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{PARA 11 "" 1 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "57 1 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }