Hacker News new | ask | show | jobs
by zug_zug 697 days ago
I'm sorry but this falls flat for me. GPT4 routinely can answer impressive math questions for me (college-level):

- What diameter steel wire would I need to be rated for a weight of 500lbs?

- How many digits would a ID need to be (using 36 characters) to have a 1/10^20 chance of collision over 1 billion random IDs?

- If I have a list of a million times (say durations of a web request) and they follow a normal distribution, and I take a sample of 1 million of those, how close would the average of my .1% sample be to the true average of the billion?

- Suppose in D&D I am told to roll 20 d6, but instead of rolling that many dice I want to roll just two (larger) dice and add a constant. Which standard D&D dice might give the closest variance and what is the constant?

1 comments

It is for sure just a funny hobby project, but your statement had me intrigued:

> Suppose in D&D I am told to roll 20 d6, but instead of rolling that many dice I want to roll just two (larger) dice and add a constant. Which standard D&D dice might give the closest variance and what is the constant?

Interestingly, ChatGPT 4o tells me to use 2d19 + 51, even after correcting it and asking for larger dice. Impressive math for sure but not worth much if it doesn't respect constraints. I guess I could try again until it stumbles upon the right answer, but it's all to say it's not quite there yet.

To be fair, I didn't hand-check the answer it gave (and I didn't retype the whole prompt exactly here) - but here's what it gave me [4o model]:

... (lots of calculations)

Final Comparison

    Variance of 20d6: 58.33458.334
    Variance of 1d20+1d12+53: 45.166745.1667
The variance of 1d20+1d12+53 is closer to 58.334 than previous combinations and represents a reasonable approximation for both mean and variance.

[Edit: Just checked it in google sheets, this looks right to me]

Yes, it's technically correct, but you said a larger dice, which a d12 is not :)

I would be curious to know if the larger dice version is impossible, but then I would also expect it to tell me.

I'm confused. I consider a d12 a larger die than a d6. Perhaps you're making a pun about physical size of the dice?
Oh wow I actually misread the comment, thought it was 6d20. Ok scratch everything!