From 84cdf5bfb41b31e07afcb7d8b1c36cd2e3d3a5b4 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 21 Dec 2021 11:41:07 +0100 Subject: mms: add lecture --- Year_3/MMS/lecture_20211214.m | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Year_3/MMS/lecture_20211214.m (limited to 'Year_3') 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 -- cgit v1.2.3-18-g5258