In MATLAB:
>> datos = [ 0.12 0.39 0.50 0.61 0.93 0.21 0.46 0.51 0.62 1.05 0.36 0.47 0.53
>> 0.77 1.59 0.37 0.50 0.58 0.81 1.73 ]' ;
N=length(datos);
% Skewness of a population
skewness(datos,1)
sum((datos - mean(datos)).^3)/(std(datos,1)^3)/N
%Skewness of a sample
skewness(datos,0)
skewness(datos,1)*sqrt(N*(N-1))/(N-2)
ans =
1.420288602649852
ans =
1.420288602649852
ans =
1.538140102256022
ans =
1.538140102256022
>>
In OCTAVE the skewness is not MATLAB compatible, also it produces
octave:14> clear
octave:15> clc
octave:16> datos = [ 0.12 0.39 0.50 0.61 0.93 0.21 0.46 0.51 0.62 1.05 0.36
0.47 0.53 0.77 1.59 0.37 0.50 0.58 0.81 1.73 ]' ;
octave:17> N=length(datos);
octave:18> skewness(datos)
ans = 1.3151
Which is a very different result than the one of MATLAB.
I am using the OCTAVE that comes with Debian 5 Lenny:
octave:19> ver
----------------------------------------------------------------------
GNU Octave Version 3.0.1
GNU Octave License: GNU General Public License
Operating System: Linux 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686
----------------------------------------------------------------------
octave:21> which skewness
skewness is the user-defined function from the file
/usr/share/octave/3.0.1/m/statistics/base/skewness.m
octave:22>
Regards,
Diego Andrés
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev