Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAS ratio is based on the median, not the average #1

Closed
mherrmann3 opened this issue Aug 29, 2024 · 2 comments
Closed

WAS ratio is based on the median, not the average #1

mherrmann3 opened this issue Aug 29, 2024 · 2 comments

Comments

@mherrmann3
Copy link

mherrmann3 commented Aug 29, 2024

As described on gridcoin.us/wiki/whitelist-process.html, the WAS is defined as the ratio of the median of the last 7-day and last 40-day credits.

If the credits-per-day are more or less constant, it can indeed be approximated with the average. But as soon as the credits-per-day fluctuate strongly, the average and median will start to differ. Especially if zero-credit days are involved, the median may behave completely different: imagine if 21 days have zero credit. Then, the 40-day-median will be also zero and the WAS ratio undefined (division by zero), i.e.., not > 0.1 (green).1

Footnotes

  1. This special case is somehow a hidden third criteria in the white/graylist definition: a project must have less than 21 zero-credit days to be whitelisted. So if you cannot implement the median, you may at least check for this special case.

@mherrmann3 mherrmann3 changed the title WAS ratio is based on median, not mean WAS ratio is based on the median, not the average Aug 29, 2024
@RoboticMind
Copy link
Owner

Oh oops that's actually an error in the documentation. (I would know, I also wrote the documentation)

The original definition was defined as

WAS = Green If (Mean daily credit for 7 Days > (0.1 * Mean daily credit for 40 Days)) Else Red

gridcoin-community/Gridcoin-Tasks#194

Dividing the two gives you

Mean daily credit for 7 Days / Mean daily credit for 40 Days > 0.1

I did later notice that the original definition does avoid the division by zero issue edge case, however it also fails the ZCD check when that happens so I wasn't too concerned

@RoboticMind
Copy link
Owner

PR has now been put up to fix the documentation on the gridcoin.us site

gridcoin-community/Gridcoin-Site#426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants