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:

laplace cdf plot

Author: jfs, 2016-07-07

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.

 2
Author: andreymal, 2016-07-07 19:00:44

Google suggests that math. erf (x)

 1
Author: Xander, 2016-07-07 19:13:30
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. enter a description of the image here

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. enter a description of the image here

Here is the conclusion from the book Written by D. T. Lecture notes on Probability theory, mathematical statistics and random variables processes: enter a description of the image here

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.

 0
Author: Александр Рахмаев, 2020-02-26 14:52:02