def make_stat(opt_fp, opt_tp, max_fp, len_df):
    """
    Called by loanpy.sanity.postprocess2.
    Calculates  statistics from optimum, max nr of guesses and length \
    of input data frame.

    :param opt_fp: The optimal false positive rate as a fraction of the \
    maximal false positive rate, i.e. last (=highest) element of \
    list passed to param <guesslist> in loanpy.sanity.eval_all.
    :type opt_fp: float

    :param opt_tp: The optimal true positive rate as a fraction of the \
    total number of input words for predictions, i.e. length of data frame.
    :type opt_tp: float

    :param max_fp: The maximal false positive rate is the \
    highest number of possible guesses, i.e. the last element of the list \
    passed to param <guesslist> in loanpy.sanity.eval_all.
    :type max_fp: int | float

    :param len_df: The total number of input words for predictions.
    :type len_df: int

    :returns: The optimal setting for param <howmany> in \
    loanpy.adrc.Adrc.adapt or loanpy.adrc.Adrc.reconstruct.
    :rtype: tuple of int, str, str

    :Example:

    >>> from loanpy.sanity import make_stat
    >>> make_stat(opt_fp=0.099, opt_tp=0.6, max_fp=1000, len_df=10)
    (100, "6/10", "60%")
    """
    # howmany = 1 more than fp (opt_fp is a % of max_guess)
    opt_howmany = round(opt_fp*max_fp) + 1
    # how many did it find out of all, e.g. 10/100
    opt_tp_str = str(round(opt_tp*len_df)) + "/" + str(len_df)
    # how many percent is that, e.g. 10/100 would be 10%
    opt_tpr = str(round(opt_tp*100)) + "%"

    return opt_howmany, opt_tp_str, opt_tpr