3 ms·
That's Benford's law, but I don't think it applies here. From Wikipedia: > Benford's Law tends to be most accurate when values are distributed across multiple
by thewakalix 3y ago
That's Benford's law, but I don't think it applies here. From Wikipedia:
> Benford's Law tends to be most accurate when values are distributed across multiple orders of magnitude, especially if the process generating the numbers is described by a power law (which is common in nature).
- noduerme 3y agoit definitely shows up in 8-bit and 32-bit stuff though, doesn't it? There's just a lot less of those numbers where the leading digit (in decimal) is larger than 3 or so.
- saghm 3y agoAssuming you aren't 0 padding, there are 111 unsigned 8-bit integers beginning with 1 (1, 10-19, and 100-199), 67 beginning with 2 (2, 20-29, and 200-255); all of the other digits appear 11 times (in single-digit form and as the leading digit in the tens place for their "decade") except 0, which appears first only in 0 itself. Unsigned 32-bit integers will have 1, 2, and 3 tied for first with 4 far back in fourth place and 5-9 in even the more distant penultimate position (with 0 still being last). If you're dealing with signed integers, you'll have an even more lopsided distribution in favor of 1 for both 8-bit and 32-bit numbers (assuming you don't count the negative sign). And of course, all of this is assuming base ten; you can make things even more uniform by using binary!
- noduerme 3y agowell yeah, no one would want to argue that a leading '1' wasn't pretty predominant in unpadded binary ;) thank you for the good, concise, starter breakdown of why this is a feature of decimal math.