Can the size of a tree trunk help us estimate its timber volume?
- Measuring trunk girth is relatively straightforward.
- Volume is harder to estimate by looking at a tree.
- We will use regression to study the relationship.
Can the size of a tree trunk help us estimate its timber volume?
We use R’s built-in trees dataset, which has measurements for 31 black cherry trees.
Girth: trunk diameter in inches.Height: tree height in feet.Volume: timber volume in cubic feet.Here, volume means the dataset’s measured timber volume, not every piece of wood in the whole tree.
Each point represents one tree. Is there a pattern?
We use trunk diameter to predict timber volume:
\[ Volume_i = \beta_0 + \beta_1 Girth_i + \varepsilon_i \]
model <- lm(Volume ~ Girth, data = trees) round(coef(model), 2)
## (Intercept) Girth ## -36.94 5.07
The fitted model gives a prediction using:
\[ \widehat{Volume} = \widehat{\beta}_0 + \widehat{\beta}_1 \times Girth \]
What volume does it predict for a tree with a 14-inch trunk diameter?
## 1 ## 33.98
The result is an estimate in cubic feet.
Rotate the plot and hover over a point to inspect a tree.
This is a relationship in the data. It does not prove that diameter alone determines volume.
Data source: R’s built-in trees dataset. Charts made with ggplot2 and plotly.