Without going into the actual algorithms
Basically jitter percentage of 8% average is treated as 100% quality as this is the minimum that one can usually get.
An average of 20% jitter is classed as totally unacceptable and is treated as 0% quality.
Peak jitter is taken into account to reduce the quality score accordingly.
The PI, PO, & jitter quality scores are all averaged together to give the final score.