{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 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 1 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 1 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 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }{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 1 }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 1 }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 "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 "" 0 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 13 259 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 2001" }}{PARA 256 "" 0 "" {TEXT -1 25 "Notes on \+ Body Mass Index." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 258 28 "What is the Body Mass In dex?" }}{PARA 0 "" 0 "" {TEXT -1 384 " If you read newspapers and \+ magazines it is likely that once or twice a year you run across an art icle about the body mass index (B.M.I.) , and its use in determining \+ health risk factors for overweight and underweight people. If you sea rch the internet for \"body mass index\" you will find many sites whic h let you compute your B.M.I., and which tell you a little bit about i t. " }}{PARA 0 "" 0 "" {TEXT -1 1151 " A person's B.M.I. is comp uted by dividing their weight by the square of their height, and then \+ multiplying by a universal constant. If you measure weight in kilogra ms, and height in meters, this constant is the number one. Thus, the p roponants of the B.M.I index are claiming that for adults at equal ri sk levels (but different heights), weight should be proportional to th e square of height. As we have discussed in class, if people were to \+ scale equally in all directions (\"self-similar\") when they grew, vol ume and hence weight would scale as the cube of height. That particu lar power law seems a little high, since adults don't look like unifor mly expanded versions of babies; we seem to get relatively stretched o ut when we grow taller. One might expect the best predictive power fo r weight as a function of height to be somewhere between 2 and 3, if o ne expected a power law at all. If there is a predictive power, and i f it is much larger than 2, then one could argue that the body mass in dex might need to be modified to reflect this fact. (In fact, when you find body mass index tables, they often show acceptable values by age .)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 261 27 "Wh at is our B.M.I. project?" }}{PARA 0 "" 0 "" {TEXT -1 374 " We hav e all collected several heights and weights, and hopefully in aggregat e we will have a good number of representative measurements, from baby -sized to adult. We will use this data, and see if it is consistent w ith a power law relating weights to heights. In particular, we will s ee if we get a power law with exponent near 2, as we might expect from the B.M.I. " }}{PARA 0 "" 0 "" {TEXT -1 570 " I often do this ex periment with my linear algebra classes, and we have gotten powers bet ween 2.35 and 2.65. Also, last fall I found a national data base at t he U.S. Center for Disease Control web site. It includes a wide varie ty of body measurements collected between 1976 and 1980. I will use n ational median heights and weights for boys and girls, age 2-19. By t aking only the national medians I have taken a lot of the \"noise\" ou t of the data, compared to what ours will look like. From the national data a power law with power near 2.6 seems quite certain. " }{TEXT 265 1 " " }{TEXT -1 69 "However, I know of no mathematical model which explains this scaling." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 260 31 "How do you test for power laws?" }}{PARA 0 "" 0 "" {TEXT -1 173 " When you studied logarithms in high school you migh t have wondered what they were good for. Well, here's one application . You will see others in the next four years. " }}{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 paired data:" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#<&7 $&%\"hG6#\"\"\"&%\"wGF'7$&F&6#\"\"#&F*F-7$&F&6#\"\"$&F*F27$&F&6#%\"nG& F*F7" }}}{PARA 0 "" 0 "" {TEXT -1 89 "We want to see if there is a pow er p and a proportionality constant C so that the formula" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"wG*&%\"CG\"\"\")%\"hG%\"pGF'" }}} {PARA 0 "" 0 "" {TEXT -1 36 "effectively mirrors the real data. " } {TEXT 259 60 "Taking (natural) logarithms of the proposed power law yi elds" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/-%#lnG6#%\"wG,&-F%6#%\"CG\"\"\"*&%\"pGF,-F%6#%\"hGF,F, " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 263 136 "If we define new va riables, y=ln(w) and x=ln(h), and call ln(C)=b, this is just the equat ion of a line having slope p and y-intercept b:" }}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"yG,&*&%\"pG\"\"\"%\"xGF(F(%\"bGF(" }}}{PARA 0 "" 0 "" {TEXT 262 296 "In other words, in order for there to be a powe r law for the original data, the ln-ln data should (approximately) sat isfy the equation of a line. Furthermore, this process is reversible; if the ln-ln data lies on a line with slope p, then the original data satisfies a power law with exponent p." }{TEXT -1 147 " This last co nclusion is true by the following computation, which takes the line eq uation and exponentiates it, recovering the original power law:" }} {EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/-%$expG6#%\"yG-F%6#,&*&%\"pG\" \"\"%\"xGF-F-%\"bGF-" }}}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/-%$ex pG6#%\"yG*&)-F%6#%\"xG%\"pG\"\"\"-F%6#%\"bGF." }}}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"wG*&%\"CG\"\"\")%\"hG%\"pGF'" }}}{PARA 0 "" 0 "" {TEXT -1 130 "In practice, it is not too hard to see if data is wel l approximated by a line, so this trick with the logarithm is quite us eful. " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 264 22 "National data example:" }}{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 change coords 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,76.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],[62.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 (po unds): Ntl medians for ages 2-19 " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 121 "boys:=pointplot(boyhw):\ngirls:=pointplot(girlhw):\n display(\{boys,girls\},\n title=`plot of [height,weight], baby-adul t`);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 27 "And now for the ln-ln dat a:" }{MPLTEXT 1 0 5 " " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "with(linalg): #linear algebra package\n" }}{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 219 "B:=e valm(boyhw): #\"evaluate matrix, this will\n #turn our list of poin ts into a matrix, which will\n #be easiser to manipulate in Maple\nG :=evalm(girlhw):\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 259 "lnBGa:=map(ln,BG): #get ln-ln data\nlnB G:=map(evalf,lnBGa): #I added this step, which\n #was not in the han dout. It gets floating point\n #values which speeds up computations \+ later in the\n #least squares fit - otherwise Maple tries working\n \+ #symbolically." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "lnlnplot: =pointplot(\{seq([lnBG[i,1],lnBG[i,2]],i=1..36)\}):\ndisplay(lnlnplot, title=`ln-ln data`);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 58 "How do I find the best line fit to a co llection of points?" }}{PARA 0 "" 0 "" {TEXT -1 212 " From Calculu s, there is a slope \"m\" and intercept \"b\" yielding a line which mi nimizes the sum of the squared vertical distances between your data po ints 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$&%\"xG6#\"\"\"&%\"yGF'7$&F&6#\"\"#&F*F-7$&F&6#\"\"$&F*F27$&F&6#% \"nG&F*F7" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "then \"m\" and \"b\" satisfy" }}}{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" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 225 "We could set up this system with \+ several \"do-loops\", or we can look up the method of least squares in the help files. It turns out to exist in the statistics package. Th e format is kind of weird, but that's life with Maple." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(stats):" }}{PARA 7 "" 1 "" {TEXT -1 116 "Warning, these names have been redefined: anova, describ e, fit, importdata, random, statevalf, statplots, transform\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 213 "Xs:=convert(col(lnBG,1),lis t): #convert 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 matrix columns!!??\nYs:=convert(col(lnBG,2),list):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 206 "fit[leastsquare[[x,y]]]([Xs,Ys]); #this is Maple-ese\n #for find the least squares line fit, using variable s\n #called x and y for the given values which we\n #called Xs's a nd Ys's when we defined them." }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 65 "We can paste in the equation of the line and see how well we did. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "line:=plot(-6.03870360 0+2.593828078*x, x=3.4..4.5,\n color=black):\ndisplay(\{line,lnlnplo t\}, title=`least squares fit`);" }}{PARA 13 "" 1 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 266 0 "" }{TEXT 267 382 "You notice that until adolescence the boy and girl dat a are more or less indistinguishable. The \"baby fat\" of small child ren may explain why the 2-3 year olds are slightly above the line, and the peaking near adulthood for both the males and females is probably the effect of their respective hormones. But I would say this ln-ln \+ data IS close to its least-squares line. But WHY?" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "Finally, we can g o back from the least squares line fit to a power law" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "p:=2.593828078; #power\nC:=exp(-6.0 38703600); #proportionality constant" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"pG$\"+y!GQf#!\"*" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"CG$\"+p $[YQ#!#7" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 134 "powerplot:=plo t(C*h^p,h=0..80,color=black):\ndisplay(\{powerplot,boys,girls\},title= \n `power law approximation for height-weight data`);" }}{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 "7 0" 1151 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }