<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJS</journal-id><journal-title-group><journal-title>Open Journal of Statistics</journal-title></journal-title-group><issn pub-type="epub">2161-718X</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojs.2013.36050</article-id><article-id pub-id-type="publisher-id">OJS-41538</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Distribution of the Median in Samples from the Laplace Distribution
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>ohn</surname><given-names>Lawrence</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>US Food and Drug Administration, Silver Spring, USA</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>John.Lawrence@fda.hhs.gov</email></corresp></author-notes><pub-date pub-type="epub"><day>27</day><month>12</month><year>2013</year></pub-date><volume>03</volume><issue>06</issue><fpage>422</fpage><lpage>426</lpage><history><date date-type="received"><day>October</day>	<month>1,</month>	<year>2013</year></date><date date-type="rev-recd"><day>November</day>	<month>1,</month>	<year>2013</year>	</date><date date-type="accepted"><day>November</day>	<month>8,</month>	<year>2013</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   The Laplace distribution is one of the oldest defined and studied distributions. In the one-parameter model (location parameter only), the sample median is the maximum likelihood estimator and is asymptotically efficient. Approximations for the variance of the sample median for small to moderate sample sizes have been studied, but no exact formula has been published. In this article, we provide an exact formula for the probability density function of the median and an exact formula for the variance of the median.
    <!--?xml:namespace prefix = o /-->
     
 
