<?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">AJCM</journal-id><journal-title-group><journal-title>American Journal of Computational Mathematics</journal-title></journal-title-group><issn pub-type="epub">2161-1203</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ajcm.2022.121003</article-id><article-id pub-id-type="publisher-id">AJCM-115712</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>
 
 
  Transitioning from Discrete to Continuous Distribution &lt;i&gt;Mathematica&lt;/i&gt; vs. Excel —An Example
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Haiduke</surname><given-names>Sarafian</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>The Pennsylvania State University, University College, York, USA</addr-line></aff><pub-date pub-type="epub"><day>18</day><month>02</month><year>2022</year></pub-date><volume>12</volume><issue>01</issue><fpage>25</fpage><lpage>32</lpage><history><date date-type="received"><day>18,</day>	<month>January</month>	<year>2022</year></date><date date-type="rev-recd"><day>5,</day>	<month>March</month>	<year>2022</year>	</date><date date-type="accepted"><day>8,</day>	<month>March</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>
 
 
  Frequencies of the repeated integers of the first 
  n digits of e.g. 
  π utilizing commercial software are listed. The discrete distribution is utilized to evaluate its statistical moments. The distribution is fitted with a polynomial generating a continuous replica of the former. Its statistical moments are evaluated and compared to the former. The procedure clarifies the mechanism transiting from discrete to a continuous domain. Applying &lt;i&gt;
  Mathematica&lt;/i&gt; the fitted polynomial is replaced with an interpolated function with controlled smoothing factor refining the quality of the fit and its corresponding moments. Knowledge learned assists in the understanding of the standard procedure calculating moments of e.g. Maxwell-Boltzmann continuous distribution in kinetic Theory of gases.
 
</p></abstract><kwd-group><kwd>Digits of &lt;i&gt;π&lt;/i&gt;</kwd><kwd> Discrete Distribution</kwd><kwd> Continuous Distribution</kwd><kwd> Moments of Distribution</kwd><kwd> Excel</kwd><kwd> &lt;i&gt;Mathematica&lt;/i&gt;</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Tabulating the statistical information such as distribution moments for either the discrete and/or continuous ensembles is the quantities of paramount interest when working with either abstract mathematical or collected data in natural sciences. It is somewhat trivial to evaluate the moments for a discrete data set, it is not obvious how to systematically transit from the discrete to the continuous situation.</p><p>One of the objectives of this report is that by way of example first to show how the moments are evaluated for a set of the discrete mathematical ensemble, and then by applying the same conceptual method to extend the procedure for the continuous case.</p><p>To achieve this goal, we select one of the ~32,000 known constants in science e.g., the value of π. The shown procedure identically may be applied to any of the chosen constants. For an instant e, the Euler constant γ, the golden ratio φ, etc. Here in this report, we have chosen the π. We form an ensemble comprised of n digits of π; naturally, this is a set of discrete integers. We then show how the statistical moments of the set are evaluated. Taking advantage of the commercially available software, e.g., Excel [<xref ref-type="bibr" rid="scirp.115712-ref1">1</xref>] we tally the data conducive to the needed distribution function. Having the distribution function on hand we evaluate the moments, such as the first, second, third, etc. Excel is an excellent numeric-based program with certain limitations. For instance, because it is a single-precision compiler it displays the digits of π up to 16 significant figures. As such it limits the number of elements of π_List. To circle this, one may use a commercially available scientific software e.g., Mathematica [<xref ref-type="bibr" rid="scirp.115712-ref2">2</xref>] . This allows extending the number of the digits of π_List literally to “infinite.” To transit from discrete to continuous and hence to evaluate the moments we form the extended π_List say with 50 elements. This list then is imported to Excel and is used as a basis to form the continuous distribution function by fitting it using a polynomial. Here again, Excel is limited to a maximum 6<sup>th</sup> order polynomial. For the sake of consistency when we utilize the Mathematica, we apply the same polynomial power; this results in the identical result. However, Mathematica has a useful option smoothening the quality of the fit. Utilizing this option, we perfect the fit. We include tables embodying the values of the calculated moments for all the scenarios.</p><p>This report is comprised of four sections. In addition to Section 1, introduction that outlines the motivation and goals, Section 2 is procedure; a description that embodies Mathematica codes, charts, tables as well as selected Excel’s charts. The interested reader may easily duplicate the steps and modify the codes adjusting to the need, for information c.f. [<xref ref-type="bibr" rid="scirp.115712-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.115712-ref4">4</xref>] . Section 3 is the conclusions and comments on what we learned.</p></sec><sec id="s2"><title>2. Procedure</title><p>For the sake of efficiency, we begin with Mathematica, as such first we form the π_List, a list of digits of π. Nmax defines the number of desired significant digits, e.g., 50. Shown program is crafted such that with this input parameter one single keystroke runs the entire program with the needed output.</p><p>Nmax=50;</p><p>pi=First[RealDigits[N[π,Nmax]]];</p><p>Next, we tabulate the tallied digits, (see <xref ref-type="table" rid="table1">Table 1</xref>)</p><p>table=TableForm[Tally[pi]/.{p_,q_}→{q,p},TableHeadings→{Automatic,{&quot;Frquency&quot;,&quot;digit/Event&quot;}}]</p><p>By defining a few auxiliary components, we display the Frequency vs. the Range. This is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p>
<table-wrap id="table1" >
<label><xref ref-type="table" rid="table1">Table 1</xref></label>
<caption><title> Frequencies of the first 50 digits of Pi vs. the digits</title></caption>
</table-wrap>
 </sec>
</body>
<back><ref-list><title>References</title><ref id="scirp.115712-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">MicroSoft&amp;#174, Excel. http://www.microsoft.com</mixed-citation></ref><ref id="scirp.115712-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Mathematica&amp;#174 V13.0. http://Wolfram.com</mixed-citation></ref><ref id="scirp.115712-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Wolfram, S. (2003) Mathematica Book. 5th Edition, Cambridge University Press, New York, NY.</mixed-citation></ref><ref id="scirp.115712-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Sarafian, H. (2019) Mathematica Graphics Examples. 2nd Edition, Scientific Research Publishing, Wuhan.</mixed-citation></ref><ref id="scirp.115712-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Longair, M.S. (1984) Theoretical Concepts in Physics. Cambridge University Press, New York, NY.</mixed-citation></ref><ref id="scirp.115712-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Lin, M. (2018) Techniques of Discrete Function Transfers into Continuous Function in Practice. Engineering, 10, 680-687. https://doi.org/10.4236/eng.2018.1010049</mixed-citation></ref></ref-list></back></article>