Skip to main content

Engineering Probability Class 22 Mon 2021-04-19

1 Mathematica

  1. Commands are ended with shift-enter.

  2. Integrate[x^n, x]

  3. Sum[x^2,{x,0,l}]

  4. Manipulate[Integrate[x^n, x], {n, 0, 10, 1}]

  5. Binomial[10,5]

  6. f[x_]:=Exp[-x^2/2]

  7. f[x1_ , x2_ , x3_ ] := Exp[- (x1 ^ 2 + x2 ^ 2 - Sqrt[2] (x1 x2) + x3 ^ 2 / 2) / (2 Pi Sqrt [Pi])]

  8. 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.

  9. Sum of 2 uniform:

    s2[x_ ] := Integrate[s[y] × s[x - y], {y, - Infinity, Infinity}]

    Plot it: triangle.

  10. Sum of 4 uniform.....

  11. Now try this on exponential distn.

2 Mathematica on Gaussians

  1. NormalDistribution[m,s] is the abstract pdf.

  2. get functions of it thus:

    1. PDF[NormalDistribution[m,s][x]]

    2. CDF ...

    3. Mean, Variance, Median ..

  3. MultinormalDistribution[{mu1, mu2}, {{sigma11, sigma12}, {sigma12, sigma22}}] (details later).

3 Textbook material

Continuing Chapter 7.