calculate a probability from a two- way frequency table