import math


def stackoverflow_normpdf(x, mean, sd):

    """
    Another alternative from: https://stackoverflow.com/a/12413491
    This uses the formula found here: http://en.wikipedia.org/wiki/Normal_distribution#Probability_density_function
    """
    var = float(sd)**2
    denom = (2*math.pi*var)**.5
    num = math.exp(-(float(x)-float(mean))**2/(2*var))
    return num/denom