It’s so disheartening to see how much work you put into this and OP is brushing it away.
It really kills the vibe of the sub when the mods just let people spam questions without requiring any work or constructive discussion on the OP’s side
Rudimentary, you can set p to a very small value, and increase n. Then calculate both the expected value and the variance iteratively, and then use some error calculation to check both values. You will find that this is the poisson distribution, which is a limiting case of the binomial distribution when n is large and p is small. For why this works, I recommend you try to derive it analytically, the numerical part will just get you so far.
For Bin(n,p) set p to lambda/n and then take the limit as n approaches infinity.
22
u/SalvatoreEggplant Sep 15 '24
See: https://www.reddit.com/r/Rlanguage/comments/1fhdeyx/how_can_i_visualize_this_using_code/