This file is indexed.

/usr/share/doc/libghc-statistics-doc/html/Statistics-Sample-Powers.html is in libghc-statistics-doc 0.13.2.3-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Statistics.Sample.Powers</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Statistics-Sample-Powers.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Statistics-Sample-Powers.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">statistics-0.13.2.3: A library of statistical types, data, and functions</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) 2009, 2010 Bryan O'Sullivan</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Statistics.Sample.Powers</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types</a></li><li><a href="#g:2">Constructor</a></li><li><a href="#g:3">Descriptive functions</a></li><li><a href="#g:4">Statistics of location</a></li><li><a href="#g:5">Statistics of dispersion</a></li><li><a href="#g:6">Functions over central moments</a></li><li><a href="#g:7">References</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Very fast statistics over simple powers of a sample.  These can all
 be computed efficiently in just a single pass over a sample, with
 that pass subject to stream fusion.</p><p>The tradeoff is that some of these functions are less numerically
 robust than their counterparts in the <code><a href="Statistics.html#v:Sample">Sample</a></code> module.
 Where this is the case, the alternatives are noted.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Powers">Powers</a></li><li class="src short"><a href="#v:powers">powers</a> :: <a href="file:///usr/share/doc/libghc-vector-doc/html/Data-Vector-Generic.html#t:Vector">Vector</a> v <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; v <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> -&gt; <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></li><li class="src short"><a href="#v:order">order</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:count">count</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:sum">sum</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:mean">mean</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:variance">variance</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:stdDev">stdDev</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:varianceUnbiased">varianceUnbiased</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:centralMoment">centralMoment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:skewness">skewness</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><a href="#v:kurtosis">kurtosis</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li></ul></div><div id="interface"><h1 id="g:1">Types</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Powers" class="def">Powers</a> <a href="src/Statistics-Sample-Powers.html#Powers" class="link">Source</a></p><div class="subs instances"><p id="control.i:Powers" class="caption collapser" onclick="toggleSection('i:Powers')">Instances</p><div id="section.i:Powers" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:ToJSON">ToJSON</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/libghc-aeson-doc/html/Data-Aeson-Types.html#t:FromJSON">FromJSON</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-71" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/binary-0.7.5.0/Data-Binary.html#t:Binary">Binary</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-74" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><span class="keyword">type</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></span> <a href="src/Statistics-Sample-Powers.html#line-68" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Constructor</h1><div class="top"><p class="src"><a name="v:powers" class="def">powers</a> <a href="src/Statistics-Sample-Powers.html#powers" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-vector-doc/html/Data-Vector-Generic.html#t:Vector">Vector</a> v <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><em>n</em>, the number of powers, where <em>n</em> &gt;= 2.</p></td></tr><tr><td class="src">-&gt; v <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>O(<em>n</em>) Collect the <em>n</em> simple powers of a sample.</p><p>Functions computed over a sample's simple powers require at least a
 certain number (or <em>order</em>) of powers to be collected.</p><ul><li>To compute the <em>k</em>th <code><a href="Statistics-Sample-Powers.html#v:centralMoment">centralMoment</a></code>, at least <em>k</em> simple powers
   must be collected.</li><li>For the <code><a href="Statistics-Sample-Powers.html#v:variance">variance</a></code>, at least 2 simple powers are needed.</li><li>For <code><a href="Statistics-Sample-Powers.html#v:skewness">skewness</a></code>, we need at least 3 simple powers.</li><li>For <code><a href="Statistics-Sample-Powers.html#v:kurtosis">kurtosis</a></code>, at least 4 simple powers are required.</li></ul><p>This function is subject to stream fusion.</p></div></div><h1 id="g:3">Descriptive functions</h1><div class="top"><p class="src"><a name="v:order" class="def">order</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="src/Statistics-Sample-Powers.html#order" class="link">Source</a></p><div class="doc"><p>The order (number) of simple powers collected from a <code>sample</code>.</p></div></div><div class="top"><p class="src"><a name="v:count" class="def">count</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="src/Statistics-Sample-Powers.html#count" class="link">Source</a></p><div class="doc"><p>The number of elements in the original <code>Sample</code>.  This is the
 sample's zeroth simple power.</p></div></div><div class="top"><p class="src"><a name="v:sum" class="def">sum</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#sum" class="link">Source</a></p><div class="doc"><p>The sum of elements in the original <code>Sample</code>.  This is the
 sample's first simple power.</p></div></div><h1 id="g:4">Statistics of location</h1><div class="top"><p class="src"><a name="v:mean" class="def">mean</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#mean" class="link">Source</a></p><div class="doc"><p>The arithmetic mean of elements in the original <code>Sample</code>.</p><p>This is less numerically robust than the mean function in the
 <code><a href="Statistics.html#v:Sample">Sample</a></code> module, but the number is essentially free to
 compute if you have already collected a sample's simple powers.</p></div></div><h1 id="g:5">Statistics of dispersion</h1><div class="top"><p class="src"><a name="v:variance" class="def">variance</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#variance" class="link">Source</a></p><div class="doc"><p>Maximum likelihood estimate of a sample's variance.  Also known
 as the population variance, where the denominator is <em>n</em>.  This is
 the second central moment of the sample.</p><p>This is less numerically robust than the variance function in the
 <code><a href="Statistics.html#v:Sample">Sample</a></code> module, but the number is essentially free to
 compute if you have already collected a sample's simple powers.</p><p>Requires <code><a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></code> with <code><a href="Statistics-Sample-Powers.html#v:order">order</a></code> at least 2.</p></div></div><div class="top"><p class="src"><a name="v:stdDev" class="def">stdDev</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#stdDev" class="link">Source</a></p><div class="doc"><p>Standard deviation.  This is simply the square root of the
 maximum likelihood estimate of the variance.</p></div></div><div class="top"><p class="src"><a name="v:varianceUnbiased" class="def">varianceUnbiased</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#varianceUnbiased" class="link">Source</a></p><div class="doc"><p>Unbiased estimate of a sample's variance.  Also known as the
 sample variance, where the denominator is <em>n</em>-1.</p><p>Requires <code><a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></code> with <code><a href="Statistics-Sample-Powers.html#v:order">order</a></code> at least 2.</p></div></div><h1 id="g:6">Functions over central moments</h1><div class="top"><p class="src"><a name="v:centralMoment" class="def">centralMoment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#centralMoment" class="link">Source</a></p><div class="doc"><p>Compute the <em>k</em>th central moment of a sample.  The central
 moment is also known as the moment about the mean.</p></div></div><div class="top"><p class="src"><a name="v:skewness" class="def">skewness</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#skewness" class="link">Source</a></p><div class="doc"><p>Compute the skewness of a sample. This is a measure of the
 asymmetry of its distribution.</p><p>A sample with negative skew is said to be <em>left-skewed</em>.  Most of
 its mass is on the right of the distribution, with the tail on the
 left.</p><pre>skewness . powers 3 $ U.to [1,100,101,102,103]
