Message from @realz

Discord ID: 776158784082018374


2020-11-11 18:32:12 UTC  

my orders of magnitude are much large as well

2020-11-11 18:32:32 UTC  

a uniform random generator also works, with the weird artifact that it very much depends on what your maximum number is

2020-11-11 18:32:43 UTC  

with a maximum number of say 20000000, almost half your numbers will start with 1

2020-11-11 18:32:48 UTC  

more than half

2020-11-11 18:33:13 UTC  

that's why I decided to use some other distribution

2020-11-11 18:34:23 UTC  

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)

2020-11-11 18:35:14 UTC  

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

2020-11-11 18:35:52 UTC  

OK so I actually _do_ see the distribution peak out if I lower the magnitudes

2020-11-11 18:36:03 UTC  

https://cdn.discordapp.com/attachments/771201221145919499/776153285786206268/1eae2d24-599e-4f38-9c07-6023ac633b3c.png

2020-11-11 18:36:11 UTC  

`d3.randomNormal(50000,5000)`

2020-11-11 18:36:20 UTC  

so centered around 50k, with a sigma of 5000

2020-11-11 18:36:35 UTC  

naturally most numbers start with 5

2020-11-11 18:36:39 UTC  

some numbers start with 4

2020-11-11 18:36:42 UTC  

and 6

2020-11-11 18:37:05 UTC  

lol it might even be fun to make sliders for this

2020-11-11 18:47:34 UTC  

Wow yea that's the similar distribution. Very interesting.

2020-11-11 18:51:23 UTC  

OK so basically if you have a small sigma, you will be able to "see" your distribution in the Benford's law graph

2020-11-11 18:51:24 UTC  

I made sliders

2020-11-11 18:51:34 UTC  

I guess I can just make this public for anyone to play with

2020-11-11 18:57:54 UTC  

enjoy 😄

2020-11-11 18:58:01 UTC  

just play with the slidy sliders

2020-11-11 19:01:39 UTC  

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 😆

2020-11-11 19:01:51 UTC  

ha

2020-11-11 19:02:09 UTC  

I am not an expert in this stuff, observableshq is really making me look better than I am lol

2020-11-11 19:06:26 UTC  

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

2020-11-11 19:08:30 UTC  

@evildood89 what's the issue?

2020-11-11 19:09:55 UTC  

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

2020-11-11 19:10:43 UTC  

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.

2020-11-11 19:11:25 UTC  

oh no it can't

2020-11-11 19:11:43 UTC  

it is not collaborative, if you change it, then it is local

2020-11-11 19:11:48 UTC  

if you save, it forks to a new copy

2020-11-11 19:12:04 UTC  

Ahh similar to github ?

2020-11-11 19:12:48 UTC  

right

2020-11-11 19:13:14 UTC  

Thats neat I like the interface on mobile :)

2020-11-11 19:19:29 UTC  

I added a regenerate button to make it easy to click fast to see the variations of the bars from simulation to simulation

2020-11-11 19:24:48 UTC  

me playing with the sliders

https://cdn.discordapp.com/attachments/771201221145919499/776165551608430682/benford-sliders.gif

2020-11-11 19:26:26 UTC  

anyway

2020-11-11 19:26:57 UTC  

I think the conclusion here is: if the variance in magnitude is low, benford's doesn't indicate anything

2020-11-11 19:27:25 UTC  

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).

2020-11-11 19:32:42 UTC  

All that being said, I bet Mark Nigrini knows more than me