First, initialize the enhanced plotting package:
![[Graphics:Images/Binomial_gr_1.gif]](Images/Binomial_gr_1.gif)
(On some machines, this command might be just " <<Graphics")
Mathematica calls the "Choose" ratio of factorials "Binomial":
![[Graphics:Images/Binomial_gr_2.gif]](Images/Binomial_gr_2.gif)
Name a list 'v' and fill it with integers to 20:
![[Graphics:Images/Binomial_gr_4.gif]](Images/Binomial_gr_4.gif)
'Binomial' can operate on the list to compute all 21 values; let's call that list `bv':
![[Graphics:Images/Binomial_gr_6.gif]](Images/Binomial_gr_6.gif)
BarChart can make a histogram of this distribution:
![[Graphics:Images/Binomial_gr_8.gif]](Images/Binomial_gr_8.gif)
We could also use old reliable ListPlot instead:
![[Graphics:Images/Binomial_gr_10.gif]](Images/Binomial_gr_10.gif)
In either case we see the characteristic 'bell curve' shape. Now let's normalize it to make the binomial distribution for N=20:
![[Graphics:Images/Binomial_gr_13.gif]](Images/Binomial_gr_13.gif)
![[Graphics:Images/Binomial_gr_15.gif]](Images/Binomial_gr_15.gif)
`%' means the previous result in Mathematica ; the above line takes the previous result and causes it to be evailuated Numerically:
Let's look at this normalized form:
![[Graphics:Images/Binomial_gr_18.gif]](Images/Binomial_gr_18.gif)
We understand its structure much better by using a semi-log plot, which shows that the log of this distribution is very nearly parabolic, that is, the distribution is well-approximated by a Gaussian form (and hence justifies expanding the log of the distribution in our Taylor's series):
![[Graphics:Images/Binomial_gr_20.gif]](Images/Binomial_gr_20.gif)
Left as an exercise to the student: Extend this to the general binomial distribution where p is not 1/2. Look at various limits, for example, the Poisson limit where p is `small' but N is `large'.