间距和四分间距:
interquartile range:表示两个quartile 之间的距离
方差和标准差:
第十二课课后练习1:
load stockreturns;
x4 = stocks(:, 4);
ex.mean = mean(x4);
ex.median = median(x4);
ex.mode = mode(x4);
ex.quartile([1 2]) = prctile(x4, [0.25 0.75]);
ex.range = range(x4);
ex.interquartile_range = range(ex.quartile);
ex.variance = var(x4);
ex.standard_deviation = std(x4);
disp(ex);
第十二课课后练习2:
(需要计算x 数组里的各个数的frequency)
x = [1 3 5 5 5 5 7 9 9 9 10 13 14];
subplot(1, 3, 1); A = tabulate(x); B = A(:, 2);bar(1:14, B');
%% tabulate: 频率统计函数,可以在MATLAB里help 以下,就能看懂了。
subplot(1,3,2); area(1:14,B');
subplot(1,3,3); stem(1:14,B');
第十二课课后练习3:
load stockreturns;
boxplot(stocks)
prctile(stocks, [25 50 75]);
偏态:
峰度:
t检验: