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

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

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


<refsynopsisdiv>
   <title>Calling Sequence</title>
   <synopsis>
   M = distfun_ncfstat(v1,v2,delta)
   [M,V] = distfun_ncfstat(v1,v2,delta)
   
   </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>delta :</term>
      <listitem><para> a matrix of doubles, the noncentrality parameter, delta>=0</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 Noncentral 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 Noncentral F distribution is
   </para>
   <para>
<latex>
\begin{eqnarray}
M &amp;=&amp; \frac{v_2(v_1+\delta)}{v_1(v_2-2)}
\end{eqnarray}
</latex>
   </para>
   <para>
if v2&gt;2, and M is set to %nan otherwise.
   </para>
   <para>
The variance of the Noncentral F distribution is
   </para>
   <para>
<latex>
\begin{eqnarray}
V &amp;=&amp; 2 \frac{(v_1+\delta)^2+(v_1+2\delta)(v_2-2)}{(v_2-2)^2(v_2-4)} \left(\frac{v_2}{v_1}\right)^2
\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_ncfstat(4,12,0.3)
Me = 1.29
Ve = 1.451025

   ]]></programlisting>
</refsection>

<refsection>
   <title>Bibliography</title>
   <para>http://en.wikipedia.org/wiki/Noncentral_F-distribution</para>
</refsection>

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