Objective: Compute binomial probabilities and quantiles and visualize these values in binomial probability and cumulative distributions.
Problem Description: The proportion of juvenile delinquents who wear glasses is known to be 0.2 whereas the proportion of non-delinquents wearing glasses is 0.6. A researcher plans to obtain random samples of 15 delinquents and 20 non-delinquents. Assume that the populations of delinquents and non-delinquents are very large.
Contents: Binomial Distribution; Binomial Moments Binomial Probabilities Binomial Quantiles
Examine the binomial distribution of the number of juvenile delinquents wearing glasses in a random sample of 15. By default, a binomial distribution with n=10 and p=0.5 is constructed. Adjust the n and p animation controls to show n = 15 and p = 0.2 by pressing on their right and left triangular buttons, respectively. These controls are to the right of the Distribution Popup Menu. (The distribution menu allows probabilities to be computed for other distributions such as the normal.) After adjusting the animator, click on the Rescale Button, if needed, to scale the axes properly. This operation should be done whenever the animation moves the probability distribution beyond the range of the axes labels. Notice the distribution is skewed to the right (positively skewed). This will always be the case when p < 0.5. Likewise, it is negatively skewed when p > 0.5.
Two mutually exclusive radio buttons are available for computing probabilities (the f(x) button) or computing quantiles (the F(x) button). Initially, the graph is set to compute probabilities and a default calculation is displayed. A popup menu P is positioned to the left of f(x) (assuming f(x) is selected). It allows the type of probability calculation to be changed, e.g., P(a < x < b) can be selected.
Calculate the probability two or fewer delinquents (out of 15) wear glasses. The following binomial distribution should appear:
Now calculate the probability that between 4 and 7 delinquents inclusive wear glasses. Press on the P popup menu and select a <= x <= b. Then click on one of the limits and change a to 4 and b to 7. P(4 <= X <= 7) = 0.3476 as shown in the tool bar.
How does this probability compare to that of non-delinquents? Change the p animation tool to .6 and change n to 20. The distribution is now (slightly) negatively skewed and gives P(4 <= X <= 7) = 0.0210 in the tool bar, i.e., the probability is very small. The small probability is not unexpected since both n and p are larger for non-delinquents. The binomial mean for delinquents is E(X) = 15 x 0.2 = 3 and the mean for non-delinquents is 20 x 0.6 = 12. The binomial standard deviation for delinquents is Sqrt(15 x 0.2 x 0.8) = 1.549 and the standard deviation for non-delinquents is 20 x 0.6 x 0.4 = 2.191.
Suppose we want to know the quartiles for the delinquent distribution. These are obtained from the cumulative distribution function F(x), i.e, by selecting the F(x) item. First change n to 15 and p to .20 and then click on F(x). Be default, q=0.5 which corresponds to the median (the 0.5 quantile). The median is 3 and is given by x(0.50) = 3 in the tool bar and in the plot by inversely solving for x in F(x) = 0.5, i.e, follow the green lines from F(x) = 0.5 to x = 3. Despite the positive skewness, the mean and median are both 3 due to the discreteness of the distribution.
Change q to 0.25 by pressing on the left triangle in the q animate tool. We see that the lower quartile is 2. Likewise, the upper quartile is found by pressing on the right triangular button until q is 0.75. The upper quartile is 4.
The cumulative distribution function F(x) for the non-delinquents is obtained by changing the n control to 20 and the p control to 0.6. The median is 12 (equal to the mean) and the lower and upper quantiles are 11 and 14, respectively.
The delinquent and non-delinquent binomial distributions are quite different. Both the mean and the standard deviation of the non-delinquent distribution are larger than those of the delinquent distribution. Furthermore, the shape changes from positive skewness for delinquents to slight negative skewness for non-delinquents.