## Developing a Model Using Linear Regression

The natural world is full of patterns. They are everywhere, from the molecular structure of a drop of water to the lung capacity of a chain-smoking monkey. By using proportionality we are able to develop models that examine and express relationships between things. Biology often creates models to imitate the natural world does so using proportionality. Here we will explore scaling models using concepts of proportionality and geometric similarity.

Given Problem 1

In nature many animals have unique body parts that can be used for defense such as; the horns of a ram, the mane of a lion, and the stinger of a wasp. Just like the ram, the lion and the wasp, the fiddler crab has an enlarged claw that it uses for fighting and threatening other males. The larger the claw the more threatening the male resulting in more food, more territory, and more female mates. In the case of the fiddler crab, reproductive desirability, *R**D*, is directly proportional to claw size. As the claw gets bigger so does the crab, so we can explain the relationship between the claw size and the mass as being proportional as well. We can create a model indicating these relationships.

Model Derivation Using Linear Regression

To create the model we must first obtain data exemplifying the relationship between claw mass and total mass. The data used in this report is arbitrary but relevant.

Mass (g) | Claw Mass (g) |

4.74516 | 0.303208 |

10.4439 | 1.15915 |

14.1628 | 1.24838 |

18.8073 | 1.65723 |

23.2829 | 2.65709 |

29.0201 | 3.14769 |

33.2396 | 2.82348 |

37.577 | 5.27659 |

42.7777 | 7.44482 |

49.6655 | 5.50366 |

Table 1: Masses and claw masses of ten fiddler crabs.

To reduce the skew of the data we can use a logarithmic transformation. By comparing the means of the log transformed data we successfully compare the geometric means. This can be checked by taking the anti-log of the geometric mean resulting in our original measure, or our arithmetic mean.

Linear Regression 1: y=0.1432x-0.6541

Linear Regression 2: log(y)=1.2698log(x)-1.3413

Our new logarithmic function seems to be fairly precise, but how can me determine the measure of error. We can compare our linear regression values to the actual values.

Mass (g) | Claw Mass (g) | Difference (g) |

0.676251 | -0.4825965 | -0.0356628 |

1.018863 | -0.0475478 | 0.1116874 |

1.151149 | 0.120429 | -0.0240822 |

1.274326 | 0.27683915 | -0.0574564 |

1.367037 | 0.39456358 | 0.0298427 |

1.462699 | 0.51603519 | -0.0180432 |

1.521656 | 0.59089879 | -0.1401141 |

1.574922 | 0.65853596 | 0.0638174 |

1.631217 | 0.73001935 | 0.1418349 |

1.696055 | 0.81235064 | -0.071699 |

Table 3: Logarithmic mass (g) values vs. logarithmic claw mass (g) values derived from linear regression. Also includes difference between logarithmic measured and derived claw masses.

We see that the differences between the values measured and derived are all less than one. We can go ahead and use this linear regression.

Now that we have discovered the expression that can help with our parameters we need to create a model. Typically, models will follow the “power law” functions *x=*kya, where *x* is the quantity of interest, *k* is the constant of proportionality, *y *is the measure of size, and *a* is a constant exponent. The quantity we seek is reproductive desirability, *R**D*. Our measure of size will be mass, m. We will derive *a *and *k*. Let us first determine what out formula currently looks like.

*R**D*= *k*m*a*

Now we have to develop the relationship between mass and reproductive desirability. We can assume that reproductive desirability is proportional to claw mass which is proportional to overall mass. Before we proceed by using our logarithmic linear regression to show the relationship between mass and claw mass we need to convert our linear regression to a power function. We currently have:

Linear Regression 2: log(y) = 1.2698log(x)-1.3413

By taking the anti-log of both sides we get:

y = 10-1.3413x1.2698

Simplify it and we get:

y = .04557 x1.2698

This equation shows the relationship between mas and claw mass. We now need to create a relationship with this equation and reproductive desirability. Because they are proportional and we have not measured these values we can just put *p* into the equation.

y = .04557*p*x*1*.2698