Transforming Fucntions



Introductory Example: Blood Velocity

Begin by loading the file bloodData.dat in the Scatterplot Applet above.

Often scientific data are presented in tabular form as above. The columns or rows of the table represent different categories or qualities observed. The simplest tables consist of a pair of columns (or rows) of values.

The table above compares the distance x from the center of an artery to the velocity y of the blood in the artery at that point. The information is also presented as a scatterplot with each axis representing one of the observed variables. The hope is that the graph will display a meaningful relationship that is hard to detect from the table alone. Data from [DeSapio. 1978. Calculus for the Life Sciences. W.~H.~Freeman & Co. 26].

In this case, the scatterplot shows that blood velocity decreases as the distance from the center of the blood vessel increases. It is as if the center of the artery is the "high speed lane" while the region near the arterial wall is the "breakdown lane." Notice that the scatterplot is clearly not linear. In fact, the graph should remind you of an upside-down parabola that has been shifted upward.

The equation of a standard parabola is y = x^2. How can we find the equation of the parabola in the scatterplot, if, indeed, it is a parabola? The answer is to transform one or both of the variables. Because we think that the graph of y might be a parabola, instead of graphing x on the horizontal axis, we try graphing x^2 on the horizontal axis and y on the vertical axis. Enter x^2 in the box above and plot the result versus y.

The graph of x^2 versus y indicates a linear relation.

In fact, the slope of the line is roughly -1100 and the vertical intercept is about 44. This means that

y = -1100x^2 + 44.

Thus, we have found the relation between y and x.

We were successful in finding the relation between y and x in the Blood Velocity example because we were able to identify the basic shape of the original graph. The Field Guide to Functions handout will provide you with a review of some of the common functions that arise in work with data sets. You have met them in previous courses and there is much more to say about them then is contained there. Nonetheless, if you are having difficulty "identifying" a graph, this guide may prove helpful.

The method employed in the examples below is to identify the functions as increasing or decreasing and as concave up or down. Then use the transformation techniques that have been discussed in the Field Guide to Functions to find a relationship between the two quantities in each of the tables. This is made very easy by using the applet above.

Another useful technique, especially when you think the data has the form y = kxr, is to graph log(y) versus log(x). If the result is linear, then you can solve for y in terms of x by "undoing" the logs by using exponentials.

One final note. Real-life data are often messy or "noisy," as mathematicians say. With real data sets, transformations will seldom produce a perfectly. You will have to use some judgment about which transformations, if any, straighten a data set out best and sometimes there may not be a simple relationship at all. With biological data, there is seldom a "perfect" relationship to be found. So you may find several transformations that are "ok" and it is up to you to select the best of these.



Volume

Load the data in the file volumeData.dat in the Scatterplot Applet above. These data relate a quantity x to a volume, y, of an object. (Can you guess what the object is from the data?)

The scatterplot is obviously increasing and concave up. This immediately brings to mind a parabola. So, as in the very blood velocity example, so try transforming the horizontal variable to the standard quadratic: plot x^2 versus y. Do you think the result is satisfactory? That is, do the data points now lie along a line now?

While the new scatterplot in is more linear than the first one, it still looks somewhat concave up. One way to see this is to look at the least squares regression line. Notice how the data points still "bow'' out at both ends in relation to this approximation line. This means that the original graph had more bend in it than a quadratic. So let's raise the power of x: plot x^3 versus y.

Is the graph now linear? What is the slope of the line ? What is the intercept? is 0. How would you write y as a function of x?

In this example, the variable x represents the radius of a sphere and y is its volume. How close is the relation you found to the volume formula of a sphere?



Test Scores

In this next example we examine test scores of 11 students. They were given a diagnostic algebra test before and after a review session. What was the relation between the scores? One expects (hopes and prays) that the scores will increase. Load the scoreData.dat into the Scatterplot Applet above. Here x is the before score for an individual and y is the after review score for that same individual. glance at the data and scatterplot indicates that most scores did go up. But is there a formula or function that relates the before and after scores?

Though the function is generally increasing, it is clear that no elementary increasing our decreasing function can pass through all the data points. Unlike the first two examples, these data are "noisy" (do not fall perfectly along some simple curve) and are much more typical of real world data than the first two examples.

