<?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * This help file was generated from distfun_geostat.sci using help_from_sci().
 *
 -->

<refentry version="5.0-subset Scilab" xml:id="distfun_geostat" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:scilab="http://www.scilab.org"
          xmlns:db="http://docbook.org/ns/docbook">

  <refnamediv>
    <refname>distfun_geostat</refname>
    <refpurpose>Geometric  mean and variance</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   M = distfun_geostat(pr)
   [M,V] = distfun_geostat(pr)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>pr :</term>
      <listitem><para> a matrix of doubles, the probability of getting success in a Bernoulli trial. pr in (0,1].</para></listitem></varlistentry>
   <varlistentry><term>M :</term>
      <listitem><para> a matrix of doubles, the mean</para></listitem></varlistentry>
   <varlistentry><term>V :</term>
      <listitem><para> a matrix of doubles, the variance</para></listitem></varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
Computes statistics from the Geometric distribution.
   </para>
   <para>
Any scalar input argument is expanded to a matrix of
doubles of the same size as the other input arguments.
   </para>
   <para>
The Mean and Variance of the Geometric Distribution are
   </para>
   <para>
<latex>
\begin{eqnarray}
M &amp;=&amp; \frac{1-pr}{pr} \\
V &amp;=&amp; \frac{1-pr}{pr^2}
\end{eqnarray}
</latex>
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Test with expanded pr
[m,v] = distfun_geostat(1 ./(1:6))
me = [ 0  1.0000  2.0000  3.0000  4.0000  5.0000];
ve = [ 0  2.0000  6.0000  12.0000  20.0000  30.0000];

//Accuracy test
pr=[0.11 0.22 0.33];
[M,V] = distfun_geostat ( pr )
ve= [73.553719 16.115702 6.1524334 ];
me = [8.0909091 3.5454545 2.030303 ];

   ]]></programlisting>
</refsection>

<refsection>
   <title>Bibliography</title>
   <para>http://en.wikipedia.org/wiki/Geometric_distribution</para>
</refsection>

<refsection>
   <title>Authors</title>
   <simplelist type="vert">
   <member>Copyright (C) 2012 - Prateek Papriwal</member>
   <member>Copyright (C) 2012 - Michael Baudin</member>
   </simplelist>
</refsection>
</refentry>
