Homework Set 2 solutions Problem 1 We have worked out in lecture many of the features of the binomial distribution for ten pennies (N = 10). As we noted, the number of ways that n heads will show when 10 pennies are tossed on the table is given by the binomial coefficient: µ ¶ N! N 10! = g(n) = = (1) n n!(N − n)! n!(10 − n)! The probability that n heads will show is just P (n) = g(n)/210 = g(n)/1024. We want to make a graph of P (n) vs x = n/10, so here is a little table of the values we need: n 0 1 2 3 4 5 x 0 0.1 0.2 0.3 0.4 0.5 g(n) 1 10 45 120 210 252 P (n) .098 × 10−2 .977 × 10−2 4.39 × 10−2 11.72 × 10−2 20.5 × 10−2 24.6 × 10−2 The values for n between 5 and 10 are easily obtained from the above values, since the distribution is symmetric. The mean of this distribution is µ = N p = √ 10 ∗ 0.5 = 5. The variance is σ 2 = N pq = 10/4 = 2.5, so the standard deviation is σ = 2.5 ≈ 1.58. Here is a hand-made graph (scanned into this document): Note that we have made our graph in the form of a bar chart, since P (n) is defined only for integer values of n. The values of µ, µ − σ and µ + σ are marked on the graph. σ is a measure of the width of the distribution. 2–1 2–2 Physics 5D — Homework set 2 solutions Problem 2 When N becomes larger, the values of P (n) get harder to calculate. If I try to calculate 100! on my calculator, it does not work. The largest it will do is 69!, and beyond that the memory is overloaded. (It is a rather old calculator). Taking the suggestion given in the problem, however, I can use Stirling’s approximation. If I take the natural logarithm of Eq. 1 (see problem 1) I find ln g(n) = ln N ! − ln n! − ln(N − n)! Now we can make use of Stirling’s approximation, noting that for N = 100, extending to four decimal places, 1 1 ln(200π) + 2 1200 = 460.5170 − 100.0 + 3.2215 + 0.0008 ln 100! ≈ 100 ln 100 − 100 + = 363.7393 which compares favorably with the more precise value1 of 363.7393755555634901440799933. Note that each of the terms in the above series is quite a bit smaller than the preceding term. In fact, the term 1/12N is negligible for our purposes, and even the term 0.5 ∗ ln(2πN ) adds less than one percent to the result. Hence to make our plot, we’ll try using just the first two terms, and assume that ln n! ≈ n ln n − n. With this assumption, noting that 1 N! P (n) = N 2 n!(N − n)! we find ln P (n) = N ln N − n ln n − (N − n) ln(N − n) 2 However, note that with this expression, ln P (N/2) = 0, so that P (N/2) = 1.0, which is incorrect; we expect a much smaller value for the maximum of P (n)—the probability of getting exactly 50 heads cannot be certainty. It is possible that our approximation is too crude, and that we should include the next term in the Stirling approximation above. If we do that, we find ¶ µ ¶ µ ¶ µ 1 N 1 1 1 ln P (n) = N + ln − ln π − n + ln n − N − n + ln(N − n) 2 2 2 2 2 Now, with this expression, ln P (N/2) = −2.528 for N = 100, with a resulting maximum value of P (n) equal to 0.0798, which is much more reasonable. For N = 100, µ = 50 and σ 2 = N/4 = 25, so σ = 5. 1 For any computer afficianados: I used a nice piece of free software, downloadable from http://www.parigp-home.de/ to calculate ln 100! Physics 5D — Homework set 2 solutions 2 – 3 Here is a graph of P (n) vs n/100, where, for clarity, we have simply plotted the points, rather than make a bar graph: 0.1 0.08 Binomial distribution for 100 pennies. σ = 5, so µ ± σ on this plot occurs at 0.5 ± 0.05 P(n) 0.06 0.04 0.02 0 0 0.2 0.4 0.6 0.8 1 n/100 Problem 3 With N = 10000, we can try approximating the binomial distribution with the Gaussian distribution function, which becomes a good approximation when N is large, i.e., N À 1. Letting x ≡ n/N , we have the following expression for P (n): r 2 2N (x− 1 )2 2 e P (n) = πN (2) 0.01 Binomial distribution for 10000 pennies, using Gaussian approximation. σ = 50, so µ ± σ on this plot occurs at 0.5 ± 0.005 Points are plotted at increments of ∆n = 5. 0.008 P(n) 0.006 0.004 0.002 0 0 0.2 0.4 0.6 n/10000 0.8 1 2–4 Physics 5D — Homework set 2 solutions In this case, µ = 5000, and σ 2 = 2500 so that σ = 50. This means that values of µ ± σ occur at x-values of 1/2 ± .005, which makes the graph more peaked. Note a frequent point of confusion regarding probability distribution functions: In the problem, it is stated that in the Gaussian approximation, the probability for finding x between x and x + dx is given by r 1 2N −2N (x− 1 )2 −(x−µ)2 /2σ 2 2 P (x) dx = √ e dx = e dx (3) π σ 2π whereas the above expression for P (n) (Eq. 2) has the factor N in a different place in the formula. This is because the values of µ and σ have to be in the proper units. In terms of n, µ = N/2 and σ 2 = N/4, whereas in terms of x, µ = 1/2 and σ 2 = 1/4N . When changing variables in probability distribution functions, it is well to use the relation P (x) dx = P (n) dn, so if you multiply x by N you have to divide P (x) by N . This is also the reason why the peak value of P (n) becomes smaller (inversely proportional to N ) as N increases. For probability function of a continuous variable x, the probability of finding any particular value of x is always zero; this is different from asking what the probability is to find x in some interval dx. The latter is not zero. Problem 4 In the case of N = 1021 , the mean µ = 5 × 1020 , and the variance σ 2 = 2.5 × 1020 , so σ = 1.58 × 1010 . This means that the ratio σ/µ = 3.16 × 10−11 , and the graph we might draw will be very sharp indeed—the width of the spike on a graph like the two above will be on the order of a millionth of a micron wide, about as wide as one hundredth of an atom in the paper—impossible to represent on a piece of paper using a pencil. It is the idea of this problem to indicate that the fluctuations in density, or pressure, or energy, or almost any thermodynamic quantity, in a box containing as many atoms or molecules as there are in a drop of water will be extremely small, so that any significant deviations from the mean will never occur.
© Copyright 2026 Paperzz