def ci_report(ci):
    """return text of a report for confidence intervals"""
    maxlen = max([len(i) for i in ci])
    buff = []
    add = buff.append
    convp = lambda x: ("%.2f" % (x[0]*100))+'%'
    conv = lambda x: "%.5f" % x[1]
    title_shown = False
    for name, row in list(ci.items()):
        if not title_shown:
            add("".join([''.rjust(maxlen)]+[i.rjust(10)   for i in map(convp, row)]))
            title_shown = True
        add("".join([name.rjust(maxlen)]+[i.rjust(10) for i in map(conv,  row)]))
    return '\n'.join(buff)