## Binomial

Coin tosses, random walks, and spins in a magnetic field can all be described the same way. The number of heads, steps to the right, or spins aligned with the magnetic field is described by the binomial distribution. If the number of tosses, steps, or spins becomes large so the number can be considered to be continuous, the binomial distribution becomes the Gaussian distribution, which describes the fluctuations from mean values of macroscopic quantities in thermal equilibrium.

Program Binomial allows you to explore the properties of the binomial distribution.

Problem: The binomial distribution
1. Calculate the probability $P_N(n)$ for $p=q=1/2$ that $n$ spins are up out of a total of $N$ for $N=4$ and $N=16$. Determine the mean values of $n$ and $n^2$ using your values of $P_N(n)$. Although it is better to first do the calculation of $P_N(n)$ by hand for small $N$, you can use Program Binomial to do the calculation.
2. Use Program Binomial to plot $P_N(n)$ versus $n$ for larger values of $N$ and $p=q=1/2$. Determine the value of $n$ corresponding to the maximum of the probability and visually estimate the width for each value of $N$. What is your measure of the width?
3. One measure of the width is to use the two values of $n$ at which $P_N(n)$ is equal to half of its value at its maximum. What is the qualitative dependence of the width on $N$? Compare the relative heights of the maximum of $P_N$ for increasing values of $N$.
4. Program Binomial also plots $P_N(n)$ versus $n/\overline{n}$. Does the width of $P_N(n)$ appear to become larger or smaller as $N$ is increased?
5. Plot $\ln P_N(n)$ versus $n$ for $N=16$. Describe the qualitative dependence of $\ln P_N(n)$ on $n$. Can $\ln P_N(n)$ be fitted to a parabola of the form $A + B(n-\overline{n})^2$, where $A$ and $B$ are fit parameters?

## Resource

Problem 3.37 in Statistical and Thermal Physics: With Computer Applications, 2nd ed., Harvey Gould and Jan Tobochnik, Princeton University Press (2021).

OSP Projects: