1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Runs tests</title> 5<link rel="stylesheet" href="../math.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../index.html" title="Math Toolkit 2.12.0"> 8<link rel="up" href="../statistics.html" title="Chapter 6. Statistics"> 9<link rel="prev" href="t_test.html" title="t-tests"> 10<link rel="next" href="ljung_box.html" title="The Ljung-Box Test"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="t_test.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../statistics.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ljung_box.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 27<a name="math_toolkit.runs_test"></a><a class="link" href="runs_test.html" title="Runs tests">Runs tests</a> 28</h2></div></div></div> 29<h4> 30<a name="math_toolkit.runs_test.h0"></a> 31 <span class="phrase"><a name="math_toolkit.runs_test.synopsis"></a></span><a class="link" href="runs_test.html#math_toolkit.runs_test.synopsis">Synopsis</a> 32 </h4> 33<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">statistics</span><span class="special">/</span><span class="identifier">runs_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 34 35<span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">statistics</span> <span class="special">{</span> 36 37<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RandomAccessContainer</span><span class="special">></span> 38<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Real</span><span class="special">,</span> <span class="identifier">Real</span><span class="special">></span> <span class="identifier">runs_above_and_below_threshold</span><span class="special">(</span><span class="identifier">RandomAccessContainer</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">v</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">RandomAccessContainer</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">threshold</span><span class="special">);</span> 39 40<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">RandomAccessContainer</span><span class="special">></span> 41<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span><span class="identifier">Real</span><span class="special">,</span> <span class="identifier">Real</span><span class="special">></span> <span class="identifier">runs_above_and_below_median</span><span class="special">(</span><span class="identifier">RandomAccessContainer</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">v</span><span class="special">);</span> 42 43<span class="special">}}}</span> 44</pre> 45<h4> 46<a name="math_toolkit.runs_test.h1"></a> 47 <span class="phrase"><a name="math_toolkit.runs_test.background"></a></span><a class="link" href="runs_test.html#math_toolkit.runs_test.background">Background</a> 48 </h4> 49<p> 50 The "runs above and below median test" tries to determine if a sequence 51 is random by looking at the number of consecutive values which exceed (or are 52 below) the median of the sequence. For example, if we are given data {5, 2, 53 0, 4, 7, 9, 10, 6, 1, 8, 3}, first we find the median (5), and transform the 54 vector into a list of + and -'s, depending on whether the value is greater 55 or less than the median. (Values equal to the median we simply ignore-this 56 is a convention we have inherited from the wonderful <code class="computeroutput"><span class="identifier">randtests</span></code> 57 package in R.) Hence our data vector is transformed into 58 </p> 59<p> 60 {-,-,-,+,+,+,-,+,-} 61 </p> 62<p> 63 which is 5 runs, with <span class="emphasis"><em>n</em></span><sub>a</sub> = 5 values above and <span class="emphasis"><em>n</em></span><sub>b</sub> = 64 5 values below the median. <a href="https://www.itl.nist.gov/div898/handbook/eda/section3/eda35d.htm" target="_top">NIST</a> 65 tells us the expected number of runs and their variance: 66 </p> 67<p> 68 <span class="inlinemediaobject"><object type="image/svg+xml" data="../../graphs/expected_runs_above_threshold.svg" width="418" height="45"></object></span> 69 </p> 70<p> 71 from which we derive the test statistic 72 </p> 73<p> 74 <span class="inlinemediaobject"><object type="image/svg+xml" data="../../graphs/runs_test_statistic.svg" width="115" height="42"></object></span> 75 </p> 76<p> 77 whose distribution we approximate as normal to extract a <span class="emphasis"><em>p</em></span>-value. 78 </p> 79<p> 80 An example usage is as follows: 81 </p> 82<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">vector</span><span class="special">></span> 83<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">random</span><span class="special">></span> 84<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">statistics</span><span class="special">/</span><span class="identifier">runs_test</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> 85 86<span class="identifier">std</span><span class="special">::</span><span class="identifier">random_device</span> <span class="identifier">rd</span><span class="special">;</span> 87<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">v</span><span class="special">{</span><span class="number">5</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">0</span><span class="special">,</span> <span class="number">4</span><span class="special">,</span> <span class="number">7</span><span class="special">,</span> <span class="number">9</span><span class="special">,</span> <span class="number">10</span><span class="special">,</span> <span class="number">6</span><span class="special">,</span> <span class="number">1</span><span class="special">,</span> <span class="number">8</span><span class="special">,</span> <span class="number">3</span><span class="special">};</span> 88<span class="keyword">auto</span> <span class="special">[</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">p</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">statistics</span><span class="special">::</span><span class="identifier">runs_above_and_below_median</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span> 89<span class="comment">// t = -0.670820393249936919; p = 0.502334954360502017;</span> 90</pre> 91<p> 92 We see that we have about a 50% chance of seeing this number of runs if the 93 null hypothesis of randomness is true, and hence the assumption of randomness 94 seems reasonable. As always, the test statistic is the first element of the 95 pair, and the <span class="emphasis"><em>p</em></span>-value is the second element. 96 </p> 97<h4> 98<a name="math_toolkit.runs_test.h2"></a> 99 <span class="phrase"><a name="math_toolkit.runs_test.performance"></a></span><a class="link" href="runs_test.html#math_toolkit.runs_test.performance">Performance</a> 100 </h4> 101<p> 102 There are two cases: Where the threshold (typically the median) has already 103 been computed, and the case where the mean and sample variance must be computed 104 on the fly. Computing the median is fairly expensive (requiring a call to 105 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">statistics</span><span class="special">::</span><span class="identifier">median</span></code>), 106 and since the order of the original data must be preserved, it must allocate. 107 If you believe your data to come from a distribution where the means and median 108 coincide, or if you've already computed the median in the course of some other 109 analysis, then you can get away with a call to <code class="computeroutput"><span class="identifier">runs_above_and_below_threshold</span></code> 110 via 111 </p> 112<pre class="programlisting"><span class="identifier">Real</span> <span class="identifier">threshold</span> <span class="special">=</span> <span class="number">5</span><span class="special">;</span> 113<span class="keyword">auto</span> <span class="special">[</span><span class="identifier">t</span><span class="special">,</span> <span class="identifier">p</span><span class="special">]</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">statistics</span><span class="special">::</span><span class="identifier">runs_above_and_below_threshold</span><span class="special">(</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">threshold</span><span class="special">);</span> 114</pre> 115<p> 116 The performance differences between these two cases are obvious: 117 </p> 118<pre class="programlisting"><span class="special">---------------------------------------------------------------------------------------</span> 119<span class="identifier">Benchmark</span> <span class="identifier">Time</span> <span class="identifier">Bytes</span><span class="special">/</span><span class="identifier">second</span> 120<span class="special">---------------------------------------------------------------------------------------</span> 121<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">8</span> <span class="number">260</span> <span class="identifier">ns</span> <span class="number">118.421</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 122<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">16</span> <span class="number">318</span> <span class="identifier">ns</span> <span class="number">192.797</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 123<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">32</span> <span class="number">417</span> <span class="identifier">ns</span> <span class="number">303.509</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 124<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">64</span> <span class="number">625</span> <span class="identifier">ns</span> <span class="number">390.578</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 125<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">128</span> <span class="number">743</span> <span class="identifier">ns</span> <span class="number">657.827</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 126<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">256</span> <span class="number">1308</span> <span class="identifier">ns</span> <span class="number">767.181</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 127<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">512</span> <span class="number">1896</span> <span class="identifier">ns</span> <span class="number">1034.31</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 128<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">1024</span> <span class="number">6582</span> <span class="identifier">ns</span> <span class="number">594.458</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 129<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">2048</span> <span class="number">26067</span> <span class="identifier">ns</span> <span class="number">300.001</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 130<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">4096</span> <span class="number">62023</span> <span class="identifier">ns</span> <span class="number">252.125</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 131<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">8192</span> <span class="number">124976</span> <span class="identifier">ns</span> <span class="number">250.256</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 132<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">16384</span> <span class="number">242171</span> <span class="identifier">ns</span> <span class="number">258.29</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 133<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">32768</span> <span class="number">528683</span> <span class="identifier">ns</span> <span class="number">236.714</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 134<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">65536</span> <span class="number">965354</span> <span class="identifier">ns</span> <span class="number">259.185</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 135<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">131072</span> <span class="number">2514693</span> <span class="identifier">ns</span> <span class="number">199.068</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 136<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">262144</span> <span class="number">4223084</span> <span class="identifier">ns</span> <span class="number">237.058</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 137<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">524288</span> <span class="number">8638963</span> <span class="identifier">ns</span> <span class="number">231.755</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 138<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">1048576</span> <span class="number">16215682</span> <span class="identifier">ns</span> <span class="number">246.995</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 139<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">2097152</span> <span class="number">39180496</span> <span class="identifier">ns</span> <span class="number">204.443</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 140<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">4194304</span> <span class="number">82495779</span> <span class="identifier">ns</span> <span class="number">194.307</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 141<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">8388608</span> <span class="number">142675936</span> <span class="identifier">ns</span> <span class="number">224.547</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 142<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">16777216</span> <span class="number">287638068</span> <span class="identifier">ns</span> <span class="number">223.088</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 143<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span><span class="identifier">_BigO</span> <span class="number">17.25</span> <span class="identifier">N</span> 144<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">8</span> <span class="number">191</span> <span class="identifier">ns</span> <span class="number">320.129</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 145<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">16</span> <span class="number">233</span> <span class="identifier">ns</span> <span class="number">523.526</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 146<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">32</span> <span class="number">334</span> <span class="identifier">ns</span> <span class="number">730.8</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 147<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">64</span> <span class="number">456</span> <span class="identifier">ns</span> <span class="number">1070.93</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 148<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">128</span> <span class="number">688</span> <span class="identifier">ns</span> <span class="number">1.38789</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 149<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">256</span> <span class="number">1257</span> <span class="identifier">ns</span> <span class="number">1.51807</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 150<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">512</span> <span class="number">2663</span> <span class="identifier">ns</span> <span class="number">1.43406</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 151<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">1024</span> <span class="number">4100</span> <span class="identifier">ns</span> <span class="number">1.86266</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 152<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">2048</span> <span class="number">23493</span> <span class="identifier">ns</span> <span class="number">665.851</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 153<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">4096</span> <span class="number">57968</span> <span class="identifier">ns</span> <span class="number">539.551</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 154<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">8192</span> <span class="number">142272</span> <span class="identifier">ns</span> <span class="number">439.746</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 155<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">16384</span> <span class="number">260948</span> <span class="identifier">ns</span> <span class="number">479.639</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 156<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">32768</span> <span class="number">551577</span> <span class="identifier">ns</span> <span class="number">453.623</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 157<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">65536</span> <span class="number">1056583</span> <span class="identifier">ns</span> <span class="number">473.654</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 158<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">131072</span> <span class="number">2123956</span> <span class="identifier">ns</span> <span class="number">471.35</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 159<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">262144</span> <span class="number">5028745</span> <span class="identifier">ns</span> <span class="number">398.111</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 160<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">524288</span> <span class="number">10399212</span> <span class="identifier">ns</span> <span class="number">384.981</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 161<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">1048576</span> <span class="number">23089767</span> <span class="identifier">ns</span> <span class="number">348.496</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 162<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">2097152</span> <span class="number">37626884</span> <span class="identifier">ns</span> <span class="number">425.962</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 163<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">4194304</span> <span class="number">79281747</span> <span class="identifier">ns</span> <span class="number">404.088</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 164<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">8388608</span> <span class="number">172055781</span> <span class="identifier">ns</span> <span class="number">373.391</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 165<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">16777216</span> <span class="number">391377449</span> <span class="identifier">ns</span> <span class="number">332.01</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 166<span class="identifier">BMRunsAboveAndBelowMedian</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span><span class="identifier">_BigO</span> <span class="number">22.52</span> <span class="identifier">N</span> 167<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">8</span> <span class="number">41.6</span> <span class="identifier">ns</span> <span class="number">739.55</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 168<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">16</span> <span class="number">58.4</span> <span class="identifier">ns</span> <span class="number">1050.48</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 169<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">32</span> <span class="number">66.5</span> <span class="identifier">ns</span> <span class="number">1.79606</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 170<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">64</span> <span class="number">115</span> <span class="identifier">ns</span> <span class="number">2.0762</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 171<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">128</span> <span class="number">198</span> <span class="identifier">ns</span> <span class="number">2.41515</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 172<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">256</span> <span class="number">365</span> <span class="identifier">ns</span> <span class="number">2.61328</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 173<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">512</span> <span class="number">720</span> <span class="identifier">ns</span> <span class="number">2.65053</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 174<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">1024</span> <span class="number">1424</span> <span class="identifier">ns</span> <span class="number">2.68123</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 175<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">2048</span> <span class="number">3009</span> <span class="identifier">ns</span> <span class="number">2.5379</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 176<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">4096</span> <span class="number">16748</span> <span class="identifier">ns</span> <span class="number">933.699</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 177<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">8192</span> <span class="number">40190</span> <span class="identifier">ns</span> <span class="number">778.105</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 178<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">16384</span> <span class="number">86500</span> <span class="identifier">ns</span> <span class="number">723.067</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 179<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">32768</span> <span class="number">176692</span> <span class="identifier">ns</span> <span class="number">708.108</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 180<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">65536</span> <span class="number">356863</span> <span class="identifier">ns</span> <span class="number">701.198</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 181<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">131072</span> <span class="number">714807</span> <span class="identifier">ns</span> <span class="number">700.08</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 182<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">262144</span> <span class="number">1429078</span> <span class="identifier">ns</span> <span class="number">700.415</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 183<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">524288</span> <span class="number">2877227</span> <span class="identifier">ns</span> <span class="number">695.785</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 184<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">1048576</span> <span class="number">5795662</span> <span class="identifier">ns</span> <span class="number">691.222</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 185<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">2097152</span> <span class="number">11562715</span> <span class="identifier">ns</span> <span class="number">692.427</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 186<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">4194304</span> <span class="number">23364846</span> <span class="identifier">ns</span> <span class="number">686.464</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 187<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">8388608</span> <span class="number">46442540</span> <span class="identifier">ns</span> <span class="number">689.871</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 188<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">>/</span><span class="number">16777216</span> <span class="number">92284501</span> <span class="identifier">ns</span> <span class="number">694.006</span><span class="identifier">M</span><span class="special">/</span><span class="identifier">s</span> 189<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">float</span><span class="special">></span><span class="identifier">_BigO</span> <span class="number">5.51</span> <span class="identifier">N</span> 190<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">8</span> <span class="number">45.1</span> <span class="identifier">ns</span> <span class="number">1.32169</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 191<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">16</span> <span class="number">53.6</span> <span class="identifier">ns</span> <span class="number">2.22712</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 192<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">32</span> <span class="number">71.4</span> <span class="identifier">ns</span> <span class="number">3.34079</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 193<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">64</span> <span class="number">112</span> <span class="identifier">ns</span> <span class="number">4.24946</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 194<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">128</span> <span class="number">196</span> <span class="identifier">ns</span> <span class="number">4.87317</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 195<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">256</span> <span class="number">378</span> <span class="identifier">ns</span> <span class="number">5.04476</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 196<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">512</span> <span class="number">702</span> <span class="identifier">ns</span> <span class="number">5.44134</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 197<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">1024</span> <span class="number">1417</span> <span class="identifier">ns</span> <span class="number">5.3865</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 198<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">2048</span> <span class="number">3031</span> <span class="identifier">ns</span> <span class="number">5.03872</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 199<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">4096</span> <span class="number">16813</span> <span class="identifier">ns</span> <span class="number">1.81669</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 200<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">8192</span> <span class="number">41182</span> <span class="identifier">ns</span> <span class="number">1.48565</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 201<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">16384</span> <span class="number">86939</span> <span class="identifier">ns</span> <span class="number">1.40536</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 202<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">32768</span> <span class="number">177255</span> <span class="identifier">ns</span> <span class="number">1.37892</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 203<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">65536</span> <span class="number">356391</span> <span class="identifier">ns</span> <span class="number">1.3713</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 204<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">131072</span> <span class="number">718417</span> <span class="identifier">ns</span> <span class="number">1.36057</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 205<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">262144</span> <span class="number">1442288</span> <span class="identifier">ns</span> <span class="number">1.35583</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 206<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">524288</span> <span class="number">2942259</span> <span class="identifier">ns</span> <span class="number">1.33217</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 207<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">1048576</span> <span class="number">5870235</span> <span class="identifier">ns</span> <span class="number">1.33244</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 208<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">2097152</span> <span class="number">11743081</span> <span class="identifier">ns</span> <span class="number">1.33192</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 209<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">4194304</span> <span class="number">23521002</span> <span class="identifier">ns</span> <span class="number">1.32976</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 210<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">8388608</span> <span class="number">46917407</span> <span class="identifier">ns</span> <span class="number">1.33339</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 211<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">>/</span><span class="number">16777216</span> <span class="number">93823876</span> <span class="identifier">ns</span> <span class="number">1.33305</span><span class="identifier">G</span><span class="special">/</span><span class="identifier">s</span> 212<span class="identifier">BMRunsAboveAndBelowThreshold</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span><span class="identifier">_BigO</span> <span class="number">5.59</span> <span class="identifier">N</span> <span class="number">5.59</span> <span class="identifier">N</span> 213</pre> 214</div> 215<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 216<td align="left"></td> 217<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar 218 Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, 219 Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan 220 Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, 221 Daryle Walker and Xiaogang Zhang<p> 222 Distributed under the Boost Software License, Version 1.0. (See accompanying 223 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 224 </p> 225</div></td> 226</tr></table> 227<hr> 228<div class="spirit-nav"> 229<a accesskey="p" href="t_test.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../statistics.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ljung_box.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 230</div> 231</body> 232</html> 233