[statistics] added new exercise univariatedata.m

This commit is contained in:
2019-11-25 22:49:03 +01:00
parent 82b4d5e080
commit 4b9d1134fe
2 changed files with 28 additions and 8 deletions

View 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])