[statistics] added new exercise univariatedata.m
This commit is contained in:
9
statistics/code/univariatedata.m
Normal file
9
statistics/code/univariatedata.m
Normal file
@@ -0,0 +1,9 @@
|
||||
data = 2.0 + randn(40, 1);
|
||||
bw = 0.8
|
||||
boxplot(data)
|
||||
hold on;
|
||||
bar(2.0, mean(data), 0.5*bw);
|
||||
errorbar(2.0, mean(data), std(data));
|
||||
scatter(2.5+bw*rand(length(data), 1), data);
|
||||
hold off;
|
||||
xlim([0.2, 4.0])
|
||||
Reference in New Issue
Block a user