Page MenuHomePhabricator

When guessing quantity precision from digits, use the +/-0.5 rule rather than the +/-1 rule
Closed, ResolvedPublic

Description

This is supposed to implement the outcome of T105623: [Task] Investigate quantification of quantity precision (+/- 1 or +/- 0.5)

Namely, the "guessed" precision (the size of the uncertainty interval) should be the order of magnitude of the least significant digit. This means that 2 would be estimated to have the precision interval +/-0.5 = [1.5, 2.5) which has size 1.

Other examples:

  • -0.07 should be interpreted as -0.07+/-0.005 (not +/-0.01)
  • 12.6e5 should be interpreted as 1,260,000+/-5000 (not +/-10000)

The rule is that all numbers within the uncertainty interval should round to the nominal value (when rounding to the significant digits that correspond to the order of magnitude of the uncertainty interval).

Event Timeline

There was also the important point that the assumed uncertainty shouldn't be shown (or stored), and should only be used internally to calculate conversions, unless the uncertainty has been properly set by a user. Not sure that was captured here in this ticket, but maybe it's in another one?

Note that this needs DataValues/Number 0.8 to be released and used in Wikibase.

Thanks Daniel - I'm looking forward to that version being released!

thiemowmde moved this task from Proposed to Done on the Wikidata-Sprint-2016-07-19 board.

Change 302248 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Update DataValues Number to 0.8.1 [DNM]

https://gerrit.wikimedia.org/r/302248

Change 302248 merged by jenkins-bot:
Update DataValues Number to 0.8.1

https://gerrit.wikimedia.org/r/302248