I don’t think you need it to be a StochasticFunction because there’s no sampling. The function is entirely deterministic. In fact, the basic pdfs can be computed using the function already available in autograd (exp, sqrt, and similar). Just define a plain Python function:
def normal_pdf(x, mean, std):
    # compute the pdf here using x, mean and std Variables