</p></abstract><kwd-group><kwd>Quantile; Generalized Hypergeometric Function</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Laplace is credited as first discovering the Laplace distribution in 1774 [<xref ref-type="bibr" rid="scirp.41538-ref1">1</xref>]. The discovery of the normal distribution, which holds a central place in many applications of statistics, predates that of the Laplace distribution. It was discovered in 1738 by de Moivre according to [<xref ref-type="bibr" rid="scirp.41538-ref2">2</xref>]. Gauss and Laplace were contemporaries who both made significant discoveries about the normal distribution. Keynes [<xref ref-type="bibr" rid="scirp.41538-ref3">3</xref>] wrote “The popularity of the normal law, with the arithmetic mean and the method of least squares as its corollaries, has been very largely due to its overwhelming advantages, in comparison with all other laws of error, for the purposes of mathematical development and manipulation... So powerful a hold indeed did the normal law obtain on the minds of statisticians, that until quite recent times only a few pioneers have seriously considered the possibility of preferring in certain circumstances other means to the arithmetic and other laws of error to the normal. Laplace’s earlier memoir fell, therefore, out of remembrance.” Over the past 100 years, the Laplace distribution has enjoyed the resurgence in many applications such as economics, engineering and finance [<xref ref-type="bibr" rid="scirp.41538-ref4">4</xref>]. The reader is also referred to this book for a history of the Laplace distribution, its important properties and generalizations.</p><p>Let <img src="6-1240248\a9491cfe-b928-45e1-8e1a-f6ef6d973655.jpg" /> denote the probability density function of a one-parameter Laplace distribution with variance 1. It is well known that from a sample of odd size 2n + 1 where n is any positive integer, the sample median, <img src="6-1240248\736d078f-35cb-46fe-9ec7-33736b270145.jpg" />, is the maximum likelihood estimate of μ. Moreover, although the derivative does not exist at μ, the Cramer-Rao lower bound for the mean squared error of estimation of μ exists and is<img src="6-1240248\af132194-48aa-4f94-b25d-84c7dba352f2.jpg" />.</p><p>Also, we have <img src="6-1240248\a67928c6-9475-4621-9a45-a24f593de1df.jpg" /> which implies the median is an efficient estimator in the asymptotic sense. However, <img src="6-1240248\34759d19-8227-4732-99df-bb4a23ed7993.jpg" />is not a sufficient statistic and there are more efficient estimators for small samples, for example the average of the middle three observations can be more efficient. Finally, the sample mean is also asymptotically normal and asymptotically the ratio of the variance of the mean to the median is 2.</p><p>Previously, [<xref ref-type="bibr" rid="scirp.41538-ref5">5</xref>] investigated approximations to the variance of <img src="6-1240248\604920f5-fec5-4086-b0ab-f05e8d4cac8e.jpg" /> for small sample sizes. They confirmed that although the variance converges to the Cramer-Rao lower bound, it does so at a slow rate. Consequently, even if the normal approximation was valid for small sample sizes, hypothesis tests and confidence intervals would not have the correct size if the asymptotic variance was used. The former provided the bounds for the ratio of the variance to the Cramer-Rao lower bound as follows:</p><p><img src="6-1240248\e3c508c3-ebff-4bb1-9cd1-a2e3316d6163.jpg" /></p><p>where<img src="6-1240248\5b7f29de-a039-497b-ac6e-afc688831e74.jpg" />. For example, if</p><p><img src="6-1240248\d6eb7bf6-b3bb-4368-9724-732986df3e56.jpg" />and the sample size were 999, the upper bound would be approximately 1.513. This suffices for their purpose, which was mainly to show that this ratio was less than 2, which in turn implies the median is a more efficient estimator than the sample mean. However, it seems like an inadequate upper bound since we know the ratio converges to 1. [<xref ref-type="bibr" rid="scirp.41538-ref6">6</xref>] attempted to tabulate the approximate variance for<img src="6-1240248\c4606344-16bf-4ce0-a061-ab26c73e6117.jpg" />, and 8. We found that in general his approximations were close to the true values (to two digits), but were not correct in two out of these five cases (see Section 3).</p><p>This paper makes two contributions. First, we find an explicit formula for the distribution of the median of a random sample from the Laplace distribution. Next, we find an exact formula for the variance of the sample median. These contributions are important because the median is the essential estimate of location for the Laplace distribution in the same way that the mean is the essential estimate of location for the normal distribution.</p></sec><sec id="s2"><title>2. Exact Distribution of Sample Median</title><p>Without loss of generality, we will consider the case where μ = 0. The probability the median is less than x is the probability that at least n + 1 values in the sample are less than x. The distribution of the median is symmetric about 0, so it suffices to consider values of x &lt; 0. Then, we have</p><p><img src="6-1240248\505cbc8f-f583-47b0-8a30-203cd44c9c5a.jpg" /></p><p>In the Appendix, we show by mathematical induction that the density for x &lt; 0 is</p><p><img src="6-1240248\5dc085f1-1684-4f16-bcb4-1dd6f021520a.jpg" /></p><p>where the constants are</p><p><img src="6-1240248\bd82446f-1fe6-432d-a956-34d49202c314.jpg" />.</p><p>Hence, <img src="6-1240248\51f5409e-6224-4024-9ce4-d68284a967f4.jpg" />has a Beta distribution truncated on the interval<img src="6-1240248\9b6ea32e-f7ab-4ac6-9c09-92ac724dc874.jpg" />.</p><p>The characteristic function is</p><p><img src="6-1240248\4b29cbdf-a78d-4df8-b5e2-6d11139216f3.jpg" /></p><p>and the moment generating function is</p><p><img src="6-1240248\b0ec6db8-760f-4e58-b1de-37910810f728.jpg" />.</p><p>In both cases, the formulas involve the incomplete beta function</p><p><img src="6-1240248\e0162c0d-7078-47c0-8fe7-450b28c206fe.jpg" />.</p></sec><sec id="s3"><title>3. Variance of the Median</title><p>The variance can be calculated exactly using the Binomial expansion as</p><p><img src="6-1240248\102adc01-9ad6-4594-a8c4-88a54de9977d.jpg" /></p><p>This variance also evaluates to</p><p><img src="6-1240248\52233b95-d94b-45d1-ae11-bac26853ace3.jpg" /></p><p>where <img src="6-1240248\d870aa21-4cbb-4097-a3d0-3c443cc6aea4.jpg" /> is the generalized Hypergeometric function.</p><p>For<img src="6-1240248\63e16805-26d8-40fa-a1b8-084f69a87e6a.jpg" />, and 8, the ratios of the variance of the median to the variance of the mean (rounded to 6 digits) are 0.958333, 0.877951, 0.824767, 0.787808, and 0.708761. In comparison to the approximations listed in the bottom row of Siddiqui, these are close in all cases. In the case of n = 3, (corresponding to a sample size of N = 7 in his notation) he gives the approximate value of 0.81, but it should be 0.82 rounded to 2 digits. Also, in the case of n = 4, he gives the approximation 0.78, while it should be 0.79.</p><p>As a further example, consider the case n = 499, corresponding to a sample size of 999. This would be a rather large dataset by most standards and one might think the asymptotic variance would be accurate. However, the ratio of the actual variance to the asymptotic value is 1.05122, or about 5% larger than the CramerRao lower bound. Although not very close to 1, it is substantially closer than the upper bound of 1.513 provided by the Chu and Hotelling approximation (see Section 1).</p><p>For very large values of n, it will still not be possible to calculate the variance exactly using the formula at the beginning of this Section. One way to estimate the ratio of the true variance compared to the asymptotic variance is</p><p><img src="6-1240248\96ba92e4-4184-4eca-8e38-92eaa1fed049.jpg" /></p><p>where Z is standard normal with distribution function <img src="6-1240248\e8809f36-b142-4288-b116-dc3fca57eb38.jpg" /> and density function<img src="6-1240248\3d21d256-311a-49a9-8241-c5447258bf10.jpg" />. The numerator can be estimated by Monte Carlo simulation or the integral in the second to the last line can be estimated by numerical integration such as the Riemann sum</p><p><img src="6-1240248\5b37c53b-2227-4078-a282-338c5499f860.jpg" /></p><p>where <img src="6-1240248\a41859cf-7732-4e1f-8d7b-e2c599ba277c.jpg" /> denotes the integrand and N is a large integer.</p><p>It is also possible to sample values having the density <img src="6-1240248\5487d4b3-a81c-4452-97c0-0085cc062506.jpg" /> by using acceptance-rejection sampling. To do this, one needs a candidate distribution with density</p><p><img src="6-1240248\b61d2f99-3a0c-4408-990e-9ed2908c397f.jpg" />such that <img src="6-1240248\d24595ae-230a-4771-b66d-40d6634184c5.jpg" /> is bounded by a fixed upper bound M. In addition, it is best if M is close to 1 since the proportion of candidate values that will be accepted is<img src="6-1240248\b71ab216-5700-41c2-9cf6-cbdb80a2589c.jpg" />. The Laplace distribution with variance 2 is a very good candidate distribution to sample from. Note that the ratio</p><p><img src="6-1240248\52754886-7e95-4fb1-8757-1f8039bb2259.jpg" /></p><p>attains its maximum at</p><p><img src="6-1240248\5cd1f891-5669-4f3a-b16b-141177b1e516.jpg" /></p><p>and that maximum is</p><p><img src="6-1240248\89cc8be9-cbd1-41cc-a8d1-f983520431c4.jpg" />.</p></sec><sec id="s4"><title>4. Conjecture about the Rate of Convergence</title><p>Start with values of n that were the closest integers to<img src="6-1240248\2b53a751-6dbd-4e64-b59e-135b9a90e471.jpg" />.</p><p>For each of those values of n, calculate the ratio given in the previous Section viathe Riemann sum described in Section 4 with <img src="6-1240248\3205ad3f-4db4-450a-870c-ba9d71153ecd.jpg" /> million. In <xref ref-type="fig" rid="fig1">Figure 1</xref>, we show the values of <img src="6-1240248\3aea00d3-9974-4dea-8119-24a21337be6e.jpg" /> on the x-axis and log(ratio -1) on the y-axis where the ratio means the ratio of the actual variance to the asymptotic variance computed by numerical integration. We noticed that the points fell very close to the straight line defined by</p><p><img src="6-1240248\723f7c78-4fa8-45c0-89db-9f1654f0f084.jpg" />.</p><p>Hence, at least in this range of n, the ratio is approximately<img src="6-1240248\ba37eeff-1e2e-492b-9a3f-d024c14c2836.jpg" />. Note, the largest n here is approximately 500 million, which corresponds to a sample size of about 1 billion.</p><p>This leads to a conjecture about the rate of convergence of the variance. In addition, from the formula near the beginning of Section 3, this is also a conjecture about the asymptotic behavior of the Hypergeometric function for large n. Specifically,</p><p><img src="6-1240248\9c5e3f2e-0f4a-421f-b86c-a88a8c07f2fc.jpg" /></p><p>using Stirling’s approximation<img src="6-1240248\e1cee523-ff04-4807-ab18-3abd94c0b73e.jpg" />.</p></sec><sec id="s5"><title>5. Summary and Conclusion</title><p>We found an exact formula for the density and the variance of the one-parameter Laplace distribution. The moment generating function and characteristic function are also derived. We also describe several methods for approximating moments or other features of the distribution by an algorithm to sample directly from the distribution. This article only deals with the case of odd sample sizes. The median is the (n + 1)<sup>th</sup> order statistic and the same</p><p>approach could be used to find the distribution of any other order statistic. For even sample sizes, the median is the average of the two middle observations, which makes it slightly more complicated to analyze because the joint distribution of two order statistics is needed. However, a similar approach used here may also handle the even sample size case. Furthermore, this approach could also be useful in analyzing the variance of other estimators such as the average of the middle three or middle five and observations. And it could be helpful in finding the optimal estimator for small sample sizes. This exact variance may be useful in constructing approximate confidence intervals or hypothesis tests. But, caution should still be used in using the normal approximation. Exact tests and confidence intervals can be constructed from the exact distribution. Lastly, in the two-parameter Laplace model, not considered here, a further adjustment may be needed in such procedures due to the estimation of the scale parameter.</p></sec><sec id="s6"><title>REFERENCES</title></sec><sec id="s7"><title>Appendix</title><p>First, note that for any positive integers m and i with i &lt; m,</p><p><img src="6-1240248\a1853134-f92b-462d-951c-4883e9123d67.jpg" /></p><p>when n = 1,</p><p><img src="6-1240248\739c345c-15d9-43f8-9324-ee287a250563.jpg" /></p><p>and</p><p><img src="6-1240248\a8952c85-c2e1-4139-be04-1ba034ad779c.jpg" /></p><p>We suppose that the formula for the density is true for some positive integer n.</p><p>Consider the random sample of size <img src="6-1240248\cb9217f6-659d-4704-8bc2-599efbaa8d32.jpg" /> and recalculate the distribution function for the median of this random sample by conditioning on the number of values among the first 2n + 1 elements in the sample that are less than x. If the median of the entire sample is less than x, then there are three possible cases for such numbers: exactly n, exactly n + 1, or at least n + 2. We have</p><p><img src="6-1240248\f52c24b2-dc00-4310-b235-5c372b6d6455.jpg" /></p><p>The derivative is</p><p><img src="6-1240248\f6da0203-ae3c-44a2-8b43-886ea0e9143f.jpg" /></p><p>and by the induction hypothesis, this equals</p><p><img src="6-1240248\d832b864-3fc9-4685-9b86-bfb7d8ae63d2.jpg" /></p><p>Finally, notice that</p><p><img src="6-1240248\b399aeee-0fe6-422a-9357-fdc6f519dce7.jpg" /></p></sec><sec id="s8"><title>NOTES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.41538-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">P. S. Laplace, “Mémoire sur la Probabilité des Causes par les évènemens,” Mémoires de Mathematique et de Physique, Presentés à l’Académie Royale des Sciences, Par Divers Savans &amp; Lus Dans ses Assemblées, Tome Sixième, 1774, pp. 621-656.</mixed-citation></ref><ref id="scirp.41538-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">N. L. Johnson, S. Kotz and N. Balakrishnan, “Continuous Univariate Distributions,” Vol. 1, Wiley, Hoboken, 1994.</mixed-citation></ref><ref id="scirp.41538-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">J. M. Keynes, “The Principal Averages and the Laws of Error Which Lead to Them,” Journal of the Royal Statistical Society, Vol. 74, No. 3, 1911, pp. 322-331.http://dx.doi.org/10.2307/2340444</mixed-citation></ref><ref id="scirp.41538-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">S. Kotz,, T. J. Kozubowski and K. Podgorski, “The Laplace Distribution and Generalizations: A Revisit with Applications to Communications, Economics, Engineering, and Finance (No. 183),” Springer, Berlin, 2001.http://dx.doi.org/10.1007/978-1-4612-0173-1</mixed-citation></ref><ref id="scirp.41538-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">J. T. Chu and &amp; H. Hotelling, “The Moments of the Sample Median,” The Annals of Mathematical Statistics, Vol. 26, No. 4, 1955, pp. 593-606. http://dx.doi.org/10.1214/aoms/1177728419</mixed-citation></ref><ref id="scirp.41538-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">M. M. Siddiqui, “Approximations to the Moments of the Sample Median,” The Annals of Mathematical Statistics, Vol. 33, No. 1, 1962, pp. 157-168. http://dx.doi.org/10.1214/aoms/1177704720</mixed-citation></ref></ref-list></back></article>