def norm_histogram(hist):
    """
    takes a histogram of counts and creates a histogram of probabilities



    :param hist: list
    :return: list
    """


    j = 0;
    hist_sum = 0;

    hist_new = [];

    while j < len(hist):
        hist_sum =  hist_sum + hist[j];
        j += 1;

    for i in hist:
        p = i / hist_sum
        hist_new.append(p);

    return(hist_new)
    
    pass