this post was submitted on 02 Aug 2025
87 points (94.8% liked)

No Stupid Questions

42641 readers
566 users here now

No such thing. Ask away!

!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must be legitimate questions. All post titles must include a question.

All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.



Rule 2- Your question subject cannot be illegal or NSFW material.

Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding META posts and joke questions.

Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.

On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.

If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.



Rule 7- You can't intentionally annoy, mock, or harass other members.

If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.

Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.



Credits

Our breathtaking icon was bestowed upon us by @Cevilia!

The greatest banner of all time: by @TheOneWithTheHair!

founded 2 years ago
MODERATORS
 

If you were eating a soup from a bowl with 500ml of soup taking 25ml spoonfuls, and the rain replaced the volume that you ate at the same rate as you ate it, how many spoon fulls would it take for the soup to be completely replaced with water? Also, when that happens, would it still be the same soup?

you are viewing a single comment's thread
view the rest of the comments
[–] TranquilTurbulence@lemmy.zip 3 points 8 hours ago (2 children)

Ok, I couldn't resist. Here are the results of running that simulation 6000 times.

histogram

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   1085    1126    1140    1144    1157    1292       0 

This means that about half the time it's somewhere between 1126 and 1157 spoons.

FYI: /u/protist@mander.xyz, /u/Sabin10@lemmy.world, /u/neo2478@sh.itjust.works

[–] NeatNit@discuss.tchncs.de 2 points 7 hours ago (1 children)

By the way, how did you actually stimulate it? Surely you didn't keep 10^25 variables in memory...

[–] TranquilTurbulence@lemmy.zip 3 points 6 hours ago

I thought of making a vector with a length of about 1.671398e+25, but then I remembered what one time when when I tried to make a linear model with hundreds of dimensions. So yeah... We have gigabytes of RAM, and it's still not enough. Not really a problem, as long as you don't try to do anything completely ridiculous.

Instead, I just made a variable that simply contains the number of soup molecules and another one for the number of water molecules. Far simpler that way.

Here's where the magic happens:

# Number of soup molecules drawn
soup_molecules_replaced <- rbinom(1, replacement_count, prob_soup)

The rbinom function is used to generate random numbers from a binomial distribution. It's a discrete probability distribution that models the number of successes, i.e. scooping out a soup molecule. Rest of the codes is just basic infrastructure like variables, loops, etc.

BTW the variable names look ugly, because I couldn't be bothered to tidy everything up. I really prefer camelCase, whereas Mistral seems to prefer underscores. That's what you get for vibing.

Side note: If you do this kind of stuff for private purposes, you have to rely on your own hardware. If you plan to publish your discoveries, universities and publicly funded supercomputers might be an option. If there exists a Journal Of Recreational Mathematics And Useless Simulations (JORMAUS), I could totally publish this stuff and maybe even run my code on a supercomputer.

[–] NeatNit@discuss.tchncs.de 2 points 7 hours ago (1 children)

You rock! Thank you :)

If I find myself in the right mood I might try to work out the actual distribution. If I do, your simulation will be a very handy sanity check!

[–] TranquilTurbulence@lemmy.zip 1 points 6 hours ago* (last edited 5 hours ago)

Thanks!

If you want, I can increase the sample size. Just need to figure out how to add a timer to the code and set it to run for a few hours, maybe even overnight. A histogram with 10^6 bins should look pretty smooth.

Should also upgrade the visualization to ggplot2. Frivolous computations like this deserve no less.