Studio · From Approximation
Any continuous curve
Can averaging with coin-toss probabilities copy even a curve that is jagged everywhere?
Composing the first frame…
Toss a coin n times, with chance x of heads each time: the probability of exactly k heads is one weight. The ice-blue bars are the n + 1 weights at this x (when n is large, several are merged into one bar); they add up to 1 and gather around k/n = x. The points of the curve at k/n light up by their weights, and the gold dot is the weighted average. Average like this at every x and you get the gold curve, a Bernstein polynomial. Drag where to look and the bars follow; drag n up and the bars gather ever closer, the gold curve ever nearer. Once n is large, the smooth curve is copied fastest: n ten times larger cuts the error to about a tenth. The V can't reach into its corner: n ten times larger only cuts the error to about three tenths. The jagged one belongs to the family of curves Weierstrass built: the true curve, a sum of infinitely many terms, is continuous yet has nowhere to draw a tangent; the picture and the readouts use its first twelve terms. The gold curve still settles into the teeth layer by layer, only more slowly. The corner compares the error at n with the error at a tenth of n, as a factor, and the next row gives the factor the theory predicts for the same two values of n: for the smooth curve and the V it holds once n is large; for the jagged curve it is only the order of an upper bound, and the measured factor need not match it.