The experiment consists of selecting \(n\) balls at random from an urn with \(m\) balls, \(r\) of which are red and the other \(m - r\) green. Random variable \(Y\) gives the number of red balls in the sample, and is recorded on each update in the data table. Random variable \(U = \frac{m}{n} Y\) is the standard estimate of \(r\) with \(m\) known, and random variable \(V = \frac{n r}{Y}\) is the standard estimate of \(m\) with \(r\) known. These are also recorded on each update.
The probability density function and moments of \(Y\) 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 \(Y\) are shown in red in the distribution graph and are recorded in the distribution table. Either of two sampling models can be selected with the list box: with replacement and without replacement. In the first case, \(Y\) has a binomial distribution and in the second case \(Y\) has a hypergeometric distribution. The parameters \(m\), \(r\), and \(n\) can be varied with the input controls.