Honestly I am thinking that weighted average is the explanation here.
Simple average wont represent the data well, cause you can have many blocks stacked in short period with low diff.
How do you calculate weighted average? What blocks are more important than others?)
If there are many blocks with low diff then next there will be blocks with much higher diff.
Difficulty basically defines the expected number of hashes to mine a block, if nethash finds block faster or slower than target spacing then diff is adjusted accordingly.
If diff retargeting is working correctly, simple average of all diffs will give very accurate number of hashes on a long interval. And 24 hours is pretty long, hundreds or even thousands of blocks.
In other words taking all blocks from last 24h and calculating simple avg is not good or wanted.
It matters how long each difficulty period was mined for.
You are polling diff each N minutes, what is your avg called? Absolutely random?
The weighted average I was talking about would take into consideration how long it took miners to mine on certain difficulty.
Time between blocks would just have been the "weight" summing up to 24h.
If diff retarget is working correctly then your statement should be true - simple average should do the work.
There are many coins where imo its not working as intended - or just cant handle the nethash swings.
When you have those low diff periods on straks then the big hashes waiting for the drop will take majority of the blocks and leave after the diff raises up.
About your second question. I believe that polling every N minutes simulates the "weighted based on time" average quite nicely.
Why? Cause the estimated rewards just match what I have mined for the last 24h. Afterall thats all that matters.
If I was to name it then "Normalized time spent mining average difficulty" would be close.
For sure we dont want a simple avg here and the 24h value on wtm should not be interpreted as one.
@whittle @nitro3
Last time I asked dbix devs about working apis for network stats I got no response.
Honestly listing invalid api urls on official website does not inspire confidence.
Guess I will wait for the apiv2? Or the old apis are back online?
@Mikanoshi
BTCZ calc updated with new algo