p-value Decimal Places Check

This rule checks for p-values that are reported with too few decimal places (specifically looking for p-values with only 2-4 zeros after the decimal point). The motivation behind this rule is to promote proper statistical reporting practices. In scientific writing, p-values should typically be reported with enough precision to make meaningful interpretations, and using too few decimal places can mask the true significance level or lead to imprecise reporting.

Examples of what gets flagged:

  • p = 0.00 (flags for having only 2 zeros)
  • p = 0.000 (flags for having only 3 zeros)
  • p = 0.0000 (flags for having only 4 zeros)

Note that this rule suggests using more decimal places when reporting p-values, as truncating to fewer decimal places might not provide enough precision for scientific reporting. For instance, there's a meaningful difference between p = 0.001 and p = 0.00149, and this distinction could be important for readers interpreting the results.

Rule Source

This rule comes from: https://github.com/mesosphere/dcos-docs-site

Rule Definition

extends: existence
message: "You should use more decimal places, unless '%s' is really true."
ignorecase: true
level: suggestion
tokens:
  - 'p = 0\.0{2,4}'