The data show a general linear tendency. and in this example, probably no transformation is required. Though the scores do not fall exactly along a line, a line already does a fairly good job of approximating the relation between the before and after scores. In particular, notice that points fall on both sides of the regression line over its entire length. (Compare this behavior to the data in the previous example afer the first tranformation where the scaterplot was still "bow-shaped".)

What is the the equation of the line? Can you put this function into words to describe the relationship between the before and after scores? Do you think the review was helpful?



Valium

Many drugs, including Valium, are ingested and then absorbed into the bloodstream. As time passes, the drug is converted by the body into other products and/or removed as waste. For example, 12 hours after taking a 10mg tablet of Valium, only 5mg remains in the bloodstream.

Load the data file valiumData.dat into the Scatterplot Applet above. The variable x represents the time (in hours) since the ingestion of a 10mg tablet of Valium and y represents the amount remaining in the blood stream.

Obviously when physicians prescribe medications they need to know the rate at which the body uses and removes the drug if the levels of the drug are to remain within a safe and effective range. Try to determine a transformation which describes the amount of Valium remaining in the bloodstream given the data in the scatterplot.

The function is decreasing and concave up. Which functions make sense as transformations? Notice that it is defined at x = 0. This suggests a decay exponential function rather than a reciprocal function. One method is to transform the variable x to 10^x or e^x. But if we do that, we will have to work with some very small numbers, such as 10^(-60) which is not at all practical. Another method is to transform the vertical variable by "undoing the exponential" with a log function. Try that method plotting x versus ln(y) or x versus log10(y).

Is the result of this plot linear? If so, now solve for y as a function of x. Is the relationship is, in fact, a decay exponential.



Boyle's Law

The English physicist Robert Boyle (1627--1691) studied how the temperature, volume, and pressure of a gas were related. He collected the following pressure (p) and volume (v) data (with temperature held constant). These data are available for you by loading the file BoyleData.dat in the Scatterplot Applet above. Data from [Shamos. 1959. Great Experiments in Physics.]

Notice that as the pressure increases, the volume decreases, that is, this is a decreasing function. Is it concave up or down? Based on the Field Guide to Functions and your previous course work, what transformations of the pressure x should you try to straighten out the scatterplot?



Allometry

The study of how one part of an organism grows in relation to other parts or the whole organism is called allometry. For example, Andren and Nilson [1981. Biological Journal of the Linnean Society. 15, 235--246.] measured the length and weight of 9 wild snakes (Vipera berus). We expect the longer snakes to be heavier, but can you be more precise about the relationship? Load the data file snakeData.dat into the scatterplot applet above.

Is the relationship increasing or decreasing? Is it concave up or down or neither? Is a transformation required? What is your best estimate of the relationship between the length and weight of these snakes?



Kepler's Law

Load the data in the file KeplerData.dat into the Scatterplot Applet above. The data give the mean distance x of the nine planets from the sun (millions of kilometers) and the period y of one orbit about the sun (days). These data (for the inner planets) were first collected by Johannes Kepler early in the seventeenth century. Using these data, he was able to formulate a principle which related the orbital period of a planet to the mean distance of that planet from the sun [Giordano and Weir. 1985. A First Course in Modeling. Brooks/Cole. 96]. The planets in the scatterplot in order are: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.

Find Kepler's relation. Begin by determining whether this is an expansion or compression graph. Try an appropriate transformation. If it is not (perfectly) linear, then try another transformation based on your preliminary one (either a larger or smaller power, as needed). Or try graphing the logs of both variables.



Atmospheric Pressure

Load the data in the file amtoshpereData.dat into the Scatterplot Applet above. The scatterplot shows that as the height x above sea level increases, the atmospheric pressure y decreases. This is why the cabin of an airplane must be pressurized when flying at high altitudes. Data from [DeSapio, 32].

Find the relation between the height and the pressure. Hint: It will turn out to be easier to find a linear relation if you transform the vertical (pressure) variable. Think about whether you want to expand or compress the pressure. The right transformation will result in a perfectly linear relation. What is that relation? Try to solve for y in terms of x from the relation you have found.



Carbon 14

