087b62b6523762c687a9e13fc4688ab813e6f394
[scilab.git] / scilab / modules / statistics / help / en_US / descriptive_statistics / variancef.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2000 - INRIA - Carlos Klimann
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="variancef">
14     <refnamediv>
15         <refname>variancef</refname>
16         <refpurpose>standard deviation of the values of a  vector or matrix</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>s=variancef(x,fre)
21             s=variancef(x,fre,'r') or s=variancef(x,fre,1)
22             s=variancef(x,fre,'c') or s=variancef(x,fre,2)
23         </synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>x</term>
30                 <listitem>
31                     <para>real or complex vector or matrix</para>
32                 </listitem>
33             </varlistentry>
34         </variablelist>
35     </refsection>
36     <refsection>
37         <title>Description</title>
38         <para>
39             This  function computes the variance  of the values of a
40             vector  or matrix <literal>x</literal>,  each of  them counted with a
41             frequency  signaled by  the corresponding values  of the
42             integer vector or matrix <literal>fre</literal> with the same type of
43             <literal>x</literal>.
44         </para>
45         <para>
46             For a vector  or matrix <literal>x</literal>, <literal>s=variancef(x,fre)</literal> (or
47             <literal>s=variancef(x,fre,'*')</literal>)  returns in scalar <literal>s</literal>  the
48             variance of all  the   entries of <literal>x</literal>, each    value
49             counted  with   the    multiplicity  indicated by    the
50             corresponding value of <literal>fre</literal>.
51         </para>
52         <para>
53             <literal>s=variancef(x,fre,'r')</literal>(or,                equivalently,
54             <literal>s=variancef(x,fre,1)</literal>) returns in each  entry of the row
55             vector  <literal>s</literal> of  type  1xsize(x,'c') the  variance of
56             each column of  <literal>x</literal>,   each value counted  with  the
57             multiplicity  indicated by  the  corresponding value  of
58             <literal>fre</literal>.
59         </para>
60         <para>
61             <literal>s=variancef(x,fre,'c')</literal>(or,                equivalently,
62             <literal>s=variancef(x,fre,2)</literal>)  returns  in  each   entry of the
63             column vector <literal>s</literal> of type size(x,'c') x1 the variance
64             of  each row  of  <literal>x</literal>, each value  counted  with the
65             multiplicity indicated  by  the  corresponding value  of
66             <literal>fre</literal>.
67         </para>
68     </refsection>
69     <refsection>
70         <title>Examples</title>
71         <programlisting role="example"><![CDATA[ 
72 x=[0.2113249 0.0002211 0.6653811;0.7560439 0.9546254 0.6283918]
73 fre=[1 2 3;3 4 3]
74 m=variancef(x,fre)
75 m=variancef(x,fre,'r')
76 m=variancef(x,fre,'c')
77  ]]></programlisting>
78     </refsection>
79     <refsection>
80         <title>Bibliography</title>
81         <para>
82             Wonacott, T.H. &amp; Wonacott, R.J.; Introductory Statistics, fifth edition, J.Wiley &amp; Sons, 1990.
83         </para>
84     </refsection>
85 </refentry>