]>
This applet models Pólya's urn experiment. An urn initially contains red and green balls. On each trial, a ball is selected at random from the urn, and then replaced along with new balls of the same color. In this simulation, the red balls are numbered consecutively 1, 2, ... and the green balls are numbered consecutively 1, 2, ... The sample of balls in trials is shown in the left graph box. Random variable gives the number of red balls after trials, and gives the proportion of red balls in the trials. These are recorded on each update in the data table.
The probability density function and moments of are shown in blue in the distribution graph and are recorded in the distribution table. On each update, the empirical density function and moments of are shown in red in the distribution graph and are recorded in the distribution table. The parameters , , , and can be varied with scroll bars.