Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50742 - sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions
From: pbristow_at_[hidden]
Date: 2009-01-23 06:11:51


Author: pbristow
Date: 2009-01-23 06:11:51 EST (Fri, 23 Jan 2009)
New Revision: 50742
URL: http://svn.boost.org/trac/boost/changeset/50742

Log:
Several changes to use greek mu and sigma in table. TODO removed.
Text files modified:
   sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/laplace.qbk | 67 +++++++++++++++++++--------------------
   1 files changed, 33 insertions(+), 34 deletions(-)

Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/laplace.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/laplace.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/distributions/laplace.qbk 2009-01-23 06:11:51 EST (Fri, 23 Jan 2009)
@@ -25,32 +25,29 @@
 
    }} // namespaces
 
-The laplace distribution is the distribution that is the difference between
-two independent identically distributed exponential distributed variables.
+Laplace distribution is the distribution of differences between two independent variates
+with identical exponential distributions (Abramowitz and Stegun 1972, p. 930).
 It is also called the double exponential distribution.
 
-TODO - this need complete revision - it has been subjected to a dirty find and replace
-so is plain wrong. Also need pictures.
+[/ Wikipedia definition is The difference between two independent identically distributed
+exponential random variables is governed by a Laplace distribution.]
 
-and added to math.qbk to be used.
-
-
-For location parameter [mu][space] and scale parameters [sigma][space] it is defined by the
+For location parameter [mu][space] and scale parameter [sigma][space] it is defined by the
 probability density function:
 
 [equation laplace_pdf]
 
 The location and scale parameters are equivalent to the mean and
-standard deviation.
+standard deviation of the normal or Gaussian distribution.
 
 The following graph illustrates the effect of the location
-parameter on the PDF, note that the range of the random
+parameter [mu][space] on the PDF. Note that the range of the random
 variable remains \[-[infin],+[infin]\] irrespective of the value of the
 location parameter:
 
 [graph laplace_pdf_mu]
 
-The next graph illustrates the effect of the scale parameter on the PDF:
+The next graph illustrates the effect of the scale parameter [sigma][space] on the PDF:
 
 [graph laplace_pdf_sigma]
 
@@ -86,44 +83,44 @@
 [h4 Accuracy]
 
 The laplace distribution is implemented in terms of the
-standard library log and exp functions and as such should have very low error rates.
+standard library log and exp functions and as such should have very small errors.
 
 [h4 Implementation]
 
-In the following table /m/ is the location parameter of the distribution,
-/s/ is it's scale parameter, /x/ is the random variate, /p/ is the probability
-and /q = 1-p/.
+In the following table [mu] is the location parameter of the distribution,
+[sigma] is its scale parameter, /x/ is the random variate, /p/ is the probability
+and its complement /q = 1-p/.
 
 [table
 [[Function][Implementation Notes]]
-[[pdf][Using the relation: pdf = e[super -abs(x-m) \/ s] \/ (2 * s) ]]
+[[pdf][Using the relation: pdf = e[super -abs(x-[mu]) \/ [sigma]] \/ (2 * [sigma]) ]]
 [[cdf][Using the relations:
 
-x < m : p = e[super (x-m)/s ] \/ s
+x < [mu] : p = e[super (x-[mu])/[sigma] ] \/ [sigma]
 
-x >= m : p = 1 - e[super (m-x)/s ] \/ s
+x >= [mu] : p = 1 - e[super ([mu]-x)/[sigma] ] \/ [sigma]
 ]]
-[[cdf complement][Using the relation:
+[[cdf complement][Using the relation:
 
--x < m : q = e[super (-x-m)/s ] \/ s
+-x < [mu] : q = e[super (-x-[mu])/[sigma] ] \/ [sigma]
 
--x >= m : q = 1 - e[super (m+x)/s ] \/ s
+-x >= [mu] : q = 1 - e[super ([mu]+x)/[sigma] ] \/ [sigma]
 ]]
-[[quantile][Using the relations:
+[[quantile][Using the relations:
 
-p < 0.5 : x = m + s * log(2*p)
+p < 0.5 : x = [mu] + [sigma] * log(2*p)
 
-p >= 0.5 : x = m - s * log(2-2*p)
+p >= 0.5 : x = [mu] - [sigma] * log(2-2*p)
 ]]
-[[quantile from the complement][Using the relation:
+[[quantile from the complement][Using the relation:
 
-q > 0.5: x = m + s*log(2-2*q)
+q > 0.5: x = [mu] + [sigma]*log(2-2*q)
 
-q <=0.5: x = m - s*log( 2*q )
+q <=0.5: x = [mu] - [sigma]*log( 2*q )
 ]]
-[[mean][m]]
-[[variance][2 * s[super 2] ]]
-[[mode][m]]
+[[mean][[mu]]]
+[[variance][2 * [sigma][super 2] ]]
+[[mode][[mu]]]
 [[skewness][0]]
 [[kurtosis][6]]
 [[kurtosis excess][3]]
@@ -131,14 +128,16 @@
 
 [h4 References]
 
-[*http://mathworld.wolfram.com/LaplaceDistribution.html Weisstein, Eric W. "Laplace Distribution."] From MathWorld--A Wolfram Web Resource.
-[*http://en.wikipedia.org/wiki/Laplace_distribution Laplace Distribution]
-Abramowitz and Stegun 1972, p. 930.
+* [@http://mathworld.wolfram.com/LaplaceDistribution.html Weisstein, Eric W. "Laplace Distribution."] From MathWorld--A Wolfram Web Resource.
+
+* [@http://en.wikipedia.org/wiki/Laplace_distribution Laplace Distribution]
+
+* M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions, 1972, p. 930.
 
 [endsect][/section:laplace_dist laplace]
 
 [/
- Copyright 2008 John Maddock, Paul A. Bristow and M.A. (Thijs) van den Berg.
+ Copyright 2008, 2009 John Maddock, Paul A. Bristow and M.A. (Thijs) van den Berg.
   Distributed under the Boost Software License, Version 1.0.
   (See accompanying file LICENSE_1_0.txt or copy at
   http://www.boost.org/LICENSE_1_0.txt).


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk