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

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

<refentry version="5.0-subset Scilab" xml:id="distfun_binoinv" 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_binoinv</refname>
    <refpurpose>Binomial Inverse CDF</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   x = distfun_binoinv(p,N,pr)
   x = distfun_binoinv(p,N,pr,lowertail)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>p :</term>
      <listitem><para> a matrix of doubles, the probability. Must be in the range [0,1].</para></listitem></varlistentry>
   <varlistentry><term>N :</term>
      <listitem><para> a matrix of doubles , the total number of binomial trials . N belongs to the set {1,2,3,4,.......}</para></listitem></varlistentry>
   <varlistentry><term>pr :</term>
      <listitem><para> a matrix of doubles,  the probability of success in a Bernoulli trial. pr in [0,1].</para></listitem></varlistentry>
   <varlistentry><term>lowertail :</term>
      <listitem><para> a 1-by-1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X&lt;=x) otherwise P(X&gt;x).</para></listitem></varlistentry>
   <varlistentry><term>x :</term>
      <listitem><para> a matrix of doubles, the number of successes. x belongs to the set {0,1,2,3,...,N}</para></listitem></varlistentry>
   </variablelist>
</refsection>

<refsection>
   <title>Description</title>
   <para>
Computes the Inverse cumulative distribution function of
the Binomial distribution function.
   </para>
   <para>
Any scalar input argument is expanded to a matrix of doubles
of the same size as the other input arguments.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[

// Check with all arguments scalar
x = distfun_binoinv(0.21,162,0.5)
expected = 76

// check with p expanded
x = distfun_binoinv([0.05 0.95],162,0.5)
expected = [71 91]

// Check with N expanded
x = distfun_binoinv(0.05,[100 162],0.5)
expected = [42 71]

// Check with expanded pr
x = distfun_binoinv(0.05,162,[0.2 0.5])
expected = [24 71]

//Check with all arguments expanded
x = distfun_binoinv([0.05 0.95],[100 162],[0.2 0.5])
expected = [14 91]

   ]]></programlisting>
</refsection>

<refsection>
   <title>Bibliography</title>
   <para>http://en.wikipedia.org/wiki/Binomial_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>
