﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.99.7030.1435"?>
<worksheet xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings ppi="96">
    <identity>
      <id>ebce2c70-ff7d-4e67-9b68-60eb52a553f1</id>
      <revision>8</revision>
    </identity>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <trailingZeros>false</trailingZeros>
      <significantDigitsMode>false</significantDigitsMode>
      <roundingMode>0</roundingMode>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="false" viewMode="2" printGrid="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="9" orientation="Portrait" width="827" height="1169" />
      <margins left="39" right="39" top="49" bottom="49" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="0.99.7030.1435" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Math Region" version="0.99.7030.1435" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="SpecialFunctions" version="1.12.7030.1435" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="TextRegion" version="1.11.7030.1435" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
      <assembly name="X-Y Plot Region (JXCharts)" version="0.2.6961.40414" guid="c12231ec-4873-43c1-a7d0-a167ebd17066" />
    </dependencies>
  </settings>
  <regions type="content">
    <region id="0" top="9" color="#000000" bgColor="#ffffff">
      <area collapsed="true" />
      <region id="1" left="0" top="27" width="549" height="714" color="#000000" bgColor="#ffffff" fontSize="10">
        <math>
          <input>
            <e type="operand">intervals</e>
            <e type="operand">values</e>
            <e type="function" args="2">hist</e>
            <e type="operand">binBounds</e>
            <e type="operand">intervals</e>
            <e type="function" args="1">sort</e>
            <e type="operator" args="2">:</e>
            <e type="operand">binMin</e>
            <e type="operand">binBounds</e>
            <e type="operand">1</e>
            <e type="function" args="2">el</e>
            <e type="operator" args="2">:</e>
            <e type="operand">binCount</e>
            <e type="operand">intervals</e>
            <e type="function" args="1">length</e>
            <e type="operand">1</e>
            <e type="operator" args="2">-</e>
            <e type="operand">1</e>
            <e type="function" args="2">matrix</e>
            <e type="operator" args="2">:</e>
            <e type="operand">sortedValues</e>
            <e type="operand">values</e>
            <e type="function" args="1">sort</e>
            <e type="operator" args="2">:</e>
            <e type="operand">lastIndex</e>
            <e type="operand">1</e>
            <e type="operator" args="2">:</e>
            <e type="operand">j</e>
            <e type="operand">2</e>
            <e type="operand">intervals</e>
            <e type="function" args="1">length</e>
            <e type="function" args="2">range</e>
            <e type="operand">binMax</e>
            <e type="operand">binBounds</e>
            <e type="operand">j</e>
            <e type="function" args="2">el</e>
            <e type="operator" args="2">:</e>
            <e type="operand">k</e>
            <e type="operand">lastIndex</e>
            <e type="operand">values</e>
            <e type="function" args="1">length</e>
            <e type="function" args="2">range</e>
            <e type="operand">v</e>
            <e type="operand">sortedValues</e>
            <e type="operand">k</e>
            <e type="function" args="2">el</e>
            <e type="operator" args="2">:</e>
            <e type="operand">lastIndex</e>
            <e type="operand">k</e>
            <e type="operator" args="2">:</e>
            <e type="operand">v</e>
            <e type="operand">binMin</e>
            <e type="operator" args="2">&lt;</e>
            <e type="operand" style="string">value below the range</e>
            <e type="operand">continue</e>
            <e type="operand">2</e>
            <e type="operand">1</e>
            <e type="function" args="4">line</e>
            <e type="operand">v</e>
            <e type="operand">binMax</e>
            <e type="operator" args="2">≥</e>
            <e type="operand" style="string">value belong to next bins</e>
            <e type="operand">break</e>
            <e type="operand">2</e>
            <e type="operand">1</e>
            <e type="function" args="4">line</e>
            <e type="operand" style="string">found a value for this bin</e>
            <e type="operand">binCount</e>
            <e type="operand">j</e>
            <e type="operand">1</e>
            <e type="operator" args="2">-</e>
            <e type="function" args="2">el</e>
            <e type="operand">binCount</e>
            <e type="operand">j</e>
            <e type="operand">1</e>
            <e type="operator" args="2">-</e>
            <e type="function" args="2">el</e>
            <e type="operand">1</e>
            <e type="operator" args="2">+</e>
            <e type="operator" args="2">:</e>
            <e type="operand">continue</e>
            <e type="operand">3</e>
            <e type="operand">1</e>
            <e type="function" args="5">line</e>
            <e type="function" args="3">if</e>
            <e type="function" args="3">if</e>
            <e type="operand">3</e>
            <e type="operand">1</e>
            <e type="function" args="5">line</e>
            <e type="function" args="3">for</e>
            <e type="operand">binMin</e>
            <e type="operand">binMax</e>
            <e type="operator" args="2">:</e>
            <e type="operand">3</e>
            <e type="operand">1</e>
            <e type="function" args="5">line</e>
            <e type="function" args="3">for</e>
            <e type="operand">hist</e>
            <e type="operand">binCount</e>
            <e type="function" args="1">length</e>
            <e type="operand">1</e>
            <e type="function" args="2">matrix</e>
            <e type="operator" args="2">:</e>
            <e type="operand">j</e>
            <e type="operand">1</e>
            <e type="operand">binCount</e>
            <e type="function" args="1">length</e>
            <e type="function" args="2">range</e>
            <e type="operand">hist</e>
            <e type="operand">j</e>
            <e type="function" args="2">el</e>
            <e type="operand" style="string">rect</e>
            <e type="operand">binBounds</e>
            <e type="operand">j</e>
            <e type="function" args="2">el</e>
            <e type="operand">0</e>
            <e type="operand">binBounds</e>
            <e type="operand">j</e>
            <e type="operand">1</e>
            <e type="operator" args="2">+</e>
            <e type="function" args="2">el</e>
            <e type="operand">binBounds</e>
            <e type="operand">j</e>
            <e type="function" args="2">el</e>
            <e type="operator" args="2">-</e>
            <e type="operand">binCount</e>
            <e type="operand">j</e>
            <e type="function" args="2">el</e>
            <e type="operand">4</e>
            <e type="operand">1</e>
            <e type="function" args="6">mat</e>
            <e type="operand" style="string">#ff009900</e>
            <e type="operand" style="string">solid</e>
            <e type="operand">1</e>
            <e type="operand" style="string">#6600ff00</e>
            <e type="operand">6</e>
            <e type="operand">1</e>
            <e type="function" args="8">mat</e>
            <e type="operator" args="2">:</e>
            <e type="operand">1</e>
            <e type="operand">1</e>
            <e type="function" args="3">line</e>
            <e type="function" args="3">for</e>
            <e type="operand">hist</e>
            <e type="operand">9</e>
            <e type="operand">1</e>
            <e type="function" args="11">line</e>
            <e type="operator" args="2">:</e>
          </input>
        </math>
      </region>
      <region id="2" top="738" color="#000000" bgColor="#ffffff">
        <area terminator="true" />
      </region>
    </region>
    <region id="3" left="0" top="801" width="446" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>TODO: Limits for Random are -2147483648 to 2147483646</p>
      </text>
    </region>
    <region id="4" left="0" top="828" width="355" height="104" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">N</e>
          <e type="operand">min</e>
          <e type="operand">max</e>
          <e type="function" args="3">runif_f</e>
          <e type="operand">mult</e>
          <e type="operand">100000</e>
          <e type="operator" args="2">:</e>
          <e type="operand">min</e>
          <e type="operand">min</e>
          <e type="operand">mult</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">:</e>
          <e type="operand">max</e>
          <e type="operand">max</e>
          <e type="operand">mult</e>
          <e type="operator" args="2">*</e>
          <e type="operator" args="2">:</e>
          <e type="operand">N</e>
          <e type="operand">min</e>
          <e type="operand">max</e>
          <e type="function" args="3">Random.N</e>
          <e type="operand">mult</e>
          <e type="operator" args="2">/</e>
          <e type="operand">4</e>
          <e type="operand">1</e>
          <e type="function" args="6">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="5" left="0" top="972" width="451" height="73" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">N</e>
          <e type="operand">mean</e>
          <e type="operand">stdev</e>
          <e type="function" args="3">rnorm_f</e>
          <e type="operand">T</e>
          <e type="operand">N</e>
          <e type="operand">0</e>
          <e type="operand">1</e>
          <e type="function" args="3">runif_f</e>
          <e type="operator" args="2">:</e>
          <e type="operand">TT</e>
          <e type="operand">T</e>
          <e type="operand">mean</e>
          <e type="operand">stdev</e>
          <e type="function" args="3">ICDF.Normal</e>
          <e type="operator" args="2">:</e>
          <e type="operand">TT</e>
          <e type="operand">1</e>
          <e type="operand">N</e>
          <e type="operand">2</e>
          <e type="operand">2</e>
          <e type="function" args="5">submatrix</e>
          <e type="operand">3</e>
          <e type="operand">1</e>
          <e type="function" args="5">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="6" left="0" top="1080" width="62" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">N</e>
          <e type="operand">300</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="7" left="18" top="1107" width="169" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">H1</e>
          <e type="operand">N</e>
          <e type="operand">0</e>
          <e type="operand">1</e>
          <e type="function" args="3">runif_f</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="8" left="423" top="1107" width="185" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">H2</e>
          <e type="operand">N</e>
          <e type="operand">0</e>
          <e type="operand">0.1</e>
          <e type="function" args="3">rnorm_f</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="9" left="18" top="1143" width="290" height="183" color="#000000" bgColor="#ffffff" fontSize="10">
      <xyplot width="280" height="175" points="100">
        <propertiessource index="1" sourcetype="PropertyGrid" />
        <grid gridcolor="LightGray" gridpattern="Dash" gridthickness="1" isxgrid="true" isygrid="true" />
        <xaxes xmin="-1" xmax="2" xtick="1" decimalplaces="3" numberformat="General" />
        <yaxes ymin="-1" ymax="200" ytick="10" decimalplaces="3" numberformat="General" />
        <y2axes isy2axis="false" y2min="-1" y2max="1" y2tick="0.5" decimalplaces="3" numberformat="General" />
        <title2d title="" titlefont="Arial, 10pt" titlefontcolor="Black" />
        <xylabel labelfont="Arial, 10pt" labelfontcolor="Black" tickfont="Arial, 8pt" tickfontcolor="Black" xlabel="x" ylabel="y" y2label="y2" />
        <legend isbordervisible="true" islegendvisible="false" legendbackcolor="White" legendbordercolor="Black" legendfont="Arial, 8pt" legendposition="NorthEast" textcolor="Black" />
        <traces>
          <trace seriesname="" isy2data="false" isvisible="true" plotmethod="Shapes" lineantialias="false" linecolor="Blue" linethickness="1" linepattern="Solid" symbolantialias="false" symbolsize="8" symboltype="None" symbolborderthickness="1" symbolbordercolor="Black" symbolfillcolor="White" />
        </traces>
        <input>
          <e type="operand">1</e>
          <e type="operator" args="1">-</e>
          <e type="operand">1</e>
          <e type="operand">0.9</e>
          <e type="operator" args="1">-</e>
          <e type="function" args="3">range</e>
          <e type="operand">H1</e>
          <e type="function" args="2">hist</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">mat</e>
        </input>
      </xyplot>
    </region>
    <region id="10" left="351" top="1143" width="290" height="183" color="#000000" bgColor="#ffffff" fontSize="10">
      <xyplot width="280" height="175" points="100">
        <propertiessource index="1" sourcetype="PropertyGrid" />
        <grid gridcolor="LightGray" gridpattern="Dash" gridthickness="1" isxgrid="true" isygrid="true" />
        <xaxes xmin="-1" xmax="2" xtick="1" decimalplaces="3" numberformat="General" />
        <yaxes ymin="-1" ymax="200" ytick="10" decimalplaces="3" numberformat="General" />
        <y2axes isy2axis="false" y2min="-1" y2max="1" y2tick="0.5" decimalplaces="3" numberformat="General" />
        <title2d title="" titlefont="Arial, 10pt" titlefontcolor="Black" />
        <xylabel labelfont="Arial, 10pt" labelfontcolor="Black" tickfont="Arial, 8pt" tickfontcolor="Black" xlabel="x" ylabel="y" y2label="y2" />
        <legend isbordervisible="true" islegendvisible="false" legendbackcolor="White" legendbordercolor="Black" legendfont="Arial, 8pt" legendposition="NorthEast" textcolor="Black" />
        <traces>
          <trace seriesname="" isy2data="false" isvisible="true" plotmethod="Shapes" lineantialias="false" linecolor="Blue" linethickness="1" linepattern="Solid" symbolantialias="false" symbolsize="8" symboltype="None" symbolborderthickness="1" symbolbordercolor="Black" symbolfillcolor="White" />
        </traces>
        <input>
          <e type="operand">1</e>
          <e type="operator" args="1">-</e>
          <e type="operand">1</e>
          <e type="operand">0.9</e>
          <e type="operator" args="1">-</e>
          <e type="function" args="3">range</e>
          <e type="operand">H2</e>
          <e type="function" args="2">hist</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">mat</e>
        </input>
      </xyplot>
    </region>
  </regions>
</worksheet>