def predictRecallMedian(prior, tnow, percentile=0.5):
    """Median (or percentile) of the immediate recall probability.

  Same arguments as `ebisu.predictRecall`, see that docstring for details.

  An extra keyword argument, `percentile`, is a float between 0 and 1, and
  specifies the percentile rather than 50% (median).
  """
    from scipy.special import betaincinv
    alpha, beta, t = prior
    dt = tnow / t
    return betaincinv(alpha, beta, percentile) ** dt
