Dear all, I have two matrices lets call them A and B. Each of which is a 100 x 3 matrix. What I do is take the corresponding row from each matrix and form 100 2 x 3 tables. If we call the column sums for each 2 x 3 n1, n2 and n3, I would like to compute the following probability: Basically the number of (n1 = a, n2 = b) in all the tables divided by the number of tables. Its the probability that a table has a particular column total. So if A was 0 2 3 0 2 3 1 2 4 2 3 3 B was 1 0 3 1 0 2 1 2 4 2 3 3 The 2 x 3 tables would be: 0 2 3 1 0 3 Totals (1,2) # first 2 totals 0 2 3 1 0 2 Totals (1,2) 1 2 4 1 2 4 Totals (2,4) 2 3 3 2 3 3 Totals (4,6) The expected probabilities I should get are: 0.5, 0.5, 0.25 and 0.25 for each of the 2 x 3 tables. Any help is greatly appreciated..... -- Thanks, Jim. [[alternative HTML version deleted]]