This is the start of a trio of pages that demonstrate taking samples from a population that has two independent values, each with discrete multiple characteristics. The purpose of taking such samples is to demonstrate the computation of the χ² values from the contingency table of the sample and to look at the probability estimate for those values.

We start by specifying the row and column characteristics in the underlying population. [The input form for doing this is given at the bottom of this page, below the horizontal line.] We are limited in this to using a single digit, in the range of 2 to 9, for the proportion of the various characteristic values. Thus, if the row variable has 4 characteristics, red, green, blue, and yellow, with the relative proportions of 3, 5,2, and 7, then we could specify that situation by using the value 7253. [In this example we really are not concerned about the colors so we could have specified the distribution as 3527 or 2357 or 3571 and so on.] If there are 5 characteristics to the column variable, square, triangle, circle, star, and hexagon, and they are in the proportion 9:2:4:4:7, then we could specify that as 92447 or as any other arrangement of those digits.

Once we move to the next page a population will be generated and displayed that has the specified proportions of the two variables

After that, the next page will take 1000 samples from the population. Rather than specify the sample size, on this page we specify the minimum required value in each of the cells of the resulting sample contingeny table. That is, the next page will not stop taking a sample until each cell in the sample contingency table has reached or exceeded that minimum value. The next page also computes and displays the χ² value for each of the 1000 samples, as well as comparing that value to the tabular χ² value for the appropriate degrees of freedom for 10%, 5%, 2%, and 1% right-tail probability.

We access the third page of this trio by clicking on the "sample number" in the table of samples. First, that third page will display the sample contingency table. Then the page displays an augmented contingency table giving the row, column, and grand totals along with the row, column, and total percent for each cell in the original table. Finally the page displays another augmented table this time giving the observed value, the expected value, the (observed-expected) value, the (observed-expected)² value, and the (observed-expected)²/expected value. That contingency table is then follwed by the sum of all the (observed-expected)²/expected values.

©Roger M. Palay

Saline, MI 48176

August, 2017