How do I get the value of the Laplace function? Python
Hello!
Please tell me how to get the value of the Laplace function (the function of the standard normal distribution) in python?
The laplace.pdf()
function from scipy
gives the wrong value. The values do not match the table values of the Laplace integral function:
3 answers
Found: the values of the mentioned table are given by the function scipy.stats.norm.cdf(x) - 0.5
. But in my opinion, it has nothing to do with Laplace, because it is an integral of the usual Gaussian distribution.
Google suggests that math. erf (x)
scipy.stats.norm.cdf(x)
Gives the integral of the distribution density. In fact, it is the Laplace function. This is the integral from minus infinity to x. It is also called cdf.
The tables use the normalized Laplace function, which (as already noted) is equal to the usual function minus 0.5. It represents the integral from 0 to x.
Here is the conclusion from the book Written by D. T. Lecture notes on Probability theory, mathematical statistics and random variables processes:
Hence, it is clear why you need to subtract 0.5. After all, the integral of the entire probability density is equal to one. And it is symmetrical. And it is the negative part that is equal to 0.5.