ABSTRACT

In previous chapters, we have dealt primarily with continuous data, such as yield. There are occasions where data are not continuous. For example, some data will have only two possible values, such as whether a plant is diseased or healthy. Other examples are sex, alive or dead, etc. It may be useful in such cases to know the probability of a specific ratio of events. For example, sex ratios between males and females is approximately 50%. Not every sample from a population is going to have exactly half male and half female individuals, however. If you took a sample of 20 individuals, it would not be unusual to have 9 males and 11 females and, although a rarer event, it is even possible to have all 20 of the individuals be either male or female. Such binomial events can be calculated. Open the Binomial.dta dataset and enter the command

Datasets of this type can only have data as either 0 or 1, representing binomial data. In this case, it could be interpreted that 1 is female and 0 is male. Look at the value Pr(K == 4), which is 0.004621. This

is the probability of selecting a sample of 20 individuals and having only 4 be females. This output also indicates what the probability is for selecting a sample with 4 or less females (p = 0.005909) as well as selecting a sample with 4 or more females (p = 0.998712).