<?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.2022.121006</article-id><article-id pub-id-type="publisher-id">OJS-115334</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>
 
 
  Probability Models with Discrete and Continuous Parts
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>James</surname><given-names>E. Marengo</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>David</surname><given-names>L. Farnsworth</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Mathematical Sciences, Rochester Institute of Technology, Rochester, New York, USA</addr-line></aff><pub-date pub-type="epub"><day>28</day><month>01</month><year>2022</year></pub-date><volume>12</volume><issue>01</issue><fpage>82</fpage><lpage>97</lpage><history><date date-type="received"><day>30,</day>	<month>November</month>	<year>2021</year></date><date date-type="rev-recd"><day>18,</day>	<month>February</month>	<year>2022</year>	</date><date date-type="accepted"><day>21,</day>	<month>February</month>	<year>2022</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>
 
 
  In mathematical statistics courses, students learn that the quadratic function 
  <inline-formula><inline-graphic xlink:href="dit_6161c8ad-7415-4328-95a3-f9cf46858ee4.png" xlink:type="simple"/></inline-formula> is minimized when 
  x
   is the mean of the random variable 
  X
  , and that the graphs of this function for any two distributions of 
  X
   are simply translates of each other. We focus on the problem of minimizing the function defined by <inline-formula><inline-graphic xlink:href="dit_4d463e38-f7e3-4b44-adb9-e1ef6028f1b9.png" xlink:type="simple"/></inline-formula>
   
  in the context of mixtures of probability distributions of the discrete, absolutely continuous, and singular continuous types. This problem is important, for example, in Bayesian statistics, when one attempts to compute the decision function, which minimizes the expected risk with respect to an absolute error loss function. Although the literature considers this problem, it does so only under restrictive conditions on the distribution of the random variable X, by, for example, assuming that the corresponding cumulative distribution function is discrete or absolutely continuous. By using Riemann-Stieltjes integration, we prove a theorem, which solves this minimization problem under completely general conditions on the distribution of X. We also illustrate our result by presenting examples involving mixtures of distributions of the discrete and absolutely continuous types, and for the Cantor distribution, in which case the cumulative distribution function is singular continuous. Finally, we prove a theorem that evaluates the function y(x) when X has the Cantor distribution.
 
