import math


def gaussian(sigma, mu, x):
    """
    Given a mean mu and standard deviation sigma, determins the gaussian probability of the
    value x.
    """
    sigma_sq = math.pow(sigma, 2)
    den = math.sqrt(2 * math.pi * sigma_sq)
    num = math.exp(-math.pow(x - mu, 2) / 2 / sigma_sq)
    return num / den