Live data from Hacker News

Simulating and Visualising the Central Limit Theorem

blog.foletta.net

21–30 of 67 posts

Re: Simulating and Visualising the Central Limit Theorem

#21

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"

https://gptzero.me/ Says that at large portions of it are 100% human

Re: Simulating and Visualising the Central Limit Theorem

#22
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 mean, for the main simulation I would do it like this:

    set.seed(10)
    n 
I am old, so I do not like tidyverse either -- I can concede it is of personal preference though. (Personally do not agree with the lattice vs ggplot comment for example.)

Re: Simulating and Visualising the Central Limit Theorem

#23

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"

Interesting comment. Why is it common decency to call out how much ai was used for generating an artifact?

Is there a threshold? I assume spell checkers, linters and formatters are fair game. The other extreme is full-on ai slop. Where do we as a society should start to feel the need to police this (better)?

Re: Simulating and Visualising the Central Limit Theorem

#24

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"

Interesting comment. Why is it common decency to call out how much ai was used for generating an artifact? Is there a threshold? I assume spell checkers, linters and formatters are fair game. The other extreme is full-on ai slop. Where do we as a society should start to feel the need to police this (better)?

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.

Re: Simulating and Visualising the Central Limit Theorem

#25
post #12

Earlier quoted context omitted.

Why? The tidyverse is so readable, elegant, compositional, functional and declarative. It allows me to produce a lot more and higher quality than I could without it. ggplot2 is the best visualization software hands down, and dplyr leverages Unix’s famous point free programming style (that reduces the surface area for errors).

I disagree. In this example tidyverse looks convoluted compared to just using an array and apply. ggplot2 is okay but we already had lattice. Lattice does everything ggplot2 does and produces much better-looking plots IMO.

I like simplicity and I love a good base R idiom, but there's a lot less consistency in base R compared to the tidyverse (and that comes with a productivity penalty).

Lattice is really low-level. It's like doing vis with matplotlib (requires a lot of time and hair-pulling). Higher level interfaces boost productivity.

Re: Simulating and Visualising the Central Limit Theorem

#26
post #24

Earlier quoted context omitted.

Interesting comment. Why is it common decency to call out how much ai was used for generating an artifact? Is there a threshold? I assume spell checkers, linters and formatters are fair game. The other extreme is full-on ai slop. Where do we as a society should start to feel the need to police this (better)?

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.

Re: Simulating and Visualising the Central Limit Theorem

#27
post #24

Earlier quoted context omitted.

Interesting comment. Why is it common decency to call out how much ai was used for generating an artifact? Is there a threshold? I assume spell checkers, linters and formatters are fair game. The other extreme is full-on ai slop. Where do we as a society should start to feel the need to police this (better)?

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.

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 say who wrote the comments but ostensibly OP is a new grad / junior, the commenting style is on-brand.

Re: Simulating and Visualising the Central Limit Theorem

#28
There is an analogue of the CLT for extreme values. The Fisher–Tippett–Gnedenko theorem is the extreme-values analogue of the CLT: if the properly normalized maximum of an i.i.d. sample converges, it must be Gumbel, Fréchet, or Weibull—unified as the Generalized Extreme Value distribution. Unlike the CLT, whose assumptions (in my experience) rarely hold in practice, this result is extremely general and underpins methods like wavelet thresholding and signal denoising—easy to demonstrate with a quick simulation.

Re: Simulating and Visualising the Central Limit Theorem

#29
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.

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

Re: Simulating and Visualising the Central Limit Theorem

#30
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.

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…

That is not a disclaimer for generated code, it's referring to the code that generated the simulations/plots.

I had read that line before I commented, it was partly what sparked me to comment as it was a clear place for a disclaimer.

Post reply on HN