def compute_auc(xs, ys):
    """
  Compute area under curve (AuC).

  Parameters
  ----------
  xs : list
    A list of x values.
  ys : list
    A list of y values corresponding to x.

  Returns
  -------
  float
    Area under curve.
  """
    length = xs[-1] - xs[0]
    area = 0
    for i in range(len(ys) - 1):
        area += (ys[i] + ys[i + 1]) * (xs[i + 1] - xs[i]) / 2 / length
    return area
