# Pólya Urn Simulation

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration simulates the behavior of an urn system under rules developed by G. Pólya. We start with some red and black balls in an urn. At each step we choose one randomly, replace it, and add balls of the same color and balls of the opposite color, where and are parameters. A special case is sampling without replacement, where and . In another special case, where and , the number of times that a red ball is chosen follows the binomial distribution. The number of draws can range up to 1000, but the urn can be shown only if there are 200 or fewer draws.

Contributed by: Karl W. Heinerand Stan Wagon (August 2011)

(SUNY New Paltz and Macalester College)

Open content licensed under CC BY-NC-SA

## Snapshots

## Details

detailSectionParagraph## Permanent Citation

"Pólya Urn Simulation"

http://demonstrations.wolfram.com/PolyaUrnSimulation/

Wolfram Demonstrations Project

Published: August 24 2011