def transform_table(table):
  """
  Transforms a contingency table into a point on a two-dimensional
  plane, in which the distance to the origin shows the suitability
  of a contingency table for separating cases and controls.
  """

  # Yes, this ordering is correct. Please refer to our paper for
  # more details.
  a, b, d, c = table

  n1 = a+b
  n0 = c+d

  return (a-b) / n1, (c-d) / n0