DSPRelated.com
Forums

Generate rand. data with zero skewness and some kurtosis

Started by Abdul Kudus September 28, 2001
Dear all,

Right now, I'm doing research about outlier in statistical data
(univariate and multivariate) and I want to simulate its behavior. My
problem is :
How to generate random data from distribution with zero skewness and
some kurtosis values in Matlab ?

A. Kudus
==========================
Dept. of Statistics
Bandung Islamic University
I n d o n e s i a
==========================




Hi,
You can generate the following distribution:
P=rand(1,10000); %sample size 10,000
P1=P(P<0.5);
P2=P(P>=0.5);
X1=(2*P1).^(1/3)-1;
X2=1-(2*P2-1).^(1/3);
X=[X1 X2];
hist(X,40) % see the distribution
Var=sum(X.^2)/1000 % 1000 factor to normalize
variance
% see properties:
sum(X.^3)/1000

ans =

0.0057 % This is zero
sum(X.^4)/1000

ans =

0.3016 % This is small
Joe is back from vacation
--
BSTEX-equation viewer for MATLAB
http://www.geocities.com/bstex2001 --- Abdul Kudus <> wrote:
> Dear all,
>
> Right now, I'm doing research about outlier in
> statistical data
> (univariate and multivariate) and I want to simulate
> its behavior. My
> problem is :
> How to generate random data from distribution with
> zero skewness and
> some kurtosis values in Matlab ?
>
> A. Kudus
> ==========================
> Dept. of Statistics
> Bandung Islamic University
> I n d o n e s i a
> ========================== >
>


__________________________________________________