Simple question : how does one simulate a Poisson distribution ?
And preferably, in a way compatible with the use of tikz (the goal is to automatically plot a random number of points in a given area).
EDIT : A way to tackle this problem is to sample independant explonential variables X_i, i>0 and have as a result of the simulation the index N at wich the sum X_1+...+X_N exceeds 1 (or any given threshold).
But I lack experience so I don't know how to code that. Simulating an exponential variable is no problem but i don't see how to have LaTeX run the procedure.
EDIT2 :
-ln(rand)
More precisely, this command is enough to simulate an exponential variable of parameter 1.

\pdfuniformdeviateor normal distrbution via\pdfnormaldeviateproviding anything else would require coding the arithmetic to derive it from one of those, or coding a whole random number generator in tex macros. For most random plots just using the former to generate random coordinates in a given range is enough – David Carlisle Nov 30 '23 at 15:50