Calculate the probability density function (PDF) value of a normal (Gaussian) distribution at a given point x, with specified mean and standard deviation.
import math
def normal_pdf(x, mean=0, std=1):
coefficient = 1 / (std * math.sqrt(2 * math.pi))
exponent = -0.5 * ((x - mean) / std) ** 2
pdf = coefficient * math.exp(exponent)
return round(pdf, 4)