def sensitivity_f (df, dec, options, col):
  """ Compute one-way F-test to estimate decision sensitivity """
  if len(options) < 2:
    return 0

  x_mean = df[col].mean()

  groups = []
  for opt in options:
      groups.append(df.loc[df[dec] == opt][['uid', col]])

  # ms between
  ms_b = 0
  for g in groups:
      ms_b += len(g) * (g[col].mean() - x_mean)**2
  ms_b /= len(groups) - 1

  # ms within
  ms_w = 0
  for g in groups:
      g_mean = g[col].mean()
      ms_w += sum((g[col] - g_mean)**2)
  ms_w /= len(df) - len(groups)

  return ms_b / ms_w