x = matrix(c(0, 0, 0, 1, 1, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 1, 1, 0, 1,
0, 0, 0, 2, 1, 0, 1, 0, 0, 1,
0, 0, 0, 1, 1, 2, 0, 0, 0, 0,
0, 0, 0, 3, 6, 2, 2, 0, 0, 0,
2, 0, 2, 5, 6, 5, 1, 0, 0, 0,
0, 0, 4, 6, 11, 5, 1, 1, 0, 1,
0, 0, 5, 10, 21, 7, 5, 1, 0, 1,
0, 0, 7, 11, 9, 6, 3, 0, 0, 1,
0, 0, 4, 10, 6, 5, 1, 0, 0, 0),10,10,byrow=TRUE)
MI.sd(x)
x = rbinom(100,20,.5)
y = rbinom(100,20,.5)
MI.sd(table(x,y))
Run the code above in your browser using DataLab