Two-way frequency table visualizer

Type or paste your Observed joint distribution matrix/contingency/two-way frequency table (data only, no names, no totals):

      #rows: #columns:


The more uneven the horizontal lines, the more dependent.

Relative frequencies

Marginal relative frequencies: row or column sum / grand total
rows: ∑=1
cols: ∑=1

Joint relative frequencies: entry / grand total
∑=1

Conditional relative frequencies: entry|row (or col) = entry / rowSum (or colSum)
Rows:
Cols:


INDEPENDENCE: rows and columns are multiples of each other. X^2=0
10 30
20 60

1 2 3 4
2 4 6 8
3 6 9 12

2 2 2 2
2 2 2 2
2 2 2 2

perfect/complete dependence occurs when each row(col) has only one non-zero entry, and 
  no two rows(cols) have their non-zero entry in the same column.
 Sqr: permute rows so that all the non-zero entries lie on one diagonal, and every other cell is zero.
X^2 very large (actually, theoretically infinite if you try to compute expected values — many E = 0).
The two variables are completely determined by each other.
  Knowing one tells you all about the other. and vice versa
Conditional probabilities are either 0 or 1.
There is no randomness left in the relationship.

0 10
8 0

30 0  0
0 45 25

20  0
 0 35
 0 45



doctors Vs nurses preference for new/old procedure
The variables are profession and preference.
       new   old   indifferent
docs   100    80       20
nurses  50   120       30
Do the professions feel the same or differently about the new procedure?
i.e. does profession make a difference? Is opinion is related to profession?


3 hospitals. 3 types of infections. Is number of infections related to hospital where occurred?
The variables are hospital and infection type.
infectionA infectionB infectionC
41   27  51
36    3  40
169 106 109


Is there a relationship between gender and alcohol consumption?
Male vs Female.
 Low    Moderate    High
 10       9           8
 13      16          12

       unvax vaxed
autism   25     64
no aut  362   1427

        M     F
smoke   14    11
no smok 17    19


color of helmet  B W Y
injured/not
 231 112  8
 491 377 31

dog right/wrong rows, malaria/not cols
 123 131
 52   14

Rows: handedness of parent (father/mother)    Cols: handedness of offspring (left/right) 
rt/rt
rt/lft
lft/rt
lft/lft
  5360    50928
   767     2736
   741     3667
    94      289

NFL overtime coin tosses.  Rows:cointoss winner won/lost game.  Cols: before/after rule change
252 59
208 52

home games  Rows: hometeam win/lose. Cols: 4 sports
127 53 50 57
 71 47 43 42

tornados 3 months, 4 years
48 33 3 0
12 10 9 18
113 62 50 43
relationship between month and year?

wikipedia
rows: white-, blue-, no-collar
cols: 4 neighborhoods
90 60 104 95
30 50 51 20
30 40 45 35