Engineering Probability Class 22 Mon 2021-04-19
Table of contents
1 Mathematica
Commands are ended with shift-enter.
Integrate[x^n, x]
Sum[x^2,{x,0,l}]
Manipulate[Integrate[x^n, x], {n, 0, 10, 1}]
Binomial[10,5]
f[x_]:=Exp[-x^2/2]
f[x1_ , x2_ , x3_ ] := Exp[- (x1 ^ 2 + x2 ^ 2 - Sqrt[2] (x1 x2) + x3 ^ 2 / 2) / (2 Pi Sqrt [Pi])]
-
square wave, aka uniform probability distn.
s[x_ ] := If[x > 0 && x < 1, 1, 0]
The pdf is a conditional, which is messy to work with by hand.
-
Sum of 2 uniform:
s2[x_ ] := Integrate[s[y] × s[x - y], {y, - Infinity, Infinity}]
Plot it: triangle.
Sum of 4 uniform.....
Now try this on exponential distn.
2 Mathematica on Gaussians
NormalDistribution[m,s] is the abstract pdf.
-
get functions of it thus:
PDF[NormalDistribution[m,s][x]]
CDF ...
Mean, Variance, Median ..
MultinormalDistribution[{mu1, mu2}, {{sigma11, sigma12}, {sigma12, sigma22}}] (details later).
3 Textbook material
Continuing Chapter 7.