</p></abstract><kwd-group><kwd>Mixed-Type Distribution Function</kwd><kwd> Riemann-Stieltjes Integration</kwd><kwd> Median of a Random Variable</kwd><kwd> Cantor Distribution</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>There are commonly used, continuous probability distributions of one variable, such as the normal distribution and the exponential distribution. Likewise, there are discrete distributions that are well established, such as the binomial distribution and the Poisson distribution. Here, the much less routine situation in which there is a discrete component and a continuous component in a single probability distribution is addressed. These are called mixed-type probability distributions. Often, the components can be entirely separated from each other, but sometimes it might reduce the effectiveness of the probability model to do so.</p><p>An example of a mixed-type distribution is the lifetimes of electronic components. Some components may have zero lifetimes, because they are defective from the onset, giving a discrete probability component at zero ( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 72-73, 121), while a continuous component is used for the remaining lifetimes. Biological lifetimes can have this feature ( [<xref ref-type="bibr" rid="scirp.115334-ref2">2</xref>], p. 34).</p><p>Another example is the elapsed time at a stop sign at an intersection on a street. Some drivers will spend no time at the sign after stopping, because there is no cross traffic, giving the discrete component at elapsed time zero. Other drivers will linger until traffic clears, supplying the continuous component ( [<xref ref-type="bibr" rid="scirp.115334-ref3">3</xref>], p. 63) ( [<xref ref-type="bibr" rid="scirp.115334-ref4">4</xref>], p. 98-99).</p><p>A third example of a mixed-type distribution is lifetimes in an experiment that is terminated at a predetermined time t<sub>d</sub>. The complete lifetimes of those subjects still living or objects that have not yet failed cannot be known. That group produces a discrete component at time t<sub>d</sub> ( [<xref ref-type="bibr" rid="scirp.115334-ref2">2</xref>], p. 52-63) ( [<xref ref-type="bibr" rid="scirp.115334-ref5">5</xref>], p. 97-98).</p><p>On occasion, there might be times during an experiment, or in the course of events, at which interventions can introduce discrete components. For instance, a planned medical procedure, mass vaccination, or military campaign could be such an intervention.</p><p>There are choices for the method for proceeding. One choice is to standardize the continuous portion, so that it has a probability density. This is usually expressed with conditional distributions ( [<xref ref-type="bibr" rid="scirp.115334-ref2">2</xref>], p. 52-63) ( [<xref ref-type="bibr" rid="scirp.115334-ref5">5</xref>], p. 97-98). The discrete portion might be standardized separately or ignored. Another choice, which is to proceed with a mixed-type probability distribution for the whole experiment, is focused on presently.</p><p>For a discrete distribution, sums are used to compute probabilities and expected values. For continuous distributions that have a probability density function, Riemann integration is used. All discrete, continuous, and mixed-type distributions, including continuous distributions without a probability density function, which are discussed in Section 3, are covered simultaneously with Riemann-Stieltjes integration ( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 118-126), ( [<xref ref-type="bibr" rid="scirp.115334-ref2">2</xref>], p. 11-14, 34), ( [<xref ref-type="bibr" rid="scirp.115334-ref6">6</xref>], p. 281-284).</p></sec><sec id="s2"><title>2. An Example of a Mixed-Type Distribution</title><p>Consider the following example.</p><p>Example 1 (mixed-type distribution). In a populous state in the USA, it has been determined by using surveys that there are three distinct types of voters for an upcoming ballot initiative. One type of voter definitely opposes the initiative and is believed to be 7/20 of the voters. These individuals are coded x = 0. Another type is definitely in favor of the initiative and is 2/5 of the voters. Those individuals are coded x = 1. The third type is not polarized on the initiative, and their degree of support x is between zero and one. They are the remaining 1/4 of the voters. For these voters, the proportion of the population is modeled with 1 / 5 + ( 1 / 10 ) x . The random variable X is an individual voter’s degree of positive support for the ballot initiative.</p><p>The 1 / 5 + ( 1 / 10 ) x was obtained by first fitting, via a smoothed histogram from the sample’s non-polarized voters, a curve that represents the number of votes as a function of degree of support. The fit was a linear function such that the intercept term is twice the slope coefficient. Then, the values 1/5 and 1/10 were determined from the requirement that the integral of the linear function from x = 0 to x = 1 must equal the remaining fraction, 1/4, of the voters.</p><p>This is a mixed-type distribution with a discrete part for X = 0 and X = 1 and a continuous part for X ∈ ( 0 , 1 ) . For every random variable X, the cumulative distribution function (cdf) is defined on ℝ by F ( x ) = Pr ( X ≤ x ) . A cdf F(x) has a jump discontinuity at x = a when Pr ( X = a ) &gt; 0 . Any discrete cdf has at most a countable number of jump discontinuities ( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 74) ( [<xref ref-type="bibr" rid="scirp.115334-ref7">7</xref>], p. 71). The continuous part of Example 1 is absolutely continuous. A cdf F(x) is defined to be absolutely continuous if there exists a nonnegative probability density function (pdf) f(x) that has ℝ as its domain and F ( x ) = Pr ( X ≤ x ) = ∫ − ∞ x f ( t ) d t , where the integral is a Riemann integral ( [<xref ref-type="bibr" rid="scirp.115334-ref7">7</xref>], p. 127) ( [<xref ref-type="bibr" rid="scirp.115334-ref8">8</xref>], p. 139-140). The derivative of an absolutely continuous cdf is the pdf.</p><p>The cumulative distribution function for Example 1 is</p><p>y = F ( x ) = { 0 x &lt; 0 7 20 + 1 5 x + 1 20 x 2 0 ≤ x &lt; 1 1 1 ≤ x , (1)</p><p>which is displayed in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>Use the fact that any cdf can be decomposed uniquely into a convex sum of a discrete cdf and a continuous cdf giving the Jordan decomposition</p><p>F ( x ) = c 1 F d ( x ) + c 2 F c ( x ) , (2)</p><p>where c<sub>1</sub> ≥ 0, c<sub>2</sub> ≥ 0, c<sub>1</sub> + c<sub>2</sub> = 1, F<sup>d</sup>(x) is a discrete cdf, and F<sup>c</sup>(x) is a continuous cdf ( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 121) ( [<xref ref-type="bibr" rid="scirp.115334-ref5">5</xref>], p. 88-90) ( [<xref ref-type="bibr" rid="scirp.115334-ref8">8</xref>], p. 138). Then,</p><p>F d ( x ) = { 0 x &lt; 0 7 15 0 ≤ x &lt; 1 1 1 ≤ x and F c ( x ) = { 0 x &lt; 0 4 5 x + 1 5 x 2 0 ≤ x &lt; 1 1 1 ≤ x , (3)</p><p>which yield the probability mass function (pmf) and probability density function (pdf)</p><p>f d ( x ) = { 7 15 x = 0 8 15 x = 1 0 otherwise and f c ( x ) = { 4 5 + 2 5 x 0 &lt; x &lt; 1 0 otherwise , (4)</p><p>respectively, and c<sub>1</sub> = 3/4 and c<sub>2</sub> = 1/4. The weight c<sub>1</sub> might be most easily computed from the jumps in the original cdf F(x). Then, Pr(X = 0) + Pr(X = 1) = 7/20 + 2/5 = 3/4, which is the divisor of each of the jumps 7/20 and 2/5 from (1), in order to obtain the discrete parts of (3) and (4) and the multiplier c<sub>1</sub>. For the continuous part, the normalizing divisor, and multiplier as well, is c<sub>2</sub> = 1 – c<sub>1</sub> = 1/4 or c 2 = ∫ 0 1 ( 1 / 5 + ( 1 / 10 ) t ) d t = 1 / 4 . Alternatively, obtain F<sup>c</sup> from</p><p>F c = F − c 1 F d c 2 .</p><p>Use the property that the expectation of the function g(X) is</p><p>E ( g ( X ) ) = c 1 E d ( g ( X ) ) + c 2 E c ( g ( X ) ) .</p><p>where the expectations on the right-hand side are with respect to the similarly superscripted pmf and pdf ( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 121) ( [<xref ref-type="bibr" rid="scirp.115334-ref3">3</xref>], p. 69). The left-hand side would be computed as a Riemann-Stieltjes integral, but, in Example 1, the right-hand side contains a summation and a Riemann integral. Thus, direct consideration of a Riemann-Stieltjes integration is sidestepped in this example. This formulation has the advantage of exhibiting the way that the expected value is a weighted average of the expectations with respect to the discrete and the continuous components. For Y = g(X) = X, the expected value is</p><p>μ = E ( X ) = 3 4 ( ( 0 ) 7 15 + ( 1 ) 8 15 ) + 1 4 ∫ 0 t t ( 4 5 + 2 5 t ) d t = 2 5 + 1 4 ( 4 5 1 2 2 + 2 5 1 3 3 ) = 8 15 .</p></sec><sec id="s3"><title>3. Singular Continuous CDFs</title><p>Any cdf F(x) can be decomposed uniquely into a convex sum of a discrete cdf and a continuous cdf, as in (2). Further, the continuous component can be uniquely decomposed into an absolutely continuous component F<sup>ac</sup>(x) and a singular continuous component F<sup>sc</sup>(x), giving the Lebesque decomposition</p><p>F ( x ) = c 1 F d ( x ) + c 2 F a c ( x ) + c 3 F s c ( x ) ,</p><p>where c<sub>1</sub>, c<sub>2</sub> , c<sub>3</sub> ≥ 0, c<sub>1</sub> + c<sub>2</sub> + c<sub>3</sub> = 1 ( [<xref ref-type="bibr" rid="scirp.115334-ref7">7</xref>], p. 131) ( [<xref ref-type="bibr" rid="scirp.115334-ref8">8</xref>], p. 142-143) ( [<xref ref-type="bibr" rid="scirp.115334-ref9">9</xref>], p. 10-12). A function is singular continuous if it is a continuous function that is not identically zero and whose first derivative exists and equals zero almost everywhere ( [<xref ref-type="bibr" rid="scirp.115334-ref7">7</xref>], p. 131, 146-149) ( [<xref ref-type="bibr" rid="scirp.115334-ref8">8</xref>], p. 141) ( [<xref ref-type="bibr" rid="scirp.115334-ref9">9</xref>], p. 11). The main example is the Cantor distribution, but others, such as Minkowski’s singular continuous distribution, are well-known [<xref ref-type="bibr" rid="scirp.115334-ref10">10</xref>] [<xref ref-type="bibr" rid="scirp.115334-ref11">11</xref>]. The phrase “continuous random variable” refers to a random variable that has a cdf that is everywhere continuous.</p><p>The Cantor set is created by an infinite process. Beginning with the closed interval [0,1], during the n<sup>th</sup> step of the process, remove the 2<sup>n</sup><sup>−1</sup> middle-third open intervals, each of which has length 1/3<sup>n</sup>. After doing that step, there remain 2<sup>n</sup> disjoint, closed intervals. The infinite intersection of the closed sets is the Cantor set. The sum of the lengths of the deleted intervals is one, so the Cantor set has Lebesgue measure zero. The Cantor set is the support of the Cantor distribution, whose cdf is called the devil’s staircase. This cdf fails to be differentiable at every point of the Cantor set, but its derivative is zero on the set’s complement. Thus, probabilities cannot be recovered by integrating the derivative of the cdf. The devil’s staircase has no jumps, and so it is continuous at every real number. It is singular continuous, because it assigns probability one to the Cantor set, which has Lebesgue measure, i.e. length, zero. The devil’s staircase has no discrete component and no absolutely continuous component. The Cantor distribution and the devil’s staircase appear in the probability and statistics literature ( [<xref ref-type="bibr" rid="scirp.115334-ref7">7</xref>], p. 146-149) ( [<xref ref-type="bibr" rid="scirp.115334-ref8">8</xref>], p. 35-36, 141, 146, 593), ( [<xref ref-type="bibr" rid="scirp.115334-ref9">9</xref>], p. 13-15, 129, 174) [<xref ref-type="bibr" rid="scirp.115334-ref12">12</xref>] and the mathematical modeling and real analysis literature ( [<xref ref-type="bibr" rid="scirp.115334-ref6">6</xref>], p. 80-84, 90) [<xref ref-type="bibr" rid="scirp.115334-ref10">10</xref>] [<xref ref-type="bibr" rid="scirp.115334-ref11">11</xref>] ( [<xref ref-type="bibr" rid="scirp.115334-ref13">13</xref>], p. 249). It is the basis of Example 5 in Section 4.4.</p><p>The first seven omitted intervals, where the devil’s staircase has slope zero, and the accompanying values of the cdf are</p><p>F ( x ) = { 1 8 1 27 &lt; x &lt; 2 27 1 4 1 9 &lt; x &lt; 2 9 3 8 7 27 &lt; x &lt; 8 27 1 2 1 3 &lt; x &lt; 2 3 5 8 19 27 &lt; x &lt; 20 27 3 4 7 9 &lt; x &lt; 8 9 7 8 25 27 &lt; x &lt; 26 27</p><p>and are graphed in <xref ref-type="fig" rid="fig2">Figure 2</xref>.</p></sec><sec id="s4"><title>4. Medians</title><p>A median of the random variable X, and therefore of F, is any real number m such that</p><p>Pr ( X ≤ m ) ≥ 1 / 2 and Pr ( X ≥ m ) ≥ 1 / 2 ,</p><p>or, equivalently,</p><p>Pr ( X ≤ m ) ≥ 1 / 2 and Pr ( X &lt; m ) ≤ 1 / 2 . (5)</p><p>For Example 1, the median of X is</p><p>m = 7 − 2 = 0.646 , (6)</p><p>which is obtained from (1) by solving</p><p>7 20 + 1 5 m + 1 20 m 2 = 1 2 .</p><p>The main purpose of this section is to show that, if m is a median of the univariate random variable X and a ∈ ℝ , then E ( | X − a | ) ≥ E ( | X − m | ) , and this inequality is strict if a is not a median of X. To avoid trivialities, assume that these expectations exist as finite real numbers, which is assured by presupposing that E ( | X | ) ∈ ℝ . Mood, Graybill, and Boes ( [<xref ref-type="bibr" rid="scirp.115334-ref3">3</xref>], p. 83), Hogg, McKean, and Craig ( [<xref ref-type="bibr" rid="scirp.115334-ref14">14</xref>], p. 58), and Parzen ( [<xref ref-type="bibr" rid="scirp.115334-ref15">15</xref>], p. 213) consider this inequality for absolutely continuous cdfs. Rohatgi ( [<xref ref-type="bibr" rid="scirp.115334-ref5">5</xref>], p. 170-171) and Dwass ( [<xref ref-type="bibr" rid="scirp.115334-ref16">16</xref>], p. 341-342) consider it separately for discrete and for absolutely continuous cdfs. The advantage of using Riemann-Stieltjes integration is that it covers the inequality for any discrete, continuous, and mixed type cdfs without exception with a single argument, which is presented in Theorem 1.</p><sec id="s4_1"><title>4.1. Preliminaries</title><p>The expectation E ( | X − x | ) is a convex function of x. Indeed, for c , d ∈ ℝ and t ∈ ( 0 , 1 ) , using the triangle inequality and the linearity of expectation,</p><p>E ( | X − ( t c + ( 1 − t ) d ) | ) = E ( | t ( X − c ) + ( 1 − t ) ( X − d ) | ) ≤ E ( | t ( X − c ) | + | ( 1 − t ) ( X − d ) | ) = t E ( | ( X − c ) | ) + ( 1 − t ) E ( | ( X − d ) | ) .</p><p>All convex functions are continuous ( [<xref ref-type="bibr" rid="scirp.115334-ref6">6</xref>], p. 199) ( [<xref ref-type="bibr" rid="scirp.115334-ref17">17</xref>], p. 149-152).</p><p>For c ∈ ℝ , define</p><p>F ( c − ) = lim x → c x &lt; c F ( x ) .</p><p>Because F ( c − ) = Pr ( X &lt; c ) ,</p><p>Pr ( X = c ) = F ( c ) − F ( c − )</p><p>( [<xref ref-type="bibr" rid="scirp.115334-ref14">14</xref>], p. 38). Since F is right continuous ( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 71) ( [<xref ref-type="bibr" rid="scirp.115334-ref7">7</xref>], p. 70-71),</p><p>F ( c + ) = lim x → c x &gt; c F ( x ) = F ( c ) .</p><p>Thus, (5) can be expressed</p><p>F ( m – ) ≤ 1 2 and 1 2 ≤ F ( m ) . (7)</p><p>Assuming that g is a continuous positive function on the interval (c, d) and F ( c ) &lt; F ( d – ) ,</p><p>∫ ( c , d ) g ( x ) d F ( x ) &gt; 0 (8)</p><p>( [<xref ref-type="bibr" rid="scirp.115334-ref1">1</xref>], p. 118-119) ( [<xref ref-type="bibr" rid="scirp.115334-ref6">6</xref>], p. 281-284). For F ( c ) &lt; F ( d – ) ,</p><p>∫ ( c , d ) d F ( x ) = F ( d − ) − F ( c ) .</p></sec><sec id="s4_2"><title>4.2. Lemma 1</title><p>Lemma 1. Let X be a random variable with the cumulative distribution function of F. Suppose that E ( X ) ∈ ℝ . Then, for any a and b ∈ ℝ ,</p><p>E ( | X – a | ) – E ( | X – b | ) = { 2 ∫ ( a , b ) ( x − a ) d F ( x ) + ( b − a ) ( 1 − 2 F ( b − ) )               a &lt; b                                       ( 9 ) 2 ∫ ( b , a ) ( a − x ) d F ( x ) + ( a − b ) ( 2 F ( b ) − 1 )                     b &lt; a                                     ( 10 )</p><p>Proof. Observe that the assumption that E ( X ) ∈ ℝ is equivalent to E(|X|) &lt; ∞. If c ∈ ℝ , then E ( | X − c | ) ≤ E ( | X | ) + | c | &lt; ∞ and</p><p>E ( | X – c | ) = ∫ ( – ∞ , ∞ ) | x – c | d F ( x ) .</p><p>Consider two cases.</p><p>Case 1 (a &lt; b). Expanding gives</p><p>E ( | X − a | ) = ∫ ( − ∞ , a ) ( a − x ) d F ( x ) + ∫ ( a , b ) ( x − a ) d F ( x )   + ∫ { b } ( b − a ) d F ( x ) + ∫ ( b , ∞ ) ( x − a ) d F ( x )</p><p>and</p><p>E ( | X − b | ) = ∫ ( − ∞ , a ) ( b − x ) d F ( x ) + ∫ { a } ( b − a ) d F ( x )   + ∫ ( a , b ) ( b − x ) d F ( x ) + ∫ ( b , ∞ ) ( x − b ) d F ( x ) .</p><p>Substituting gives</p><p>E ( | X − a | ) − E ( | X − b | ) = ∫ ( − ∞ , a ) ( a − b ) d F ( x ) + ∫ ( a , b ) ( 2 x − a − b ) d F ( x ) + ∫ ( b , ∞ ) ( x − a ) d F ( x )       +   ( b − a ) ( F ( b ) − F ( b − ) ) − ( b − a ) ( F ( a ) − F ( a − ) )</p><p>= ( a − b ) F ( a − ) + ∫ ( a , b ) ( 2 ( x − a ) + a − b ) d F ( x ) + ( b − a ) ( 1 − F ( b ) )       +   ( b − a ) ( F ( b ) − F ( b − ) ) − ( b − a ) ( F ( a ) − F ( a − ) ) = ( a − b ) F ( a − ) + 2 ∫ ( a , b ) ( x − a ) d F ( x ) + ( a − b ) ( F ( b − ) − F ( a ) )         +   ( b − a ) ( 1 − F ( b ) ) + ( b − a ) ( F ( b ) − F ( b − ) ) ,</p><p>which yields (9).</p><p>Case 2 (b &lt; a). Interchanging the roles of a and b in (9) gives</p><p>E ( | X − b | ) − E ( | X − a | ) = 2 ∫ ( b , a ) ( x − b ) d F ( x ) + ( a − b ) ( 1 − 2 F ( a − ) ) = 2 ∫ ( b , a ) ( ( x − a ) − ( b − a ) ) d F ( x ) + ( a − b ) ( 1 − 2 F ( a − ) ) = 2 ∫ ( b , a ) ( x − a ) d F ( x ) − 2 ( b − a ) ( F ( a − ) − F ( b ) ) + ( a − b ) ( 1 − 2 F ( a − ) ) = 2 ∫ ( b , a ) ( x − a ) d F ( x ) + ( a − b ) ( 1 − 2 F ( b ) ) .</p><p>Multiplying by –1 yields (10).</p></sec><sec id="s4_3"><title>4.3. Theorem 1</title><p>Theorem 1. Let X be a random variable. Suppose that E ( X ) ∈ ℝ and m ∈ ℝ is a median of X. Then, for any a ∈ ℝ ,</p><p>E ( | X − a | ) ≥ E ( | X − m | ) . (11)</p><p>The inequality is strict if a is not a median of X.</p><p>Proof. From the proof of Lemma 1, E ( | X − a | ) &lt; ∞ . Set b = m in Lemma 1. The integrals in (9) and (10) are nonnegative. Inequality (11) follows, because, using (7), the second terms on the right-hand sides of (9) and (10) are also nonnegative. To show that the inequality (11) is strict when a is not a median of X, consider the two cases in Lemma 1.</p><p>Case 1 (a &lt; m). From (7), either F(m–) &lt; 1/2 or F(m–) = 1/2. If F(m–) &lt; 1/2, then (m – a)(1 – 2F(m–)) &gt; 0, so that the right-hand side of (9) is positive. If F(m–) = 1/2, then (m – a)(1 – 2F(m–)) = 0. Also, F(a) ≤ F(m–) = 1/2. Because a is not a median, F(a) ≠ 1/2 and, thus, F(a) &lt; 1/2, F(a) &lt; F(m–), and the integral in (9) is positive from (8).</p><p>Case 2 (m &lt; a). From (5), either 1/2 &lt; F(m) or 1/2 = F(m). If 1/2 &lt; F(m), then (a – m)(2F(m) – 1) &gt; 0, so that the right-hand side of (10) is positive. If F(m) = 1/2, then (a – m)(2F(m) – 1) = 0. Also, 1/2 = F(m) ≤ F(a–). Because a is not a median, F(a–) ≠ 1/2 and, thus, F(a–) &gt; 1/2, F(m) &lt; F(a–), and the integral in (10) is positive from (8).</p></sec><sec id="s4_4"><title>4.4. Representative Examples</title><p>The following examples display the function y = E ( | X − x | ) and the locations of the medians for various distributions. The graphs illustrate that y = E ( | X − x | ) is a convex and continuous function and that medians occur as single points or as all of the values in an interval.</p><p>Example 1 revisited (mixed-type distribution). For the voter preference example,</p><p>y = E ( | X − x | ) = ( 8 15 − x                                                                       x &lt; 0 1 30 ( x 3 + 6 x 2 − 9 x + 16 )               0 ≤ x &lt; 1 x − 8 15                                                                       1 ≤ x ,</p><p>which is displayed in <xref ref-type="fig" rid="fig3">Figure 3</xref>. The minimum occurs at x = m = 7 − 2 ≈ 0.646 , as computed in (6).</p><p>Example 2 (absolutely continuous cdf). For the exponential random variable with pdf f(x) = e<sup>−x/3</sup>/3 for x &gt; 0 and zero otherwise, <xref ref-type="fig" rid="fig4">Figure 4</xref> displays</p><p>y = E ( | X − x | ) = ∫ 0 ∞ | t − x | 1 3 e − t / 3 d t = { 3 − x                                         x ≤ 0 x − 3 + 3 e − x / 3               x &gt; 0 .</p><p>The expected value is μ = 3. The minimum is at the unique median m = 3ln2 ≈ 2.08.</p><p>Example 3 (discrete cdf and a single median). For the binomial distribution with n = 3 and p = 0.7, the expected value is μ = np = 2.1. <xref ref-type="fig" rid="fig5">Figure 5</xref> displays</p><p>y = E ( | X − x | ) = { − x + 2.1                                               x &lt; 0 − 0.946 x + 2.1                         0 ≤ x &lt; 1 − 0.568 x + 1.722                     1 ≤ x &lt; 2 0.314 x − 0.042                     2 ≤ x &lt; 3 x − 2.1                                                   3 ≤ x .</p><p>The minimum is at the unique median m = 2.</p><p>Example 4 (discrete cdf and an interval of medians). For the binomial distribution with n = 5 and p = 0.5, the expected value is μ = np = 2.5. <xref ref-type="fig" rid="fig6">Figure 6</xref> displays</p><p>y = E ( | X − x | ) = { − x + 2.5                                                     x &lt; 0 − 0.9375 x + 2.5                           0 ≤ x &lt; 1 − 0.625 x + 2.1875                   1 ≤ x &lt; 2 0.9375                                                       2 ≤ x &lt; 3 0.625 x − 0.9375                         3 ≤ x &lt; 4 0.9375 x − 2.1875                   4 ≤ x &lt; 5 x − 2.5                                                         5 ≤ x .</p><p>Note that every number in the interval [2, 3] is a median.</p><p>Example 5 (singular continuous distribution). The Cantor distribution has mean 0.5 and median any m ∈ ( 1 / 3 , 2 / 3 ) . Because the derivation of an expression for y = E ( | X − x | ) is more complicated than the previous examples, details are presented.</p><p>During the n<sup>th</sup> step of the process that leads to the Cantor set, remove the 2<sup>n</sup><sup>−1</sup> middle-third open intervals, each of which has length 1/3<sup>n</sup>. After doing such a step, there remain 2<sup>n</sup> disjoint, closed intervals, which are denoted by</p><p>I k ( n ) = [ a k ( n ) , b k ( n ) ]</p><p>for k = 1 , 2 , ⋯ , 2 n , where</p><p>a 1 ( n ) &lt; a 2 ( n ) &lt; ⋯ &lt; a 2 n ( n ) .</p><p>The following lemma provides a recursive formula that is used for computing ∫ I k ( n ) x d F ( x ) .</p><p>Lemma 2. Define</p><p>c 1 ( 0 ) = ∫ 0 1 x d F ( x ) and c k ( n ) = ∫ a k ( n ) b k ( n ) x d F ( x )</p><p>for n ≥ 1. Then</p><p>c 1 ( 0 ) = 1 2</p><p>and</p><p>c k ( n ) = { 1 6 c k ( n − 1 )                           k = 1 , 2 , ⋯ , 2 n − 1 1 2 n − c 2 n + 1 − k ( n )             k = 2 n − 1 + 1 , 2 n − 1 + 2 , ⋯ , 2 n .</p><p>Proof. Because</p><p>F ( x 3 ) = F ( x ) 2 and F ( 1 − x ) = 1 − F ( x )</p><p>for x ∈ [ 0 , 1 ] ( [<xref ref-type="bibr" rid="scirp.115334-ref9">9</xref>], p. 15),</p><p>d F ( x 3 ) = d F ( x ) 2 and d F ( 1 − x ) = − d F ( x ) .</p><p>Hence,</p><p>1 − c 1 ( 0 ) = 1 − ∫ 0 1 x d F ( x ) = 1 − ∫ 0 1 ( 1 − t ) d F ( t ) = ∫ 0 1 t d F ( t ) = c 1 ( 0 ) .</p><p>Thus,</p><p>c 1 ( 0 ) = 1 2 .</p><p>Consider n ≥ 1. For 1 ≤ k ≤ 2<sup>n</sup><sup>−1</sup>,</p><p>a k ( n ) = 1 3 a k ( n − 1 ) ,   b k ( n ) = 1 3 b k ( n − 1 ) ,</p><p>and</p><p>c k ( n ) = ∫ a k ( n ) b k ( n ) x d F ( x ) = ∫ a k ( n − 1 ) b k ( n − 1 ) t 3 d F ( t 3 ) = ∫ a k ( n − 1 ) b k ( n − 1 ) t 3 d F ( t ) 2 = 1 6 c k ( n − 1 ) .</p><p>Let 2<sup>n</sup><sup>−1</sup> + 1 ≤ k ≤ 2<sup>n</sup>. From</p><p>a k ( n ) = 1 − b 2 n + 1 − k ( n ) ,     b k ( n ) = 1 − a 2 n + 1 − k ( n ) , and F ( b 2 n + 1 − k ( n ) ) − F ( a 2 n + 1 − k ( n ) ) = 1 2 n ,</p><p>it follows that</p><p>c k ( n ) = ∫ a k ( n ) b k ( n ) x d F ( x ) = ∫ a 2 n + 1 − k ( n ) b 2 n + 1 − k ( n ) ( 1 − t ) d F ( t ) = 1 2 n − c 2 n + 1 − k ( n ) .</p><p>The numerical values of the definite integrals c k ( n ) for n = 1, 2, and 3 are in <xref ref-type="table" rid="table1">Table 1</xref>.</p><p>Theorem 2. Let J 1 ( n ) , J 2 ( n ) , ⋯ , J 2 n − 1 ( n ) be the disjoint open intervals that are removed during the n<sup>th</sup> step of the construction of the Cantor set, where the midpoints of these intervals are strictly increasing. For x ∈ J k ( n ) ,</p><p>y = y ( x ) = E ( | X − x | ) = 2 k − 1 − 2 n − 1 2 n − 1 x − ∑ j = 1 2 k − 1 c j ( n ) + ∑ j = 2 k 2 n c j ( n ) . (12)</p><p>Proof. For x ∈ J k ( n ) , it follows from Lemma 2 that</p><p>y = y ( x ) = E ( | X − x | ) = ∫ − ∞ ∞ | t − x | d F ( t ) = ∑ j = 1 2 n ∫ I j ( n ) | t − x | d F ( t ) = ∑ j = 1 2 k − 1 ∫ I j ( n ) ( t − x ) d F ( t ) + ∑ j = 2 k 2 n ∫ I j ( n ) ( t − x ) d F ( t ) = ∑ j = 1 2 k − 1 ( x 2 n − c j ( n ) ) + ∑ j = 2 k 2 n ( c j ( n ) − x 2 n ) = 2 k − 1 − 2 n − 1 2 n − 1 x − ∑ j = 1 2 k − 1 c j ( n ) + ∑ j = 2 k 2 n c j ( n ) .</p><p>Since the complement of the Cantor set in [0, 1] is dense in that interval, and since the value of a continuous function at any number in [0, 1] is determined by its values on a dense subset ( [<xref ref-type="bibr" rid="scirp.115334-ref6">6</xref>], p. 121), Theorem 2 determines the value of E ( | X − x | ) for x ∈ [ 0 , 1 ] . Additionally, y(x) = 1/2 – x for every x &lt; 0 and y(x) = x – 1/2 for x &gt; 0.</p><p>For k = 1 , 2 , ⋯ , 2 n − 1 , the graph of y on J k ( n ) is a line segment with slope</p><p>2 k − 1 − 2 n − 1 2 n − 1 .</p><p>Equation (13) and <xref ref-type="fig" rid="fig7">Figure 7</xref> display the values and give the graph of y = y(x) for the Cantor distribution for J k ( n ) with n = 1, 2, and 3.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Numerical values of c k ( n ) = ∫ a k ( n ) b k ( n ) x d F ( x ) for n = 1, 2, 3 and k = 1 , 2 , ⋯ , 2 n .<sup> </sup></title></caption><table><tbody><thead><tr><th align="center" valign="middle" >n</th><th align="center" valign="middle" >k</th><th align="center" valign="middle" ></th></tr></thead><tr><td align="center" valign="middle"  rowspan="2"  >1</td><td align="center" valign="middle" >1</td><td align="center" valign="middle" >c 1 ( 1 ) = 1 6 c 1 ( 0 ) = 1 6 1 2 = 1 12</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >c 2 ( 1 ) = 1 2 − c 1 ( 1 ) = 1 2 − 1 12 = 5 12</td></tr><tr><td align="center" valign="middle"  rowspan="4"  >2</td><td align="center" valign="middle" >1</td><td align="center" valign="middle" >c 1 ( 2 ) = 1 6 c 1 ( 1 ) = 1 6 1 12 = 1 72</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >c 2 ( 2 ) = 1 6 c 2 ( 1 ) = 1 6 5 12 = 5 72</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >c 3 ( 2 ) = 1 2 2 − c 2 ( 2 ) = 1 4 − 5 72 = 13 72</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >c 4 ( 2 ) = 1 2 2 − c 1 ( 2 ) = 1 4 − 1 72 = 17 72</td></tr><tr><td align="center" valign="middle"  rowspan="8"  >3</td><td align="center" valign="middle" >1</td><td align="center" valign="middle" >c 1 ( 3 ) = 1 6 c 1 ( 2 ) = 1 6 1 72 = 1 432</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >c 2 ( 3 ) = 1 6 c 2 ( 2 ) = 1 6 5 72 = 5 432</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >c 3 ( 3 ) = 1 6 c 3 ( 2 ) = 1 6 13 72 = 13 432</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >c 4 ( 3 ) = 1 6 c 4 ( 2 ) = 1 6 17 12 = 17 432</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >c 5 ( 3 ) = 1 2 3 − c 4 ( 3 ) = 1 8 − 17 432 = 37 432</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >c 6 ( 3 ) = 1 2 3 − c 3 ( 3 ) = 1 8 − 13 432 = 41 432</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >c 7 ( 3 ) = 1 2 3 − c 2 ( 3 ) = 1 8 − 5 432 = 49 432</td></tr><tr><td align="center" valign="middle" >8</td><td align="center" valign="middle" >c 8 ( 3 ) = 1 2 3 − c 1 ( 3 ) = 1 8 − 1 432 = 53 432</td></tr></tbody></table></table-wrap><p>y = E ( | X − x | ) = { 1 / 2 − x x &lt; 0 107 / 216 − ( 3 / 4 ) x 1 / 27 &lt; x &lt; 2 / 27 17 / 36 − ( 1 / 2 ) x 1 / 9 &lt; x &lt; 2 / 9 89 / 216 − ( 1 / 4 ) x 7 / 27 &lt; x &lt; 8 / 27 1 / 3 1 / 3 &lt; x &lt; 2 / 3 ( 1 / 4 ) x + 35 / 216 19 / 27 &lt; x &lt; 20 / 27 ( 1 / 2 ) x − 1 / 36 7 / 9 &lt; x &lt; 8 / 9 ( 3 / 4 ) x − 55 / 216 25 / 27 &lt; x &lt; 26 / 27 x − 1 / 2 1 &lt; x (13)</p><p>For a sample calculation, using (12) and <xref ref-type="table" rid="table1">Table 1</xref>, take n = 2 and k = 1 in (13),</p><p>y = 2 ( 1 ) − 1 − 2 2 − 1 2 2 − 1 x − 1 72 + 5 72 + 13 72 + 17 72 = 17 36 − 1 2 x .</p></sec></sec><sec id="s5"><title>5. Concluding Comments</title><p>The necessary and sufficient condition that x minimizes y ( x ) = E ( | X − x | ) for medians of the distribution of X has been established under completely general conditions on the distribution of X and illustrated for various pure and mixed cumulative distribution functions, including the devil’s staircase of the Cantor distribution. We have evaluated the function y ( x ) = E ( | X − x | ) when X has the Cantor distribution, and we have also demonstrated the way in which the nature of this function depends heavily on the distribution of X in other cases. By way of contrast, the minimum value of the quadratic function E ( ( X − x ) 2 ) is Var(X), and the minimizing value of x is E(X). Its graph depends only on this mean and variance, and any two distributions for X yield graphs that are translates of each other.</p></sec><sec id="s6"><title>Acknowledgements</title><p>The authors want to thank the anonymous referees for many insightful comments.</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Marengo, J.E. and Farnsworth, D.L. (2022) Probability Models with Discrete and Continuous Parts. Open Journal of Statistics, 12, 82-97. https://doi.org/10.4236/ojs.2022.121006</p></sec></body><back><ref-list><title>References</title><ref id="scirp.115334-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Lindgren, B.W. (1976) Statistical Theory. 3rd Edition, Macmillan, New York.</mixed-citation></ref><ref id="scirp.115334-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Lawless, J.F. (2003) Statistical Models and Methods for Lifetime Data. 2nd Edition, Wiley, Hoboken. https://doi.org/10.1002/9781118033005</mixed-citation></ref><ref id="scirp.115334-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Mood, A.M., Graybill, F.A. and Boes, D.C. (1974) Introduction to the Theory of Statistics. 3rd Edition, McGraw-Hill, New York.</mixed-citation></ref><ref id="scirp.115334-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Bain, L.J. and Engelhardt, M. (1987) Introduction to Probability and Mathematical Statistics. Duxbury Press, Boston.</mixed-citation></ref><ref id="scirp.115334-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Rohatgi, V.K. (2003) Statistical Inference. Dover, Mineola.</mixed-citation></ref><ref id="scirp.115334-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Stromberg, K.R. (1981) An Introduction to Classical Analysis. Wadsworth, Belmont.</mixed-citation></ref><ref id="scirp.115334-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Dudewicz, E.J. and Mishra, S.N. (1998) Modern Mathematical Statistics. Wiley, New York.</mixed-citation></ref><ref id="scirp.115334-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Feller, W. (1971) An Introduction to Probability Theory and Its Applications. Volume 2, 2nd Edition, Wiley, New York.</mixed-citation></ref><ref id="scirp.115334-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Chung, K.L. (2001) A Course in Probability Theory. 3rd Edition, Academic Press, San Diego.</mixed-citation></ref><ref id="scirp.115334-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Salem, R. (1943) On Some Singular Monotonic Functions Which Are Strictly Increasing. Transactions of the American Mathematical Society, 53, 427-439.  
https://doi.org/10.1090/S0002-9947-1943-0007929-6</mixed-citation></ref><ref id="scirp.115334-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Bernstein, D. (2013) Algorithmic Definitions of Singular Functions. Department of Mathematics, Davidson College, Davidson.</mixed-citation></ref><ref id="scirp.115334-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Lad, F.R. and Taylor, W.F.C. (1992) The Moments of the Cantor Distribution. Statistics and Probability Letters, 13, 307-310.  
https://doi.org/10.1016/0167-7152(92)90039-8</mixed-citation></ref><ref id="scirp.115334-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Apostol, T.M. (1957) Mathematical Analysis. Addison-Wesley, Reading.</mixed-citation></ref><ref id="scirp.115334-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Hogg, R.V., McKean, J.W. and Craig, A.T. (2005) Introduction to Mathematical Statistics. 6th Edition, Pearson Prentice Hall, Upper Saddle River.</mixed-citation></ref><ref id="scirp.115334-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Parzen, E. (1960) Modern Probability Theory and Its Applications. Wiley, New York. https://doi.org/10.1063/1.3056709</mixed-citation></ref><ref id="scirp.115334-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Dwass, M. (1970) Probability and Statistics. W.A. Benjamin, New York.</mixed-citation></ref><ref id="scirp.115334-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Bauschke, H.H. and Combettes, P.L. (2017) Convex Analysis and Monotone Operator Theory in Hilbert Spaces. 2nd Edition, Springer, Cham.  
https://doi.org/10.1007/978-3-319-48311-5</mixed-citation></ref></ref-list></back></article>