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

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

<refentry version="5.0-subset Scilab" xml:id="distfun_fstat" 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_fstat</refname>
    <refpurpose>F-Distribution mean and variance</refpurpose>
  </refnamediv>


<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   M = distfun_fstat(v1,v2)
   [M,V] = distfun_fstat(v1,v2)
   
   </synopsis>
</refsynopsisdiv>

<refsection>
   <title>Parameters</title>
   <variablelist>
   <varlistentry><term>v1 :</term>
      <listitem><para> a matrix of doubles, numerator degrees of freedom, v1&gt;0 (can be non integer).</para></listitem></varlistentry>
   <varlistentry><term>v2 :</term>
      <listitem><para> a matrix of doubles, denominator degrees of freedom, v2&gt;0 (can be non integer).</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 F-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 of the F distribution is
   </para>
   <para>
<latex>
\begin{eqnarray}
M &amp;=&amp; \frac{v_2}{v_2-2}
\end{eqnarray}
</latex>
   </para>
   <para>
if v2&gt;0, and M is set to %nan otherwise.
   </para>
   <para>
The variance of the F distribution is
   </para>
   <para>
<latex>
\begin{eqnarray}
V &amp;=&amp; \frac{2 v_2^2 (v_1+v_2-2)}{v_1(v_2-2)^2(v_2-4)}
\end{eqnarray}
</latex>
   </para>
   <para>
if v2&gt;4, and V is set to %nan otherwise.
   </para>
   <para>
</para>
</refsection>

<refsection>
   <title>Examples</title>
   <programlisting role="example"><![CDATA[
// Test with scalar v1 and v2
[M,V] = distfun_fstat(7,5)
Me = 1.666666666666666741D+00
Ve = 7.936507936507936734D+00

// Test with expanded v1 and v2
[M,V] = distfun_fstat(1:5,1:5)
Me = [%nan  %nan  3.0000  2.0000  1.6667]
Ve = [%nan  %nan  %nan  %nan  8.8889]

   ]]></programlisting>
</refsection>

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