def calculate_rate_sum(lengths_l,counts_l):
    """
    Calculates the rate sum for a sample 
    
    lengths_l -- list, list of reference lengths
    counts_l -- list, list of counts to reference
    """    
    rate_sum = 0
    for i in range(len(lengths_l)): 
        rate = counts_l[i]/lengths_l[i]
        rate_sum += rate
    return(rate_sum)