Segment 4

From Computational Statistics (CSE383M and CS395T)
Jump to navigation Jump to search

Calculation Problems

1. Evaluate <math>\int_0^1\delta(3x-2)\,dx</math>

<math>\begin{align} \int_0^1\delta(3x-2)\,dx

  &= \int_0^1\delta(3(x-\frac{2}{3}))\,dx\\
  &= \frac{1}{3}\int_0^1\delta(x-\frac{2}{3})\,dx\\
  &= \frac{1}{3}

\end{align} </math>


2. Prove <math>\delta(ax)=\delta(x)/a</math>

<math>\begin{align} \int\delta(ax)\,dx &=\int\frac{1}{a}\delta(u)\,du\\ & (u=ax) \qquad (du=a\,dx) \implies dx=\frac{1}{a}du \\ &=\frac{1}{a}\implies \delta(ax)=\frac{1}{a}\delta(x) \end{align} </math>


3. What is <math>P(A|S_BI)</math> if the prior for <math>p(x)</math> is a massed prior with half the mass at <math>x = 1/3</math> and half the mass at <math>x = 2/3</math>?

<math>\begin{align} P(A|S_BI) &= \int_x P(x|I)\,dx\\ &= \frac{1}{2}\frac{1}{1+\frac{1}{3}} + \frac{1}{2}\frac{1}{1+\frac{2}{3}}\\ &= \frac{1}{2}(\frac{3}{4} + \frac{3}{5})\\ &= 0.675 \end{align} </math>

Food for Thought Problems

1. With respect to Problem 3, since <math>x</math> is a probability, how can choosing <math>x = 1/3</math> half the time, and <math> x = 2/3</math> the other half of the time be different from choosing <math>x=1/2</math> all the time?

This probability is not linear.

Class Activity

1. Discrete - Expected value

  1. <math> E[Y] = E[X_1 + X_2] = E[X_1] + E[X+2] = 7</math>
  2. <math> E[M] = E[\frac{1}{2} X_1 + X_2] = \frac{1}{2}(E[X_1] + E[X+2]) = 3.5 </math>
  3. <math> E[Z] = E[X_1X_2] = E[X_1]E[X_2] = 3.5^2 = 12.25 </math>
  4. <math> E[U] = \frac{(11\cdot 1+9\cdot 2+7\cdot 3+5\cdot 4+3\cdot 5+1\cdot 6)}{36} = \frac{91}{36}</math>
  5. <math> E[V] = \frac{(11\cdot 6+9\cdot 5+7\cdot 4+5\cdot 3+3\cdot 2+1\cdot 1)}{36} = \frac{161}{36}</math>


2. Continuous - Expected value

  1. <math> \int_0^\infty re^{-rx}\,dx = 1</math>
  2. <math> \int_0^\infty xre^{-rx}\,dx = \frac{1}{r}</math>

3. Parsing Text

Refer to Expected and continuous