One omitted hard part is to accurately determine caffeine content which can fluctuate widely depending on the beans, roasting, brewing method, water temperature ...
E.g. 100% robusta coffee can be nearly double in caffeine than 100% arabica coffee.[0]
Another important thing also missing in this context is the individual "activity" of the CYP1A2 enzyme which helps to metabolize caffeine (so called "fast" or "slow metabolizer"); it is dependent on genetics and environmental factors. [1] E.g. a regular smoker breaks down caffeine a lot faster.