In 1960, Willard Libby won a Nobel Prize in chemistry for his work in the 40's and 50's that included discovery of a radioactive isotope of carbon and development of the technique of "radiocarbon dating" to determine the ages of once-living objects.

"Ordinary" carbon, found in abundance in all living things, has an atomic weight of 12; its unstable isotope has an atomic weight of 14 and is therefore called "carbon 14" or "radiocarbon." This isotope is created in the upper atmosphere by interaction of cosmic ray neutrons with nitrogen. It is then oxidized to a radioactive form of carbon dioxide, which is mixed by winds with the stable carbon dioxide already present in the atmosphere. Because this process---formation of carbon 14, oxidation , mixing, and decay of the radioactive carbon dioxide back to nitrogen---has been going on for eons, the ratio of carbon 14 to ordinary carbon in the atmosphere has long since reached a steady state. That is, the proportion of radiocarbon in the air is constant.

All plants take in carbon dioxide with this constant proportion of carbon 14 (relative to carbon 12), and thus the carbon in their tissues has the same proportion of radiocarbon. Animals that eat these plants (for example, humans) also incorporate carbon in their tissues with this constant proportion of radiocarbon. However, when a plant or animal dies, it ceases to take in any more carbon (or anything else). The radioactive carbon then in its tissues continues to decay, but the ordinary carbon does not, so the proportion of radiocarbon in its tissues decreases.

Radioactivity is observed and measured by devices, such as the Geiger counter, that count "events" or "disintegrations" of the isotope that emit a subatomic particle. From a count of disintegrations per minute (dpm), one can infer the proportion of carbon 14 in a given quantity of carbon.

The radiocarbon in living tissue decays at a rate of about 15.30 (measured) dpm per gram of contained carbon. This rate of disintegration decreases after the plant or animal dies as the radiocarbon decays. Load the data file carbon14Data.dat to see a scatterplot of this information [Smith and Moore. 1991. Project Calc: Calculus as a Laboratory Course, "Project B---Radiocarbon Dating. Project Calc. 1--2]. Here x is the age (or time since death) in thousands of years and y is the number of radioactive decays per minute (dpm) as measured by a Geiger counter for Carbon-14.

Use the scatterplot to find a relationship between x and y.

Use your relation (and a calculator) to fill in the missing entries in the table below. This will give you an indication of how archaeologists, geologists, and biologists actually use carbon 14 dating in their work. By the way, an atlatl is a device for throwing a spear.

Object y (dpm)x (years)
Chair leg from Tutankhamen tomb 10.14
House beam from Babylon (reign of Hammurabi) 9.52
Giant sloth dung (Gypsum Cave, Nevada) 4.17
Wooden atlatl (Leonard Rock Shelter, Nevada) 6.42
Linen wrappings from Dead Sea scrolls 1,917
Charcoal (Lascaux Caves, France) 15,516
Charcoal (Stonehenge, England) 3,798
Charcoal (Crater Lake volcano, OR) 6,453



AIDS Deaths

[This problem is based on material in: Davis, Moran, and Murphy. 1993. Precalculus in Context: Functioning in the Real World. PWS Publishing.] An article in the New York Times on 11 July 1990 ("AIDS killing more young women") reported that HIV infection was becoming a major health problem for young women in the 15--44 age group. Load the data in the file aidsData.dat into the scatterplot above. For each year x the number of deaths y for such women attributable to HIV/AIDS is given (x = 0 is 1980).

The scatterplot is increasing and concave up. Is it a power or an exponential relation? Transform a variable to make the data roughly linear. It may take several attempts. There is no transformation that will make the data perfectly linear. What is your best estimate of the relation between the two variables?



Carlson's Yeast

In 1913, Tor Carlson grew Saccharomyces, a common type of yeast, in laboratory cultures. The large data set is in the file CarlsonData.dat. Here x is time measured in hours and y is the population. [DeSapio, 440]

Carlson began the experiment by placing a few yeast cells in a suitable nutritive solution. Cell growth was rapid during the early stages of the experiment. But as you can see from the scatterplot of these data, despite the availability of sufficient nutrients, the population growth essentially came to a halt after 18 hours.

How can you tell by simply glancing at the graph of these data that no transformation that we have discussed will straighten out these data?