Message from @realz
Discord ID: 776158784082018374
my orders of magnitude are much large as well
a uniform random generator also works, with the weird artifact that it very much depends on what your maximum number is
with a maximum number of say 20000000, almost half your numbers will start with 1
more than half
that's why I decided to use some other distribution
I have to rewatch Stand-up Maths video, but I think his point was more about the small range of magnitude of the numbers rather than the shape of the distribution (a normal distribution is typical, and would probably usually result in a nice Benford's law)
the point of the normal distribution is just that with such a small range of magnitudes, you get to see the distribution of the data in the Benford's law graph
OK so I actually _do_ see the distribution peak out if I lower the magnitudes
`d3.randomNormal(50000,5000)`
so centered around 50k, with a sigma of 5000
naturally most numbers start with 5
some numbers start with 4
and 6
lol it might even be fun to make sliders for this
Wow yea that's the similar distribution. Very interesting.
OK so basically if you have a small sigma, you will be able to "see" your distribution in the Benford's law graph
I made sliders
I guess I can just make this public for anyone to play with
just play with the slidy sliders
I took a class in Visual Basics probably 12-14 years ago (poorly) and that's as far as I went. So this is mind blowing to me 😆
ha
I am not an expert in this stuff, observableshq is really making me look better than I am lol
Sorry...I didnt play with the sliders, Its fixed but im not sure if it was only for me or if other people saw it broken
@evildood89 what's the issue?
my takeways from this are:
1. you need a high sigma (a large range of order of magnitudes) to see a Benford-looking graph.
2. you need a large number of samples to reliably reproduce a Benford-looking graph (you can even find the 1s bar lower than the 2s bar at 150 samples if you repeat the simulation over and over , at 150 samples).
3. If you play around with the numbers, you can make or break the law; the law seems to apply only to certain shapes and centerings of the normal distribution
No issue I was just poking around since the site seem to allow me to edit, I changed 1 value then ran it, as expected it broke but I put it back. I just wanted to apologize if it affected other users.
oh no it can't
it is not collaborative, if you change it, then it is local
if you save, it forks to a new copy
Ahh similar to github ?
right
Thats neat I like the interface on mobile :)
I added a regenerate button to make it easy to click fast to see the variations of the bars from simulation to simulation
me playing with the sliders
anyway
I think the conclusion here is: if the variance in magnitude is low, benford's doesn't indicate anything
I think the conclusion here is:
1. if the variance in magnitude is low, Benford's Law doesn't say anything should be expected.
2. Though perhaps one could ask question about why the variance in magnitude is low, and how does this compare to previous elections and so on; I imagine simply looking at the political history of the districts involved etc. would answer such questions.
3. But if the variance in magnitude is high, _and_ there are enough samples, then if the shape of the graph does not follow Benford, then there is something to analyze further.
4. Even in the best case, % deviation from the expected Benford graph is not as useful as it seems, unless you factor in the number of samples (the more samples, the less expected deviation).
All that being said, I bet Mark Nigrini knows more than me