function [ stat, outliers ] = firstStat( data )
%UNTITLED4 Summary of this function goes here
%   Detailed explanation goes here

s=size(data);   % Determine the size of the input
m=mean(data);   % Compute the mean, median,mode, standard dev, variance
me=median(data);
mo=mode(data);
st=std(data);
va=var(data);
stat=[m,me,mo,st,va];   % Generate an array containing all these statistics
outliers=[];
outliersSize=0;     % This variable stores the current size of array outliers
fprintf(' ---> Size: %d \n',s);
for i = 1:s
    fprintf(' ---> Data: %d \n',data(i));
    if abs(data(i)-m)>3*st
        fprintf(' ---> outlier \n');
        outliers(outliersSize+1,1)=data(i); % Store the outlier
        outliers(outliersSize+1,2)=i;       % Store the outlier position
        outliersSize=outliersSize+1;        % Increment the outliersSize variable
    end
end
end

