UBC - BIOLOGY 300

4. HYPOTHESIS TESTS FOR CATEGORICAL DATA

1a) The data do not appear to be uniform. The bar graph is roughly normal, with very little skew.

b) Ho: Litter size is uniformly distributed among all litter size classes.

Ha: Litter size is not uniformly distributed among all litter size classes.

Using the raw data we get: a = 0.05, n = 11, c 2 = 10.000 so p = 0.5304, G = 10.3749 so p = 0.4970; in both cases we fail to reject the null hypothesis; there is no evidence that this data is not uniform.

The expected values for this data set are all 4, however, so 100% of the expected values are less than 5. Whenever more than 20% of the expected values are less than 5 (or when any expected values are less than 1), the approximations to the true chi-squared curve are quite bad. This means that we should group our data into fewer categories to increase the size of our expected values. In this case we could group litter sizes of 1 and 2 together, 3 and 4 together, etc. For this grouped data, our expected values will be 8, solving the problem. In general, we should group in a rational way and only as much as necessary, since the lower our degrees of freedom (i.e. the fewer categories we have) the harder it will be to reject Ho.

For our grouped data: a = 0.05, n = 5, c 2 = 7.500 so p = 0.1860, G = 7.0572 so p = 0.2164; in both cases we still fail to reject the null hypothesis; there is no evidence that this data is not uniform.

c) G and c 2 are very similar although for the raw data the value for G suggests a slightly higher deviation between observed and expected, while the reverse is true for the grouped results. They are both just approximations to the true c 2 distribution, which is described by an integral formula.

d) The visual analysis provides a very different conclusion but is based on individual perception rather than measurable probabilities. Even with statistical tests, though, we can only make statements that are limited by the uncertainty introduced by random sampling and our selected alpha levels. We may make a Type I or II error at any time.

e) For both of the grouped goodness of fit tests the degrees of freedom (n ) are 5. We lose one degree of freedom from the total number of categories because we force our expected values to sum to n, the total number of observations.

f) Both of these tests are only approximations to the true Chi-squared distribution. When expected values are small, the approximation is very poor and very difficult to correct. In general, none of the expected values should be less than 1, and no more than 20% should be less than 5.

2a) Ho: The phenotypes are in a 9:3:3:1 ratio.

Ha: The phenotypes are not in a 9:3:3:1 ratio.

a = 0.05, n = 3, c 2 = 1.551 so p = 0.6706, G = 1.715 so p = 0.6336

The probability is greater than alpha, so we fail to reject the null hypothesis. There is no evidence that these values vary from a typical Mendelian ratio of 9:3:3:1.

b) Although we use 2 columns, the variable is actually our categories (in this case, the 4 different phenotypes). The second column is just a list of frequencies for the first column, saving us from typing in disease resistant, early maturing 111 times, and so on for the other 3 phenotypes.

c) Calculating the statistics using the probabilities on the screen will provide a c 2 = 0.008, which is very different from the computer statistics. While it doesn't show the values, JMPin works with the raw values, so that in this case both observed and expected will add up to 190.

3a) There are two variables here: latitude and scale count phenotype.

b) Ho: Phenotype is independent of latitude.

Ha: Phenotype is not independent of latitude.

a = 0.05, n = 1, c 2 = 3.542 so p = 0.0598, G = 3.544 so p = 0.0597

Therefore we fail to reject the null hypothesis; there is not sufficient evidence to show that phenotype and latitude are not independent.

c) Being almost below our alpha level isn't good enough. Unless we obtain a probability of 0.05 or less we can't reject the null hypothesis. In the real world, results such as these might suggest that we should repeat the experiment with a larger number of observations in the hope that more information might allow us to reject the null.

d) The Fisher's exact test provides us with a direct and exact measurement of the probability associated with any result. No approximations are involved and there are no limitations on sizes of expected values. In this case, the 2-tailed probability is 0.0662, so it too fails to reject the null hypothesis.

4a) Ho: Blackleg incidence is independent of fertiliser treatment.

Ha: Blackleg incidence is not independent of fertiliser treatment.

a = 0.05, n = 3, c 2 = 9.258 so p = 0.0260, G = 10.122 so p = 0.0176

Therefore we reject the null hypothesis; the data suggest that fertiliser treatment is related to blackleg incidence.

b) Using the treatments no fertiliser and nitrogen alone provides a simple controlled experiment of the interaction of nitrogen addition and disease incidence. Note that in the real world we would never retest the same data to try to get a different answer. Instead we would conduct a new experiment with the simplified experimental design.

c) Since this is now a two by two table it can be tested using G, c 2 or the Fisher's exact test.

Ho: Blackleg incidence is independent of nitrogen addition.

Ha: Blackleg incidence is not independent of nitrogen addition.

a = 0.05, n = 1, c 2 = 1.202 so p = 0.2729, G = 1.213 so p = 0.2706, Fisher's p=0.2991

Therefore we fail to reject the null hypothesis; the data provide no evidence for a relationship (dependence) between nitrogen addition and blackleg incidence.

 

 

Return to Assignment

Return to Main Lab Page

Return to Main Course Page