Live data from Hacker News

The Central Limit Theorem Visualized with D3

blog.vctr.me

41–50 of 80 posts

Re: The Central Limit Theorem Visualized with D3

#42
post #36

Earlier quoted context omitted.

Why isn't it the central limit theorem? It is taking random results and building a distribution which looks normal.

Imagine you have a population that is NOT normally distributed. Take a large sample of it, and calculate the mean of your sample. Then take another large sample of that population and calculate its mean. Keep doing this. Think of each sample mean as a data point that gives you an estimate of the mean of the whole population. The Central Limit Theorem says (approximately, and there are conditions) that those sample-me…

[deleted]

Re: The Central Limit Theorem Visualized with D3

#43
post #30
post #22

Kind of a misleading animation, since n is the number of switches (4) and not the number of balls (which diverges to infinity). Setting the bins to 500 froze the browser, unfortunately. The physical machines that do this are undeniably cool, but especially when they have the curve painted on beforehand; this is the best I could find right now, but I remember seeing a pretty big one as part of a traveling mathematics…

When I worked at DEKA, I met a guy who designed and built an invertible Galton Box. The ball-holder was circular and if you spun it one way, the balls would fall into the expected bell curve. But if you turned it the other way, the pins would shift very subtly - so little you wouldn't really notice - but the balls would fall in a perfect inverse bell curve, with most of the balls on the outside and very few in the mi…

That's awesome. Did it have the inverse curve drawn on too? For some reason, the certitude expressed by "calling your shot" like that made more of an impression on my than the falling balls on their own.

Re: The Central Limit Theorem Visualized with D3

#44
post #27
post #22

Kind of a misleading animation, since n is the number of switches (4) and not the number of balls (which diverges to infinity). Setting the bins to 500 froze the browser, unfortunately. The physical machines that do this are undeniably cool, but especially when they have the curve painted on beforehand; this is the best I could find right now, but I remember seeing a pretty big one as part of a traveling mathematics…

what browser are you using? the bins tag has a max value set to 25

the `max` attribute only applies to using the native spinner controls, you can still select and type larger values.

Re: The Central Limit Theorem Visualized with D3

#45
post #36

Earlier quoted context omitted.

Why isn't it the central limit theorem? It is taking random results and building a distribution which looks normal.

Imagine you have a population that is NOT normally distributed. Take a large sample of it, and calculate the mean of your sample. Then take another large sample of that population and calculate its mean. Keep doing this. Think of each sample mean as a data point that gives you an estimate of the mean of the whole population. The Central Limit Theorem says (approximately, and there are conditions) that those sample-me…

No, it does show multiple sample means. Each landing spot is the sum (scaled average) of the n - 1 bernoulli rvs, where n is the number of bins. The issue is that n is small.

Re: The Central Limit Theorem Visualized with D3

#46
post #27
post #22

Kind of a misleading animation, since n is the number of switches (4) and not the number of balls (which diverges to infinity). Setting the bins to 500 froze the browser, unfortunately. The physical machines that do this are undeniably cool, but especially when they have the curve painted on beforehand; this is the best I could find right now, but I remember seeing a pretty big one as part of a traveling mathematics…

what browser are you using? the bins tag has a max value set to 25

Firefox 21

Re: The Central Limit Theorem Visualized with D3

#47
post #13

while i have the attention of HN, does anyone have suggestions on any other types of statistic visualizations?

Something that shows bids and offers converging to a market price. Not sure how you'd do it. In the Swensen/Yale finance lecture series on iTunes U they play a game with participants buying/selling items and a pattern emerges in the prices as if by magic.

Re: The Central Limit Theorem Visualized with D3

#50
post #45
post #36

Earlier quoted context omitted.

Imagine you have a population that is NOT normally distributed. Take a large sample of it, and calculate the mean of your sample. Then take another large sample of that population and calculate its mean. Keep doing this. Think of each sample mean as a data point that gives you an estimate of the mean of the whole population. The Central Limit Theorem says (approximately, and there are conditions) that those sample-me…

No, it does show multiple sample means. Each landing spot is the sum (scaled average) of the n - 1 bernoulli rvs, where n is the number of bins. The issue is that n is small.

You are correct in pointing out this error of the parent comment (by SiVal). Each ball is indeed the sum of "n-1" bernoulli RVs, and the CLT does apply to these sums.

As btilly points out elsewhere, to actually obtain the correct limit, you have to normalize the sum correctly. Because of the way the scaling is done in this graphic, as you increase the number of levels, it's in effect normalizing the sum by dividing by "n". To get the right limit, you need to divide by sqrt(n).

In this sense, the CLT is a high-resolution version of the SLLN ("law of averages"). If you normalize the sums by 1/n, the resulting average converges to a number, the mean.

But if instead you subtract this mean, and normalize by 1/sqrt(n) rather than 1/n, the result converges in distribution, and looks like a normal random variable.

By less aggressive normalization, you get information about the fluctuations rather than just pounding it down to a number, as the SLLN does.

I used to TA a probability class for undergrads, and I found the demo to be perfectly reasonable.

Post reply on HN