# age by age-bins
age <- c(5, 10, 20, 50, 100, 200)
# fractional area by age-bin
farea <- rep(1/6, 6)
# some function of similar form as in your paper (negative coefficienty, log of age)
calc_bp <- function(age){10 - 1 * log(age)}
# calculate BP by age bin and plot
bp <- calc_bp(age)
df <- tibble(age, bp)
df %>%
ggplot(aes(age, bp)) +
geom_point()
Area-weighted mean(f(age)):
Calculate BP by age bin and take area-weighted mean (multiply by farea
and take sum).
sum(calc_bp(age) * farea)
## [1] 6.546122
f( area-weighted mean(age)):
Calulate a single BP as a function of area-weighted mean age.
calc_bp(sum(age * farea))
## [1] 5.838516
The latter is smaller than the former. In other words, BP and N-uptake area larger when calculating BP by age bin and then take area-weighted mean .
One could also prove this mathematically, given that the second derivative of BP vs. age is positive.