1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
from ./octave.texi on 18 June 1999 -->
<TITLE>GNU Octave - Statistics</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="octave_1.html">first</A>, <A HREF="octave_22.html">previous</A>, <A HREF="octave_24.html">next</A>, <A HREF="octave_40.html">last</A> section, <A HREF="octave_toc.html">table of contents</A>.
<P><HR><P>
<H1><A NAME="SEC158" HREF="octave_toc.html#TOC158">Statistics</A></H1>
<P>
I hope that someday Octave will include more statistics functions. If
you would like to help improve Octave in this area, please contact
@email{bug-octave@bevo.che.wisc.edu}.
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>mean</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX764"></A>
If <VAR>x</VAR> is a vector, compute the mean of the elements of <VAR>x</VAR>
</P>
<PRE>
mean (x) = SUM_i x(i) / N
</PRE>
<P>
If <VAR>x</VAR> is a matrix, compute the mean for each column and return them
in a row vector.
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>median</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX765"></A>
If <VAR>x</VAR> is a vector, compute the median value of the elements of
<VAR>x</VAR>.
</P>
<PRE>
x(ceil(N/2)), N odd
median(x) =
(x(N/2) + x((N/2)+1))/2, N even
</PRE>
<P>
If <VAR>x</VAR> is a matrix, compute the median value for each
column and return them in a row vector.
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>std</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX766"></A>
If <VAR>x</VAR> is a vector, compute the standard deviation of the elements
of <VAR>x</VAR>.
</P>
<PRE>
std (x) = sqrt (sumsq (x - mean (x)) / (n - 1))
</PRE>
<P>
If <VAR>x</VAR> is a matrix, compute the standard deviation for
each column and return them in a row vector.
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>cov</B> <I>(<VAR>x</VAR>, <VAR>y</VAR>)</I>
<DD><A NAME="IDX767"></A>
If each row of <VAR>x</VAR> and <VAR>y</VAR> is an observation and each column is
a variable, the (<VAR>i</VAR>,<VAR>j</VAR>)-th entry of
<CODE>cov (<VAR>x</VAR>, <VAR>y</VAR>)</CODE> is the covariance between the <VAR>i</VAR>-th
variable in <VAR>x</VAR> and the <VAR>j</VAR>-th variable in <VAR>y</VAR>. If called
with one argument, compute <CODE>cov (<VAR>x</VAR>, <VAR>x</VAR>)</CODE>.
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>corrcoef</B> <I>(<VAR>x</VAR>, <VAR>y</VAR>)</I>
<DD><A NAME="IDX768"></A>
If each row of <VAR>x</VAR> and <VAR>y</VAR> is an observation and each column is
a variable, the (<VAR>i</VAR>,<VAR>j</VAR>)-th entry of
<CODE>corrcoef (<VAR>x</VAR>, <VAR>y</VAR>)</CODE> is the correlation between the
<VAR>i</VAR>-th variable in <VAR>x</VAR> and the <VAR>j</VAR>-th variable in <VAR>y</VAR>.
If called with one argument, compute <CODE>corrcoef (<VAR>x</VAR>, <VAR>x</VAR>)</CODE>.
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>kurtosis</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX769"></A>
If <VAR>x</VAR> is a vector of length <VAR>N</VAR>, return the kurtosis
</P>
<PRE>
kurtosis (x) = N^(-1) std(x)^(-4) sum ((x - mean(x)).^4) - 3
</PRE>
<P>
of <VAR>x</VAR>. If <VAR>x</VAR> is a matrix, return the row vector containing
the kurtosis of each column.
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>mahalanobis</B> <I>(<VAR>x</VAR>, <VAR>y</VAR>)</I>
<DD><A NAME="IDX770"></A>
Return the Mahalanobis' D-square distance between the multivariate
samples <VAR>x</VAR> and <VAR>y</VAR>, which must have the same number of
components (columns), but may have a different number of observations
(rows).
</DL>
</P>
<P>
<DL>
<DT><U>Function File:</U> <B>skewness</B> <I>(<VAR>x</VAR>)</I>
<DD><A NAME="IDX771"></A>
If <VAR>x</VAR> is a vector of length <VAR>N</VAR>, return the skewness
</P>
<PRE>
skewness (x) = N^(-1) std(x)^(-3) sum ((x - mean(x)).^3)
</PRE>
<P>
of <VAR>x</VAR>. If <VAR>x</VAR> is a matrix, return the row vector containing
the skewness of each column.
</DL>
</P>
<P><HR><P>
Go to the <A HREF="octave_1.html">first</A>, <A HREF="octave_22.html">previous</A>, <A HREF="octave_24.html">next</A>, <A HREF="octave_40.html">last</A> section, <A HREF="octave_toc.html">table of contents</A>.
</BODY>
</HTML>
|