Baye's theorem

The relative probability of this or that arrangement of Nature is something which we should have a right to talk about if universes were as plenty as blackberries, if we could put a quantity of them in a bag, shake them well up, draw out a sample, and examine them to see what proportion of them had one arrangement and what proportion another. But, even in that case, a higher universe would contain us, in regard to whose arrangements the conception of probability could have no applicability.
-- Charles Sanders Peirce
Consider 21 urns, U0, U1, . . ., U20, with urn Ui containing i red chips and 20 - i blue chips. Suppose an urn is chosen at random and we begin to sample, with replacement, the chips in the selected urn, recomputing the probability that a given urn is the one chosen after each trial. If the urn chosen for sampling is Ui, this demonstration plots the probability that our observations come from Uj: If i = j, this probability will converge to 1; otherwise, it will converge to 0. The color of the point plotted is the color of the chip sampled on that trial.

Sample from urn: Plot probability of urn:



Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.