Live data from Hacker News

Simulating and Visualising the Central Limit Theorem

blog.foletta.net

31–40 of 67 posts

Re: Simulating and Visualising the Central Limit Theorem

#31

The definition under "A Brief Recap" seems incorrect. The sample size doesn't approach infinity, the number of samples does. I'm in a similar situation to the author, I skipped stats, so I could be wrong. Overall great article though.

It is correct in the article. As the sample size approaches infinity, the distribution of the sample means approaches normal.

https://en.wikipedia.org/wiki/Central_limit_theorem

Re: Simulating and Visualising the Central Limit Theorem

#32
post #29

Earlier quoted context omitted.

Maybe OP just used an ai editor to add their silly comments, so that would be fair game I guess? Or some humans just add silly comments. The article didn't stand out to me as emberrassingly ai-written. Not an em dash in sight :) Edit: just found this disclaimer in the article: > I’ll show the generating R code, with a liberal sprinking of comments so it’s hopefully not too inscrutable. Doesn't come out the gate and s…

Op here, no AI generated code, I'm wondering what gives the impression that it is? I use Rmarkdown, so the code that's presented is also the same code that 'generates' the data/tables/graphs (source: https://github.com/gregfoletta/articles.foletta.org/blob/pro... ).

If you say there's no AI-generated code then I retract the original comment, nice work.

Re: Simulating and Visualising the Central Limit Theorem

#33

Highly entertaining, here a little fun fact: there exist a generalisation of the central limit theorem for distributions without find out variance. For some reasons this is much less known, also the implications are vast. Via the detour of stable distributions and limiting distributions, this generalised central limit theorem plays an important role in the rise of power laws in physics.

Yes, came here to say the same thing. Telling people that the CLT makes strong assumptions is important.

Otherwise, they might end up underestimating rare events, with potentially catastrophic consequences. There are also CLTs for product and max operators, aside from the sum.

The Fundamentals of Heavy Tails: Properties, Emergence, and Estimation discusses these topics in a rigorous way, but without excessive mathematics. See: https://adamwierman.com/book

Re: Simulating and Visualising the Central Limit Theorem

#36

Speaking of CLTs, is there a good book or reference paper that discusses various CLTs (not just the basic IID one) in a somewhat introductory manner?

For a very light discussion, Tao does a good job here: https://terrytao.wordpress.com/2015/11/19/275a-notes-5-varia...

Re: Simulating and Visualising the Central Limit Theorem

#37
post #16
post #15

Earlier quoted context omitted.

A "pipe" is simply a composition of functions. Tidyverse adds a different syntax for doing function composition, using the pipe operator, which I don't particularly like. My general objection to Tidyverse is that it tries to reinvent everything but the end result is a language that is less practical and less transparent than standard R.

Can you rewrite some of those snippets in standard R w/o Tidyverse? Curious what it would look like

I didn't rewrite the whole thing. But here's the first part. It uses the `histogram` function from the lattice package.

    population_data 

Re: Simulating and Visualising the Central Limit Theorem

#38
post #24

Earlier quoted context omitted.

The threshold should be exactly the same as when using another human's original text (or code) in your article. AI cannot have copyright, but for full disclosure one should act as if they did. Anything that's merely something that a human editor (or code reviewer) would do is fair game IMO.

Agree here - in a nutshell it strikes me as intellectually dishonest to intentionally pass off some other entity's work as one's own.

i personally have no problem with people including AI gen’d code without attribution so long as they stand by it and own the consequences of what they submit. after all, we all know by now how much cajoling and insisting it takes to get any AI gen’d code to do what it’s actually requested and intended to do.

the only exception being contexts that explicitly prohibit it.

Re: Simulating and Visualising the Central Limit Theorem

#39

Edit: OP confirms there's no AI-generated code, so do ignore me. The code style - and in particular the *comments - indicate most of the code was written by AI. My apologies if you are not trying to hide this fact, but it seems like common decency to label that you're heavily using AI? *Comments like this: "# Anonymous function"

[deleted]

Re: Simulating and Visualising the Central Limit Theorem

#40

“ You’re also likely not going to have the resources to take twenty-thousand different samples.” There are methods to calculate how many estimated samples you need. It’s not in the 20k unless your population is extremely high

I’m not sure what you mean by “higher population” but fyi what determines the required number of samples is a function of the full shape of the underlying distribution. For instance the Berry Esseen inequality puts bounds on the convergence rate as a function of the first two central moments of the underlying distribution. But the point is that the convergence rate to Gaussian can be arbitrarily slow!

https://en.m.wikipedia.org/wiki/Berry%E2%80%93Esseen_theorem

Post reply on HN