The link in the OP is further linked to a PDF document that discusses ByteIndex vs SpeedIndex in an academic whitepaper from 2016.
In that paper, they indicate that Google's SpeedIndex is measured by taking snapshots of a webpage, equivalent to 10 frames per second. They then create a histogram they use for comparison. This can be resource-heavy, especially on compute time. (I'm not even sure how accurate this is, just what the paper discusses.)
From there, they discuss ByteIndex and ObjectIndex, which are calculated using a Calculus Integral.
Using this integral, you'll need to translate this into a coding algorithm. (It's been too long since I've done Calculus.)
Since Google doesn't use ByteIndex or ObjectIndex, I'd say any calculation using these doesn't really matter, other than from an academic research perspective.
It's really difficult to get Google to change its formulas. It's best to use common tools for testing web load/performance like Google PageSpeed, JMeter, K6, etc.