import math


def phi(x):
    """Cumulative distribution function for the standard normal distribution
    Taken from python math module documentation"""
    return (1.0 + math.erf(x / math.sqrt(2.0))) / 2.0