statistics

mean average

median median

mode the mode

prctile quartile, also known as quartiles, all numerical values ​​refer to ascending and arranged into four equal parts in the statistics, the value in the three division points positions

>> load stockreturns
>> x4=stocks(:,4)

x4 =

    2.9914
    2.6204
   -0.3624
    2.2094
   -2.4079
    2.9277
   -1.0281
   -3.3567
    1.9482
    2.3593
    3.5894
   -0.8645
   -2.1599
   -3.8850
   -0.3494
   -0.8930
    1.7893
   -0.7141
   -1.2013
   -3.3592
    0.6673
    3.7411
    2.1308
    2.6651
    0.9303
   -1.6121
    0.4302
    2.4841
   -1.9898
    4.5561
    2.5903
   -0.1640
    1.3072
   -0.4932
   -4.1415
   -0.1348
    3.2650
   -3.1646
   -0.6340
   -0.7101
   -4.3216
    0.6100
   -1.5280
    0.2114
   -1.4884
    0.9389
    1.1603
   -0.0880
   -2.7591
    3.3299
   -0.2885
    2.2003
   -4.3053
    0.4916
    0.4022
   -0.9178
   -5.8764
   -5.4219
    2.9621
   -3.1092
    2.1127
    0.8175
   -2.1854
    0.6762
    0.4983
    6.4692
    0.7895
    2.4106
    0.6763
   -2.7782 
   -1.6733 
   -0.2882 
   -2.2267 
   -1.2758 
   -2.3091 
    1.4615 
   -1.2334 
   -1.2778 
    1.9237 
   -1.3201 
    0.4338 
    0.5043 
   -1.7769 
    1.5579 
    2.9013 
    1.1645 
   -0.6437 
    1.6442 
   -0.8432 
   -0.4492 
   -2.8875 
    1.0591 
   -2.0462 
    3.6961 
    3.9568 
   -5.0162 
    0.3851 
    0.5334 
    1.4381 
   -0.7173 

>> = Mean ex.mean (X4) 

EX = 

  contains the following fields of the struct:

    Mean: -5.8728e-04 

>> ex.median = Median (X4) 

EX = 

  struct contains the following fields: 

      Mean: -5.8728e-04 
    Median: 0.0617 

>> ex.mode MODE = (X4) 

EX = 

  contains the following fields the struct: 

      Mean: -5.8728e-04 
    Median: 0.0617 
      MODE: -5.8764 

>> EX 

EX = 

  struct contains the following fields: 

      Mean: -5.8728e-04 
    Median: 0.0617 
      MODE: -5.8764

 

x=1:14;
freqy=[1 0 1 0 4 0 1 0 3 1 0 0 1 1];%频数
subplot(1,3,1);bar(x,freqy);xlim([0 15]);
subplot(1,3,2);area(x,freqy);xlim([0 15]);
subplot(1,3,3);stem(x,freqy);xlim([0 15]);

 boxplot

%boxplot
marks=[80 81 81 84 88 92 92 94 96 97];
boxplot(marks);
prctile(marks,[25 50 75]);%prctile百分数 25% 50% 75%

 

 

 

skewness coefficient of skewness

X = randn Returns a random scalar obtained from the standard normal distribution.

>> x=randn([10 3])*3;
x(x(:,1)<0,1)=0;
x(x(:,3)>0,3)=0;
boxplot(x,{'Right-skewed','Symmetric','Left-skewed'});
y=skewness(x)

y =

    0.6710    0.9900   -1.4245

 

The following things feel temporarily do not have access, to not read. .

 

Guess you like

Origin www.cnblogs.com/zuiaimiusi/p/11324109.html