import math


def calc_gaussian(val, mean, std):
    """
    This function determines the gaussian probability of a given value based on mean and standard deviation.
    :param val:
    :param mean:
    :param std:
    :return: numeric probability
    """
    variance = float(std) ** 2
    pi = 3.1415926
    denom = (2 * pi * variance) ** .5
    num = math.exp(-(float(val) - float(mean)) ** 2 / (2 * variance))
    num_prob = num / denom
    return num_prob