Discrete normal distributions

#1
I have been tasked with assisting in the improvement of a piece of video game software. The problem involves a kind of loot drop mechanic that isn't behaving in a way that could be described as normal or expected. So I want to clarify exactly what is normal and expected.

Description of problem space
In a 2D world, a bag of magic marbles is poured out, where they should form a normally distributed pile. There are 256 marbles in the bag. As the marbles pour out one by one, they form stacks that become a sequentially more refined image of a bell curve.

Question
How can I determine the width and height of these stacks, according to how many marbles are currently involved?

I've tried looking through MS Excel documentation on Normal Distribution functions -- utterly useless. Wolfram Mathematica's documentation on their Probability Density Function (PDF) is better, but relies on serving up results without going into how to achieve them.
 

Miner

TS Contributor
#2
Technically, you should be using the Poisson distribution instead of the Normal distribution. If an approximation is good enough versus an exact fit, you could use a quincunx approach. Quality people have used this for decades to demonstrate the concept of variation and the effect of making adjustments in response to random variation.
 

Dason

Ambassador to the humans
#3
Do you know how many bins you want to use?

If you know how many bins I would just use the binomial distribution with p=0.5. As the number of bins increase this will look more and more like a normal distribution. To do you animation you could either just let chance do its thing or there are ways to make it look as normal as possible by the end while still being random looking throughout.
 

Dason

Ambassador to the humans
#5
Ultimately I think the you'll need to just choose a width (or in this case just total number of bins) and from there it's easy to get the theoretical height / number of marbles for each bin.

Essentially you're looking to animate something similar to a "Galton board" right?
 
#6
I came up with 7 bins with width of 1 marble each. The distribution of the marbles in the 7 bins is 2, 15, 62, 98, 62, 15, 2. How I got these numbers is I found the probabilities P(-3.5<z<-2.5), P(-2.5<z<-1.5),…,P(2.5<z<3.5) using the Standard Normal Distribution Calculator. Then I multiplied each of those probabilities of 256. Basically, I divided the standard normal distribution into 7 bins from -3.5 to 3.5 since that covers like 99.99% of the distribution. Let me know if this works for you or if you have any questions.