The nth row of Pascal’s triangle contains the binomial coefficients C(n, r) for r ranging from 0 to n.
If you print out the values of a row for moderately large n the numbers appear to make an arc.
Here’s are the numbers in the row for n = 100. You may be read the numbers if you squint, but you can see that the shape of the curve is something like a circle.
The length of the numerical representation of a number is roughly proportional to its logarithm, and so this suggests that a plot of the logarithms of a row of Pascal’s triangle will be a portion of a circle, up to some scaling of one of the axes, which is an ellipse.
Here’s a plot of log C(n, r) for n = 1000. The shape is the same for all large n, so the choice of n = 1000 doesn’t matter much at all.
The best fitting ellipse is
where a = 554.2. b = 47.12, and y0 = −19.87.
The plots of log C(1000, r) and the ellipse lie on top of each other; the error is less than the width of a plotting line. Here’s a plot of the relative error in approximating log C(1000, r) with the ellipse.
Parabolic fit
WoЇfgang pointed out that the curve should be a parabola rather than an ellipse because the binomial distribution is asymptotically normal. Makes perfect sense.
So I redid my plots with the parabola that interpolates log C(n, r) at 0, n/2, and n. This also gives a very good fit, but not as good!
But that’s not a fair comparison because it’s comparing the best (least squares) elliptical fit to a convenient parabolic fit.
So I redid my plots again with the least squares parabolic fit. The fit was better, but still not as good as the elliptical fit.
In the limit, the curve should be a parabola because of the central limit theorem. But for n = 1000 an ellipse fits better.
The post The ellipse hidden inside Pascal’s triangle first appeared on John D. Cook.