{ Analytica Model Laplacian_distributi, encoding="UTF-8" } SoftwareVersion 5.2.9 LinkModule Laplacian_distributi Title: Laplacian distribution library Description: In probability theory and statistics, the Laplace distribution is a continuous probability distribution named after Pierre-Simon Laplace. It is also sometimes called the double exponential distribution, because it can be thought of as two exponential distributions (with an additional location parameter) spliced together back-to-back, although the term is also sometimes used to refer to the Gumbel distribution. The difference between two independent identically distributed exponential random variables is governed by a Laplace distribution, as is a Brownian motion evaluated at an exponentially distributed random time. Increments of Laplace motion or a variance gamma process evaluated over the time scale also have a Laplace distribution.~ ~ Credit: The above description is quoted from wikipedia's entry on the Laplacian distribution. Author: Dale Rice~ Lumina Decision Systems Date: Mon, Jan 6, 2020 12:29 PM NodeSize: 56,32 WindState: 2,559,325,720,350 FontStyle: Arial,15 FileInfo: 0,LinkModule Laplacian_distributi,2,2,0,0,Laplacian distribution library.ana Function Laplacian(mean,scale ; ~ over : optional named;~ singleSampleMethod : optional hidden scalar~ ) Title: Laplacian Description: The Laplacian distribution. Definition: Local u := Uniform(0,1,over: ...over, singleSampleMethod:singleSampleMethod);~ CumLaplacianInv( u, mean, scale ) NodeLocation: 96,48,1 NodeSize: 48,24 WindState: 2,401,166,720,350 Function CumLaplacian(x,mean,scale) Title: CumLaplacian Description: The cumulative density function for the Laplacian distribution. Definition: if x>=mean then 0.5 + CumExponential( x-mean, 1/scale )/2~ else 0.5 - CumExponential( mean-x, 1/ scale ) / 2 NodeLocation: 232,48,1 NodeSize: 64,24 WindState: 2,586,320,720,350 Function CumLaplacianInv(p,mean,scale) Title: CumLaplacianInv Description: The inverse cumulative density function (aka quantile function) for the Laplacian distribution. Definition: Local tmp := CumExponentialInv( 2*abs(p-0.5), 1/scale ) ;~ if p>=0.5 then mean + tmp else mean - tmp NodeLocation: 400,48,1 NodeSize: 80,24 WindState: 2,586,320,720,350 Function DensLaplacian(x,mean,scale) Title: DensLaplacian Description: The density function for the Laplacian distribution. Definition: 0.5 * DensExponential( abs(x-mean), 1/scale ) NodeLocation: 568,48,1 NodeSize: 80,24 WindState: 2,586,320,720,350 Close Laplacian_distributi