Читать книгу Biostatistics Decoded - A. Gouveia Oliveira - Страница 18

1.10 Variance of Binary Variables

Оглавление

As a binary variable is a numeric variable, in addition to calculating a mean, which is called a proportion in binary variables, we can also calculate a variance. The computation is the same as for interval variables: the differences of each observation from the mean are squared, then summed up and divided by the number of observations. With binary l variables there is no need to correct the denominator and the sum of squares is divided by n.

An easier method of calculating the variance of a binary attribute is simply by multiplying the proportion with the attribute by the proportion without the attribute. If we represent the proportion with the attribute by p, then the variance will be p(1 − p). For example, if in a sample of 110 people there were 9 with diabetes, the proportion with diabetes is 9/110 = 0.082 and the variance of diabetes is 0.082 × (1 − 0.082) = 0.075. Therefore, there is a fixed relationship between a proportion and its variance, with the variance increasing for proportions between 0 and 0.5 and decreasing thereafter, as shown in Figure 1.14.

Figure 1.14 Relationship between a proportion and its variance.

Biostatistics Decoded

Подняться наверх