def mean(numberList):
    """
     Objective: estimate mean of an input variable
     e.g., 
     >>>x=(1,2,3)
     >>>mean(x)
     2.0
     >>>x=[1,1,2]
     >>>mean(x)
     1.3333333333333333
    """
    if len(numberList) == 0:
        return float('nan')
    floatNums = [float(x) for x in numberList]
    return sum(floatNums) / len(numberList)