summaryrefslogtreecommitdiff
path: root/Year_3/MMS
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-12-21 11:41:07 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-12-21 11:41:07 +0100
commit84cdf5bfb41b31e07afcb7d8b1c36cd2e3d3a5b4 (patch)
treeec1636af29d111a52791c7623d05622bb68766b8 /Year_3/MMS
parent7b044ffe0f6e3c811850387a721704963012c90f (diff)
mms: add lecture
Diffstat (limited to 'Year_3/MMS')
-rw-r--r--Year_3/MMS/lecture_20211214.m31
1 files changed, 31 insertions, 0 deletions
diff --git a/Year_3/MMS/lecture_20211214.m b/Year_3/MMS/lecture_20211214.m
new file mode 100644
index 0000000..f75e975
--- /dev/null
+++ b/Year_3/MMS/lecture_20211214.m
@@ -0,0 +1,31 @@
+f = @(x) normpdf(x, 5, 1);
+
+x = -15:0.1:25;
+y = f(x);
+% plot(x, y);
+
+% probability 'x' between 2 and 6
+integral(f, 2, 6)
+
+norminv(0.8, 5, 1)
+integral(f, -inf, 5.8416) % ans = 0.8
+
+% t-student
+f1 = @(x) tpdf(x, 3);
+f2 = @(x) tpdf(x, 8);
+
+x = 0:0.1:10;
+y1 = f1(x);
+y2 = f2(x);
+
+plot(x, y1, 'X', x, y2, 'O');
+
+% Chi^2
+f = @(x) chi2pdf(x, 60);
+x = 1:0.01:100;
+y = f(x);
+plot(x, y);
+
+% ----
+u = (53.82 - 54.41) / sqrt(0.1/5+0.1/6);
+norminv(1-0.05, 0, 1) \ No newline at end of file