Technically, functions are not implemented, methods are. What you linked are some generic fallback methods for dealing with some general cases (and the first one doesn’t look like a function definition at all, maybe a bug?).
You can also use
@edit pdf(Normal(), 0.3)
to take you to the source code (if your editor is set up properly).
In this case it takes you to a macro defining functions using primitives from StatsFuns, which I agree is rather opaque.
How can we calculate PDF at each point (randomly generated) of a vector? I am trying to do this using the snippet below, but it is giving me PDF values > 1 which cannot be true for Normal distribution with combination of parameter
x = rand(Normal(3, 0.05), 10^3)
y = pdf.(Normal(3, 0.05), x)
There must be something wrong I am doing, please help me to get this.
Oh, sorry, my bad, the property of density function is that (1) it must be greater than zero, (2) integrating it under the support (a.k.a total area under the curve) must be 0
Thanks a lot for correcting me. But what about evaluating density over the vector? Am I doing it correctly?