# Segment 4 Sanmit Narvekar

## Segment 4

#### To Calculate

1. Evaluate **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_0^1 \delta(3x-2) dx}**

The answer is 1. All the mass for **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \delta(3x-2) }**
is located at the point x = 2/3. Since this is within the bounds of the integral, we simply evaluate the function **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x) = 1}**
(which is what the Dirac-delta is being implicitly applied to) at x = 2/3, and the answer is 1.

Edited --Sanmit (talk) 14:49, 2 March 2014 (CST)

Turns out this is wrong. The delta function has a different interpretation under scaling, as seen in problem 2:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_0^1 \delta(3x-2) dx}**

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle = \int_0^1 \delta(3(x-\frac{2}{3})) dx}**

By problem 2:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle = \frac{1}{3}\int_0^1 \delta(x-\frac{2}{3}) dx}**

Now we continue as before. Since 2/3 is within the bounds of the integral, the integral simplifies to 1:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle = \frac{1}{3}}**

2. Prove that **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \delta(a x) = \frac{1}{a}\delta(x)}**
.

First we integrate both sides from **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle -\infty}**
to **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \infty}**

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_{-\infty}^{\infty} \delta(ax) dx = \frac{1}{a}\int_{-\infty}^{\infty} \delta(x) dx }**

Now let **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y = ax}**
. Then, **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle dy = a\text{ } dx}**
. Performing the substitutions on the left side yields:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{1}{a}\int_{-\infty}^{\infty} \delta(y) dy = \frac{1}{a}\int_{-\infty}^{\infty} \delta(x) dx }**

By the definition of the Dirac delta, both terms in the integral become 1. Thus:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \frac{1}{a} = \frac{1}{a}}**

So they are the same.

3. What is the numerical value of **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A|S_BI)}**
if the prior for **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p(x)}**
is a massed prior with half the mass at **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x = 1/3}**
and half the mass at **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x = 2/3}**
?

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A|S_BI) = \int_x \frac{1}{1+x}\text{ } p(x|I) \text{ } dx = \frac{1}{2}\int_0^1 \frac{1}{1+x}\text{ } \delta(3x - 1) \text{ } dx + \frac{1}{2}\int_0^1 \frac{1}{1+x}\text{ } \delta(3x - 2) \text{ } dx}**

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle = (0.5) \frac{1}{1+\frac{1}{3}} + (0.5) \frac{1}{1 + \frac{2}{3}} = \frac{3}{8} + \frac{3}{10} = 0.675}**

#### To Think About

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

2. Suppose A is some event that we view as stochastic with P(A), such as "will it rain today?". But the laws of physics (or meteorology) say that A actually depends on other weather variables X, Y, Z, etc., with conditional probabilities P(A|XYZ...). If we repeatedly sample just A, to naively measure P(A), are we correctly marginalizing over the other variables?