==&gt; -1.497681449918257</pre><p>A sample with positive skew is said to be <em>right-skewed</em>.</p><pre>skewness . powers 3 $ U.to [1,2,3,4,100]
==&gt; 1.4975367033335198</pre><p>A sample's skewness is not defined if its <code><a href="Statistics-Sample-Powers.html#v:variance">variance</a></code> is zero.</p><p>Requires <code><a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></code> with <code><a href="Statistics-Sample-Powers.html#v:order">order</a></code> at least 3.</p></div></div><div class="top"><p class="src"><a name="v:kurtosis" class="def">kurtosis</a> :: <a href="Statistics-Sample-Powers.html#t:Powers">Powers</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Statistics-Sample-Powers.html#kurtosis" class="link">Source</a></p><div class="doc"><p>Compute the excess kurtosis of a sample.  This is a measure of
 the &quot;peakedness&quot; of its distribution.  A high kurtosis indicates
 that the sample's variance is due more to infrequent severe
 deviations than to frequent modest deviations.</p><p>A sample's excess kurtosis is not defined if its <code><a href="Statistics-Sample-Powers.html#v:variance">variance</a></code> is
 zero.</p><p>Requires <code><a href="Statistics-Sample-Powers.html#t:Powers">Powers</a></code> with <code><a href="Statistics-Sample-Powers.html#v:order">order</a></code> at least 4.</p></div></div><h1 id="g:7">References</h1><div class="doc"><ul><li>Besset, D.H. (2000) Elements of statistics.
   <em>Object-oriented implementation of numerical methods</em>
   ch. 9, pp. 311&#8211;331.
   <a href="http://www.elsevier.com/wps/product/cws_home/677916">http://www.elsevier.com/wps/product/cws_home/677916</a></li><li>Anderson, G. (2009) Compute <em>k</em>th central moments in one
   pass. <em>quantblog</em>. <a href="http://quantblog.wordpress.com/2009/02/07/compute-kth-central-moments-in-one-pass/">http://quantblog.wordpress.com/2009/02/07/compute-kth-central-moments-in-one-pass/</a></li></ul></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>