# October 7, 2010

Statistical Inference (Casella and Berger)

Set Theory:

Union - ${\displaystyle A\bigcup B}$ - combination of two sets

Intersection - ${\displaystyle A\bigcap B}$ - elements contained in both A and B

Complement - ${\displaystyle A^{c}}$ - everything that's not in A

Empty Set - ${\displaystyle \emptyset }$ - set containing no elements

Definitions:

experiment - any activity generating observable results

outcome - result of experiment (IMPORTANT TO KEEP STRAIGHT! don't confuse events and outcomes)

trial - single performance of experiment

sample space - set of all possible outcomes

countable/uncountable: - countable = one-to-one correspondence (e.g. 1/n) - uncountable = no one-to-one correspondence can be made -- infinite loop: you can do an infinite loop, but still count it -- flipping a coin: countable; temperature: uncountable

event - any subset of the sample space

Example:

experiment - roll a dice outcome - 1, or 2, or 3, or 4, or 5, or 6 trial - one roll of the dice COUNTABLE sample space - {1,2,3,4,5,6} event - may be {1}, or {1,2,3}, etc...

Operator Properties:

Commutative:

${\displaystyle A\bigcup B=B\bigcup A}$

Associative:

${\displaystyle A\bigcup (B\bigcup C)=(A\bigcup B)\bigcup C}$

Distributive:

${\displaystyle A\bigcap (B\bigcup C)=(A\bigcap B)\bigcup (A\bigcap C)}$

DeMorgan's Law:

${\displaystyle (A\bigcup B)^{c}=A^{c}\bigcup B^{c}}$

Call a set abnormal if it can be put into itself (otherwise it's normal)

Example: the set of all squares is not itself square, so it is not a member of the set of squares The complimentary set, containing all non-squares, is itself not a square, so is normal

Consider the set of all normal sets Is it normal or abnormal? If it were normal, it would be contained in itself, and would therefore be abnormal If it were abnormal, it would not be contained in itself, and would therefore be normal

You can resolve this using more rigorous set theory...

More Definitions:

Disjoint ("set" term) / mutually exclusive ("probability" term) - if the intersection of two sets is the null set, they are mutually exclusive

ie ${\displaystyle A\bigcap B=\emptyset }$

Partition - take a group of sets; if the union of these sets is the sample space, and they are mutually exclusive, this is a partition

ie ${\displaystyle \bigcup _{i}^{\infty }A_{i}=S{\mbox{ and }}\bigcap _{i}^{\infty }A_{i}=\emptyset }$

Distinction between probability theory that has a physical meaning (and is therefore "contaminated" by intuition) and a more abstract probability theory that doesn't have a corresponding physical meaning

## Axiomatic probability theory (Komolgorov)

A probability is a function that follows 3 axioms:

Sample space ${\displaystyle S}$

(The domain) ${\displaystyle \sigma }$-algebra ${\displaystyle {\mathfrak {B}}}$ (means the set is fully consistent)

Function P -> probability over the domain ${\displaystyle {\mathfrak {B}}}$

1. ${\displaystyle P(A)\geq 0}$ for all ${\displaystyle A\in {\mathfrak {B}}}$

2. ${\displaystyle P(S)=1}$

3. If ${\displaystyle A\in {\mathfrak {B}}}$ and ${\displaystyle B\in {\mathfrak {B}}}$ are disjoint, then ${\displaystyle P(A\bigcup B)=P(A)+P(B)}$

In other words, ${\displaystyle P(\bigcup _{i=1}^{\infty }A_{i})=\sum _{l=1}^{\infty }P(A_{i})}$

This is a mathematician's viewpoint: a clean definition, as long as we follow these rules, the function is a probability.

What is the probability of the null set?

Create a partition: ${\displaystyle S={S,\emptyset }}$

The probability of the sample space is ${\displaystyle P(S)=1}$

So ${\displaystyle P(\emptyset )=1-P(S)=0}$

${\displaystyle P(A)=1}$

${\displaystyle P(A^{c})=1-P(A)}$

If ${\displaystyle A\subset B}$ then ${\displaystyle P(A)\leq P(B)}$

The size of the set is directly related to the probability...

Another way to do this is using measure theory (another route, besides rigorous set theory, that leads to probability theory)

Bonferroni's inequality: ${\displaystyle P(A\bigcap B)\geq P(A)+P(B)-1}$

### Classical Definition of Probability (Laplace, 1812)

"If a random experiment can result in ${\displaystyle N}$ mutually exclusive and equally likely outcomes and if ${\displaystyle N_{A}}$ of these outcomes result in the occurrence of the event ${\displaystyle A}$, the probability of ${\displaystyle A}$ is defined by ${\displaystyle P(A)=P{A}={N_{A} \over N}}$."

Example: rolling a dice

Event A might be how many times we roll a 1... or how many times we roll a 1 or a 2...

What if one side of the dice is weighted to favor 5? This definition doesn't work... No mathematical proof to show that the outcomes were mutually exclusive and equally likely.

### Frequency

This is the limit, as the number of experimental trials performed (trials must be performed under "identical" conditions) goes to infinity, of the number of outcomes of the event of interest ${\displaystyle N_{A}}$:

${\displaystyle P(A)=lim_{n\rightarrow \infty }{N_{A} \over N}}$

Limitations:

• can never actually perform an infinite number of trials
• what does "identical" mean? e.g. if you're performing a turbulence experiment, how can you initialize everthing the exact same way?
• (Sean): whatever it is, it's not finite

Probability can be seen as lack of information (e.g. fluid mechanics is deterministic, so we could describe it if we know the state perfectly - we use probability to fill in/make up for the lack of knowledge)

Quantum theory: in two-split experiment, the very state of nature is random and needs to be defined using probability

Probability of an outcome in the future: judging confidence based on prior experience... statement of confidence

Bayesian vs. fequentist

Side discussion:

It provides a rigorous mathematical framework, removing bias/preference

But, when you get a result, you can't necessarily specify the meaning

# October 11, 2010

## Derivation of Bonferoni's Inequality

Show:

${\displaystyle P(A\bigcap B)\leq P(A)+P(B)-1}$

Proof:

${\displaystyle P(A\bigcup B)=P(A)+P(B)-P(A\bigcap B)P(A\bigcap B)=P(A)+P(B)-P(A\bigcup B)}$

But in general,

${\displaystyle P(A\bigcup B)\leq 1}$

Plugging this back in,

${\displaystyle P(A\bigcap B)\leq P(A)+P(B)-1}$

On Wikipedia: more general case; more than two sets

## Conditional Probability and Bayes' Rule

if ${\displaystyle A,B\in S}$, and ${\displaystyle P(B)\neq 0}$,

${\displaystyle P(A|B)={\frac {P(A\bigcap B)}{P(B)}}}$

And as a result, we get Bayes' Rule:

${\displaystyle P(A|B)=P(B|A){\frac {P(A)}{P(B)}}}$

Derivation:

${\displaystyle {\frac {P(A)}{P(B)}}\times P(B|A)={\frac {P(B\bigcap A)}{P(A)}}={\frac {P(A\bigcap B)}{P(A)}}\times {\frac {P(A)}{P(B)}}=P(A|B)}$

Example application of conditional probability:

Run a combustion simulation... "Given that the temperature is in range X, what is the concentration range?"

## Statistical Independence

Definition: ${\displaystyle P(A\bigcap B)=P(A)*P(B)}$

Consequences:

${\displaystyle P(A|B)=P(A)}$

## Random Variable

A random variable is a mapping from a sample space to real numbers.

Example: Dice roll

Mapping rolls to a set ${\displaystyle {1,2,3,4,5,6}}$

Example: Morse code

Looking at statistics of morse code...

Mapping dots and dashes to ${\displaystyle {0,1}}$ (or alternatively ${\displaystyle {1,2}}$)

IMPORTANT: Sample space is different from the random variable

## Induced Probability Function

Let ${\displaystyle P(B)}$ for event B ${\displaystyle B\in {\mathfrak {B}}}$ on ${\displaystyle S}$, outcome ${\displaystyle S_{i}}$

(e.g. there's a sample space, and in the sample space there are events...

Before, we were talking about probability of events. Now, we're talking about probability of a random variable)

Random variable ${\displaystyle X(s)}$, random variable realization ${\displaystyle \chi }$, ${\displaystyle A\subset \chi }$

${\displaystyle P_{X}(X\in A)=P{S_{i}\in S:X(S_{i})\in A}}$

${\displaystyle S_{i}}$ are the outcomes that are in B

## Cumulative distribution function

Definition:

${\displaystyle F_{X}(x)=P_{X}(X\leq x)\forall x}$

Example: Dice roll

Probability of rolling a given number is constant (1/6)

Cumulative distribution function is a line, because for x=1, cumulative probability is 1/6; for x=2, cumulative probability is 2/6; and so on.

This definition is more general than the integral definition, because in general you need a cumulative distribution function that is differentiable

Sometimes there will be situations where a probability distribution function can't be defined, and only a cumulative distribution function can be defined

${\displaystyle F_{X}\geq 0}$

Further information:

${\displaystyle \displaystyle {\lim _{x\rightarrow -\infty }}=0}$

${\displaystyle \displaystyle {\lim _{x\rightarrow +\infty }}=1}$

## Example

Given 5% of men are colorblind, and 0.25% of women are colorblind: if a person is chosen at random and they are colorblind, what is the probability of their gender?

{\displaystyle {\begin{aligned}P(CB|M)&=&0.05\\P(CB|W)&=&0.0025\\P(M|CB)&=&?\end{aligned}}}

${\displaystyle P(M|CB)={\frac {P(M\bigcap CB)}{P(CB)}}={\frac {P(CB|M)P(M)}{P(CB)}}={\frac {(0.05)(0.50)}{P(M)P(CB|M)+P(CB|W)P(W)}}=0.952}$

## Identically Distributed

For two random variables ${\displaystyle X,Y}$, and an event ${\displaystyle A}$: they are identically distributed if ${\displaystyle P(X\in A)=P(Y\in A)}$

We have an experiment, which we run a trial of, and we get an outcome. If the probability of that outcome is the same, the two outcomes are identically distributed.

The actual values of ${\displaystyle X,Y}$ are not important. e.g., probability of rolling a 2 on a dice is the same as rolling a 4 on a dice, so they are identically distributed, even thought 2 and 4 are not equal.

## Probability Mass Function, Probability Density Function

Difference: one's continuous, one's discrete

Probability Mass Function (PMF): ${\displaystyle f_{X}(x)=P(X=x)}$

• Discrete cases only

Probability Density Function (PDF): ${\displaystyle f_{X}(x)={\frac {d}{dx}}F_{X}(x)}$

• Continuous cases only

where ${\displaystyle F_{X}}$ is the cumulative distribution function:

${\displaystyle F_{X}(x)=\displaystyle {\int _{-\infty }^{x}f_{X}(x')dx'}}$

Given properties of the CDF, what are the properties of the PDF?

• ${\displaystyle \displaystyle {\int _{-\infty }^{\infty }f_{X}(x)dx}=1}$
• If CDF is monotonically increasing, analogous property for PDF is ${\displaystyle f_{X}(x)\geq 0}$

Above two properties are necessary and sufficient conditions for a function to be considered a PDF.

Further properties:

• ${\displaystyle P(a\leq X\leq b)=\displaystyle {\int _{a}^{b}f_{X}(x)dx}=F_{X}(b)-F_{X}(a)}$

## Example

Assume ${\displaystyle \lambda >0}$ is a fixed positive constant

define function:

${\displaystyle f(x)={\begin{cases}1/2\lambda \exp(-\lambda x)&x\geq 0\\1/2\lambda \exp(\lambda x)&x<0\end{cases}}}$

### Part a

What is the pdf of ${\displaystyle f(x)}$?

${\displaystyle f(x)\geq 0\qquad \forall x}$

{\displaystyle {\begin{aligned}\int _{-\infty }^{+\infty }f(x)dx&=&\int _{-\infty }^{0}f(x)dx+\int _{0}^{\infty }f(x)dx\\&=&{\frac {1}{2}}\lambda {\frac {1}{\lambda }}\exp(\lambda x)\vert _{-\infty }^{0}+{\frac {1}{2}}\lambda (-{\frac {1}{\lambda }})\exp(-\lambda x)\vert _{0}^{+\infty }\\&=&1\end{aligned}}}

### Part b

Find probability that a random variable x is less than t, e.g. ${\displaystyle P(x

${\displaystyle P(x

For this one, you have to integrate twice.

${\displaystyle \int _{-\infty }^{t}f(x)dx={\begin{cases}{\frac {1}{2}}\exp(\lambda t)&t<0\\1-{1}{2}\exp(-\lambda t)&t>0\end{cases}}}$

Another name for this is the cumulative distribution function.

## Expectation

Definition:

${\displaystyle E(g(x))=\displaystyle {\int _{-\infty }^{+\infty }g(x)f_{X}(x)dx}}$

Linearity:

${\displaystyle E(ag_{1}(X)+bg_{2}(X)+c)=aE(g_{1}(X))+bE(g_{2}(X))+c}$

Positivity:

If the function ${\displaystyle g(x)>0\forall x}$, then ${\displaystyle E(g(X))>0}$

If ${\displaystyle g_{1}(x)>g_{2}(x)\forall x}$, then ${\displaystyle E(g_{1}(X))>E(g_{2}(X))}$

Moments:

nth moment ${\displaystyle \mu _{n}=E(X^{n})}$

Central moments:

nth central moment ${\displaystyle \mu _{n}^{\prime }=E((X-\mu _{1})^{n})}$

2nd central moment: variance

## Moment Generating Function (MGF)

${\displaystyle M_{X}(t)=E(\exp(tX))}$

If you're looking at ${\displaystyle M(-t)}$, it's a Laplace transform. If it's ${\displaystyle M(-it)}$, it's a Fourier transform.

{\displaystyle {\begin{aligned}M_{X}(t)&=&\int _{-\infty }^{+\infty }\exp(tx)f_{X}(x)dx\\&=&\int _{-\infty }^{+\infty }(1+tx+{\frac {t^{2}x^{2}}{2!}}+{\frac {t^{3}x^{3}}{3!}}+...)f_{X}(x)dx\\&=&\mu _{0}+t\mu _{1}+{\frac {t^{2}}{2!}}\mu _{2}+...\\\mu _{n}&=&M_{X}^{(n)}(0)\end{aligned}}}

So knowing all the moments is equivalent to knowing the PDF.

# October 14, 2010

Bernoulli Trial - two outcomes, known probability for each (e.g. heads or tails, or picking black and white marbles out of an urn)

Binomial distribution - probability of k successes in n Bernoulli trials

Normal distribution (and central limit theorem) - the sum of a bunch of random variables with same mean and variance approaches a Gaussian distribution

When doing an experiment - if there are a whole bunch of causes of error, all the errors add up, and you can expect a normal (Gaussian) distribution

# October 18, 2010

## Example 1: Expectation, CDF

Let x be a continuous non-negative random variable

Let ${\displaystyle f}$ denote the PDF

${\displaystyle f(x)=0}$ for ${\displaystyle x<0}$

Show that ${\displaystyle E(X)=\displaystyle {\int _{0}^{\infty }\left(1-F_{X}(x)\right)dx}}$

${\displaystyle x=\int _{0}^{x}1dx'}$

Next, using definition of expectation... substitute this into the definition of the expectation.

(There's a problem - going from this step to the next step)

${\displaystyle E(X)=\int _{x'=0}^{x'=\infty }\left[\int _{x=x'}^{x=\infty }f(x)dx\right]dx'-\int _{x'=0}^{x'=\infty }\left[\int _{x=0}^{x=x'}f(x)dx\right]dx'}$

where the first quantity in square brackets is 1, and the second quantity in square brackets is the CDF of ${\displaystyle x'}$.

${\displaystyle =\int _{0}^{\infty }1dx'=\int _{0}^{\infty }F_{X}(x')dx}$

${\displaystyle =\int _{0}^{\infty }(1-F_{X})dx}$

## Example 2: Choosing Keys

A man has a set of N keys. He wants to open his door, which will open with exactly 1 key, but he doesn't know which one, and he is trying keys at random.

### Part A

Find the mean number of trial attempts.

Use a negative binomial: http://en.wikipedia.org/wiki/Negative_binomial_distribution

Specifically, use a geometric distribution: http://en.wikipedia.org/wiki/Geometric_distribution

So we know that the expectation of the geometric distribution is:

${\displaystyle E(X)={\frac {1}{p}}}$

where ${\displaystyle p}$ is the probability of success in the Bernoulli trial,

${\displaystyle p={\frac {1}{n}}}$

So that the mean number of trial attempts is:

${\displaystyle E(X)=n}$

### Part B

What if there is no replacement?

With no attempts,

${\displaystyle P(X=0)=0}$

After the first attempt,

${\displaystyle P(X=1)={\frac {1}{n}}}$

After the second attempt,

${\displaystyle P(X=2)={\frac {(n-1)}{n(n-1)}}}$

And the third attempt,

${\displaystyle P(X=3)={\frac {(n-1)(n-2)}{n(n-1)(n-2)}}}$

And so on. Each time, all terms cancel out except

${\displaystyle P(X=x)={\frac {1}{n}}}$

So we can take the expectation of that:

${\displaystyle E(X)=\displaystyle {\sum _{x=1}^{n}}{\frac {x}{n}}}$

And using the formula for the first ${\displaystyle n}$ counting numbers,

${\displaystyle E(X)={\frac {1}{n}}{\frac {n(n+1)}{2}}}$

${\displaystyle E(X)={\frac {n+1}{2}}}$

## Multivariate

Set theory

Moved into random variables (mapping from event space to the real numbers)

Now we want to do a new type of mapping into multiple random variables

n-dimensional random vector - a mapping from a sample space into ${\displaystyle \mathbf {R} ^{n}}$ Euclidian space.

Joint Probability Mass Function: ${\displaystyle f_{X,Y,\dots }(x,y,\dots )=P(X=x,Y=y,\dots )}$

Joint Probability Density Function: ${\displaystyle P({X,Y,\dots \in A})=\int _{A}\dots \int f_{X,Y,\dots }(x,y,\dots )dxdy\dots }$

Joint Cumulative Distribution Function: ${\displaystyle P(X\leq x,Y\leq y,\dots )=F_{X,Y,\dots }(x,y,\dots )=\int _{0}^{x}\dots \int _{0}^{y}f_{X,Y,\dots }(x,y,\dots )dxdy\dots }$

Question: Why is joint PDF defined in terms of P, whereas the univariate PDF is defined in terms of the CDF?

Answer: Boundaries of multivariate PDFs are often non-trivial, and are not nice even "rectangles"... You need to know the boundaries of the PDF really well to use the CDF, so the joint CDF is not used as often.

Joint Conditional PDF: ${\displaystyle f_{X|Y}(x|y)=P(X=x|Y=y)={\frac {f_{X,Y}(x,y)}{f_{Y}(y)}}}$

The conditional PDF is just a renormalization.

But how is ${\displaystyle f_{Y}(y)}$ defined, if it's a multivariate PDF?

${\displaystyle f_{Y}(y)=\int _{x=-\infty }^{\infty }f_{X,Y}(x,y)dx}$

This is the marginal PDF...

Marginal PDF: ${\displaystyle f_{X}(x)=\int _{Y}\dots \int _{Z}f_{X,Y,\dots ,Z}(x,y,\dots ,z)dz\dots dy}$

Definition of independence of ${\displaystyle X}$ and ${\displaystyle Y}$: ${\displaystyle f_{X,Y}(x,y)=f_{X}(x)f_{Y}(y)}$

• ${\displaystyle P({X\in A,Y\in B})=P({X\in A})*P({Y\in B})}$
• ${\displaystyle E(g(X)h(Y))=E(g(X))*E(h(Y))}$
• If ${\displaystyle Z=X+Y}$, then the moment generating function of ${\displaystyle Z}$, ${\displaystyle M_{Z}(t)=M_{X}(t)*M_{Y}(t)}$
• This was used in deriving Central Limit Theorem

${\displaystyle Z=X+Y~Norm(\mu {x}+\mu {y},\sigma _{x}^{2}+\sigma _{y}^{2})}$

${\displaystyle X~Norm(\mu _{x},\sigma _{x}^{2})}$

${\displaystyle Y~Norm(\mu _{y},\sigma _{y}^{2})}$

${\displaystyle E(X)=E(E(X|Y))}$

Define a new variable: covariance

Covariance: ${\displaystyle Cov(X,Y)=E((X-\mu _{x})(Y-\mu _{y}))=E(XY)-\mu _{X}\mu _{Y}}$

Correlation: ${\displaystyle \rho _{XY}={\frac {Cov(X,Y)}{\sigma _{X}\sigma _{Y}}}}$

Note: Just because the covariance is 0 does not mean that ${\displaystyle X}$ and ${\displaystyle Y}$ are independent, i.e. it doesn't imply ${\displaystyle E(XY)=E(X)E(Y)}$

### Bivariate Normal Distribution

• Means ${\displaystyle \mu _{X},\mu _{Y}}$
• Variances ${\displaystyle \sigma _{X}^{2},\sigma _{Y}^{2}}$
• Correlation ${\displaystyle \rho }$

${\displaystyle f_{X,Y}(x,y)=\displaystyle {\frac {\exp {{\frac {-1}{2(1-\rho ^{2})}}\left[\left({\frac {x-\mu _{x}}{\sigma _{x}}}\right)-2\rho \left({\frac {x-\mu _{x}}{\sigma _{x}}}\right)\left({\frac {y-\mu _{y}}{\sigma _{y}}}\right)+\left({\frac {y-\mu _{y}}{\sigma _{y}}}\right)^{2}\right]}}{2\pi \sigma _{x}\sigma _{y}{\sqrt {1-\rho ^{2}}}}}}$

### Transform of a PDF

${\displaystyle {\overrightarrow {X}},f_{\overrightarrow {X}}({\overrightarrow {x}})}$

${\displaystyle {\overrightarrow {U}}\rightarrow U_{1}=g_{1}({\overrightarrow {X}}),U_{2}=g_{2}({\overrightarrow {X}}),\dots }$

${\displaystyle h=g^{-1}}$

${\displaystyle J=det\left(\left[{\frac {\partial h_{i}}{\partial u_{j}}}\right]_{i,j}\right)}$

The transformed PDF is:

${\displaystyle f_{\overrightarrow {U}}({\overrightarrow {u}})=f_{x}\left[h_{1}({\overrightarrow {u}}),h_{2}({\overrightarrow {u}}),\dots \right]\cdot \vert J\vert }$

## Multivariate Example 1

X and Y have the distribution:

 X 1 2 3 Y 2 ${\displaystyle {\frac {1}{12}}}$ ${\displaystyle {\frac {1}{6}}}$ ${\displaystyle {\frac {1}{12}}}$ 3 ${\displaystyle {\frac {1}{6}}}$ ${\displaystyle 0}$ ${\displaystyle {\frac {1}{6}}}$ 4 ${\displaystyle 0}$ ${\displaystyle {\frac {1}{3}}}$ ${\displaystyle 0}$

### Part A

Show that X and Y are not independent.

One way: show that the covariance is nonzero.

${\displaystyle E(XY)=\displaystyle {\sum _{i=1}^{3}\sum _{j=2}^{4}x_{i}y_{j}f_{X,Y}}}$

A more fundamental way: using the definition of independence

${\displaystyle f_{X,Y}(x,y)=?f_{X}(x)*f_{Y}(y)}$

So sum up each row/column and put it in a new row/column

 X 1 2 3 (sum) Y 2 ${\displaystyle {\frac {1}{12}}}$ ${\displaystyle {\frac {1}{6}}}$ ${\displaystyle {\frac {1}{12}}}$ ${\displaystyle {\frac {1}{3}}}$ 3 ${\displaystyle {\frac {1}{6}}}$ ${\displaystyle 0}$ ${\displaystyle {\frac {1}{6}}}$ ${\displaystyle {\frac {1}{3}}}$ 4 ${\displaystyle 0}$ ${\displaystyle {\frac {1}{3}}}$ ${\displaystyle 0}$ ${\displaystyle {\frac {1}{3}}}$ (sum) ${\displaystyle {\frac {1}{4}}}$ ${\displaystyle {\frac {1}{2}}}$ ${\displaystyle {\frac {1}{4}}}$

Then show that the product of the two marginal PDFs is not equal to the joint PDF value

i.e. pick row i and column j, and if the sum of the joint PDF across the whole row i, times the sum of the joint PDF across the whole column j, does not equal the joint PDF at location (row i col j), then we know the definition of independence is not met

### Part B

Give a probability table for random variables U and V with the same marginals as X and Y but are independent.

So, we want to keep the "sum" column and row. Then we want to multiply the sum for row i by the sum for column j,

${\displaystyle F_{U,V}=f_{U}*f_{V}}$

${\displaystyle f_{U}=f_{X};f_{V}=f_{Y}}$

U is a discrete binomial distribution

V is uniformly distributed

### Notes

If they're independent, they WILL have a zero covariance

(So it follows that, if the covariance is nonzero, there is no way they can be independent)

But, just because the covariance is zero doesn't mean they are independent

# October 21, 2010

## Review

Hypergeometric - out of n objects, picking k objects (bernoulli trials) without replacement, the probability that x of them are success

Binomial distribution - out of n objects, picking k objects (bernoulli trials) with replacement, the probability that x of them are success

Normal distribution - derived using Central Limit Theorem; central concept is, if you take an infinite number of random variables distributed with the same mean and variance, the sum of these infinite number becomes a normal distribution

Independence of random variables - the joint PDF is equal to the products of the marginal PDFs

Joint normal distribution - determinant of covariance matrix shows up

${\displaystyle \Sigma =\left[{\begin{array}{cc}\sigma _{X_{1}}&\sigma _{X_{1}X_{2}}\\\sigma _{X_{1}X_{2}}&\sigma _{X_{2}}\end{array}}\right]}$

If we then find the eigenvalues of this matrix, and use these as the covariance matrix (diagonal), then some ellipsoidal, skewed distribution would become a normal distribution composed of nice circles.

Also: can define ${\displaystyle Y=\Sigma ^{-1}[X-\mu ]}$ to center the distribution around the means.

What if you have a kidney-shaped distribution?

You can define a new variable ${\displaystyle Y}$, and use the covariance matrix, and get a "rotated" distribution, centered around the means, that's sort-of circular. But the kidney shape will still remain.

${\displaystyle \sigma _{Y_{j}Y_{i}}=0,i\neq j}$

Covariance (correlation) is 0, but the two variables are not independent. (i.e. using mathematical trick to make the variance 0, but the joint distribution is not equal to the product of the two marginal PDFs).

You cannot make the distribution fit into a circle, because then you're throwing away information that's important.

To first order, you may be able to approximate it as a joint-normal distribution. (But this is like approximating a human as a sphere).

If you have an ellipsoidal distribution that's extremely squished in one direction,

${\displaystyle X_{2}\approx g(X_{1})\approx aX_{1}}$

## Homework Problem 1

Let the number of chocolate chips in a certain type of cookie have a Poisson distribution. We want the probability that a randomly chosen cookie has at least two chocolate chips to be greater than 0.99. Find the smallest value of the mean of the distribution that ensures this probability.

Poisson distribution:

${\displaystyle P(X=x)={\frac {\lambda ^{x}e^{-\lambda }}{x!}}}$

The question is asking for: ${\displaystyle P({X\geq 2})>0.99}$

Rewriting using a less-than sign: ${\displaystyle P({X<2})<0.01}$

What is the value of ${\displaystyle \lambda }$ that satisfies

CDF: ${\displaystyle F(x)={\frac {\Gamma (x+1,\lambda )}{x!}}}$, where ${\displaystyle \lambda }$ is the mean and ${\displaystyle \Gamma }$ is the incomplete Gamma function

We want to plug 2 into the CDF, set it equal to ${\displaystyle 0.01}$, and do a nonlinear solve to find values of ${\displaystyle \lambda }$

We know ${\displaystyle x<2}$, so it can be 0 or 1, and plugging this into expression for Poisson distribution:

${\displaystyle {\frac {\exp {(-\lambda )}\lambda ^{0}}{0!}}+{\frac {\exp {(-\lambda )}\lambda ^{1}}{1!}}<0.01}$

(replace the ${\displaystyle <}$ sign with an ${\displaystyle =}$ sign... and solve for ${\displaystyle \lambda }$...)

${\displaystyle \lambda =6.638}$

## Homework 2

Two movie theaters compete for the business of one thousand customers. Assume that each customer chooses between the movie theaters independently and with indifference (p=1/2). Find and expression for N, the number of seats in your theater, that will result in the probability of turning away a customer (due to filling the seats) being less than one percent. First use the discrete distribution and then use the continuous approximation.

Problem is asking for N, such that ${\displaystyle P({K>N})<0.01}$

Binomial distribution: "What is the probability that n identical but independent bernoulli trials result in k successes?"

• Are we doing this with replacement or not?
• P stays the same - probability is 1/2 for each binomial trials (whether someone picks our movie theater or not)
• So that's like having replacement

${\displaystyle K\sim Binomial(n=1000,p=0.5)=\left({\begin{array}{c}n\\k\end{array}}\right)p^{k}(1-p)^{n-k}}$

Want the probability of everything under the curve, for ${\displaystyle K>N}$:

For the CDF: since it is discrete, the actual value will fall somewhere between two discrete values. Which one do we use?

• we want to pick the one to the right - to make sure we have an extra seat

Using binomial distribution web app, n=1000, p=0.5: plots PDF and CDF)

Number of seats: 537 (makes sense - half of 1000 is 500, and if it's a random night,

Part 2:

How do we do this with the normal (continuous) distribution? How would d'Alembert do this?

## Homework 3

For the joint pdf ${\displaystyle f_{X,Y}(x,y)=c(x+2y)}$ over ${\displaystyle 0 and ${\displaystyle 0 (the pdf is zero elsewhere), find the coefficient c.

Also, find the joint CDF and the two marginal PDFs.

First part: The integral over the entire domain must be 1. ${\displaystyle c={\frac {1}{4}}}$

Second part:

${\displaystyle F_{X,Y}(x,y)=}$

{\displaystyle {\begin{aligned}{\frac {1}{4}}xy(x+y)&\dots &01\\0&\dots &elsewhere\end{aligned}}}

Challenge: define a new variable ${\displaystyle z={\frac {9}{(X+1)^{2}}}}$, and find the marginal PDF of z.

## Homework 4

For two independent random variables X and Y with moment generating functions ${\displaystyle M_{X}(t)}$ and M_Y(t), show that the sum of these variables, Z = X+ Y, has a moment generating function ${\displaystyle M_{Z}(t)=M_{X}(t)M_{Y}(t)}$.

Suggestion: if you first show that for independent variables ${\displaystyle E(g(X)h(Y))=E(g(X))E(h(Y))}$ then you can use the "cool" way of writing the moment generating function to give this proof in about four steps.

Given: definition of independence

${\displaystyle f_{X,Y}(x,y)=f_{X}(x)f_{Y}(y)}$

${\displaystyle E(g(X)h(Y))=\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }f_{X,Y}(x,y)g(X)h(Y)dx}$

since ${\displaystyle f_{X,Y}(x,y)=f_{X}(x)f_{Y}(y)}$

${\displaystyle E(g(X)h(Y))=\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }f_{X}f_{Y}g(X)h(Y)=\int _{-\infty }^{\infty }f_{X}g(X)dx\int _{-\infty }^{\infty }f_{Y}h(Y)dy=E(g(X))E(h(Y))}$

Now, let's look at two particular functions for g and h:

Suppose ${\displaystyle g(X)=\exp {(tX)}}$ and ${\displaystyle h(Y)=\exp {(tY)}}$

${\displaystyle E(\exp {(tX))}E(\exp {(tY)})=E(\exp {(tX)}\exp {(tY)})=E(\exp {(t(X+Y))})=E(\exp {(tZ)})=M_{Z}(t)}$

# October 25, 2010

## Conditional Expectation

${\displaystyle \langle g(X)\vert Y\rangle =\displaystyle {\int _{-\infty }^{\infty }g(x)f_{X,Y}dx=\int _{-\infty }^{\infty }g(x){\frac {f_{X,Y}}{f_{Y}}}dx={\frac {1}{f_{Y}}}\int _{-\infty }^{\infty }g(x)f_{X,Y}dx}}$

This is also denoted as ${\displaystyle E(g(X)\vert Y)}$. Also, ${\displaystyle Y}$ is supposed to be an event, not just a variable, that you are conditioning on (all of this is built up from set theory).

${\displaystyle E(g(X)\vert Y=a)=\langle g(X)\vert Y=a\rangle }$

## Stochastic Processes

Sean's experience: intimidating topic, due to the approach of most professionals being one of rigor.

Want to dispel this: from what we've covered, we already know everything we need to know

Stochastic process - just like a random variable, but slightly more generalized

Random variable / trials / experiments:

We will allow an experimental trial to result in a family of outcomes, parameterized by a variable (universally denoted as t)

Now you can create a mapping, and the stochastic processes is the result of the mapping

${\displaystyle X(t)}$

When we substitute in a random variable, e.g. ${\displaystyle t_{1}}$, this becomes a random variable.

So ${\displaystyle X(t)}$ is the family of outcomes, parameterized by ${\displaystyle t}$

Example: six random clock digits (e.g. ${\displaystyle \mathbf {7,3,6,1,2,0} }$; we push a button, the numbers all change

• one approach: treat this as one large number
• another approach: each number is random, and can find a joint PDF between them
• stochastic process approach: assign a t value to each digit
• ${\displaystyle t=0,1,2,3,4,5}$ - one for each digit
• ${\displaystyle X(t=0)}$ is the family of outcomes for the first digit
• Set theory: mapping from the digits that show up, to the random variable ${\displaystyle X}$

Sample space: ${\displaystyle S={\mathbf {0,1,2,3,4,5,6,7,8,9} }}$ (possible values that our clock digits can take on)

Random variable: ${\displaystyle X={0,1,2,3,4,5,6,7,8,9}}$

The interesting fact is, there may be a sequence, so that they all depend on one another.

### Shower Example

Water hits the wall of the shower, runs down in serpentines

Random paths that jump around along the wall

One experiment: a snapshot of the serpentine, and it's particular path.

The coordinate of length down the shower is ${\displaystyle t}$

The coordinate of horiz. displacement is ${\displaystyle X(t)}$

Can look at ${\displaystyle f_{X(t_{n}),X(t_{m})}}$, or ${\displaystyle f_{X(t_{1})\vert X(t_{0})}}$, etc.

Important to maintain that we have a parameter ${\displaystyle t}$, because for a given experiment, there is (or may be) some connection between ${\displaystyle X(t)}$ for all of the t's

e.g. for the serpentines - we know the path a serpentine takes follows some pattern (because it creates some curve)

### Stock Market Example

Random variable: value of stock

Stock is only dependent on how much someone is willing to pay for it. But we can only know the price of the stock when there is a transaction.

So actually the stock price is a set of steps - a piecewise, not a continuous, function

### Types of Stochastic Processes

A single realization of a stochastic process (a single realization of ${\displaystyle X(t)}$) can be:

• Continuous/smooth
• Discontinuous
• Piecewise

### Thoughts

Each value of ${\displaystyle t}$ can have a separate probability distribution

And we can have ${\displaystyle X(t)}$, and ${\displaystyle Y(t)}$, and ${\displaystyle Z(t)}$, etc.

Recall: frequentist

If we had a perfect flow machine, and a perfect experimental instrument... and running a turbulent flow experiment

Turbulent experiment is a stochastic process

We run the experiment, and we measure the velocity ${\displaystyle u,v,w}$ as a function of time.

Velocity is smooth and continuous, and may be related by some physics that we know

We run the experiment over and over and over again to get statistics.

Maybe we look at the velocity at another point...

Or maybe we look at it EVERYWHERE

So then we have ${\displaystyle x,y,z,t}$ as stochastic parameters - MULTIPLE stochastic process parameters

The value at a certain point ${\displaystyle u(x,y,z,t)}$ is a random variable - parameterized on ${\displaystyle x,y,z,t}$

Distinction: ensemble average vs. time average

• When we run 10 experiments, by gathering velocity data at a certain point
• Averaging over time for a single experiment, is different from averaging over the 10 experimental values for a given t

### U, V Velocity Example

Continuing with the flow experiment...

Looking at ${\displaystyle f_{U(t_{1}),U(t_{2})}}$ and their correlation ${\displaystyle \rho _{U(t_{1}),U(t_{2})}}$

The correlation drops from 1 to 0 as time goes on

This is true of all turbulent velocity fields, due to the strong dependence on initial conditions

The correlation curve has to be continuous, since the velocity field is continuous and smooth in time.

Timescale it takes the correlation to go to zero: wikipedia:Lyapunov exponent (amount of time it takes for two curves to become completely uncorrelated)

Turbulence: tradeoff between strong correlation (due to direction-change by eddies), which will go from +1 to negative, and the decaying exponential

## Markov Processes and Bernoulli Processes

We have a Bernoulli trial (outcome is 0 or 1), for a bunch of experiments.

The outcome ${\displaystyle X(t)}$ (where ${\displaystyle t}$ is the experiment number) is either 0 or 1 - but it is like the clock example given earlier, because each of the experiments is independent:

${\displaystyle f_{X(t_{1})\vert X(t_{0})}=f_{X(t_{1})}}$

Markov process - the PDF at some time parameter, conditioned on all of the previous times, is only dependent on the previous time

${\displaystyle f_{X(t_{n+1})\vert X(t_{n}),X(t_{n-1}),X(t_{n-2}),\dots }=f_{X(t_{n+1})\vert X(t_{n})}}$

Markov chain: each link in the chain is only connected to the previous link

### Examples:

Card games: cards represent a memory of the past moves (NOT a Markov process)

Chutes and Ladders: where you end up next depends ONLY on your current location and what you roll on the dice

Following are some examples of subsets of Markov processes. Each person made a set of assumptions, and showed that the result had some cool properties. No information is given about what they proved... just some nomenclature so we're familiar with it.

### Martingale Process

This is similar to a Bernoulli process, but it adds up - you add up the

${\displaystyle X(t+1)=X(t)+B}$

where ${\displaystyle B}$ is a distributed Bernoulli trial, either -1 or 1, with some probability (0.5).

So if we take the expectation of B, it's 0 - it could be 1, or it could be -1.

${\displaystyle \langle X(n+1)\rangle =X(n)}$

### Levy Process

Is a Markov proces...

Condition 1: ${\displaystyle X(t=0)=0}$

Condition 2: ${\displaystyle X(t_{n})-X(t_{n-1})}$ are disjoint (independent), for all ${\displaystyle n}$

Condition 3:

Example (to clarify)...

#### Wiener Process

Fits within Levy processes

${\displaystyle X(t_{n+1})=X(t_{n})+{\sqrt {\delta ^{2}dt}}N_{t}^{t+dt}(0,1)}$

where ${\displaystyle N_{t}^{t+1}}$ is a transition probability - transitioning from ${\displaystyle t}$ to ${\displaystyle t+dt}$

This is an initial value problem (think explicit Euler...)

Can get the next value from the current value PLUS the RHS

C++ random number generator --> normally-distributed number, mean 0, standard deviation 1: that's ${\displaystyle N_{t}^{t+dt}}$.

N is a value, but its value is distributed normally. A value comes out, we multiply it by ${\displaystyle {\sqrt {\delta ^{2}dt}}}$, and add it to our current value ${\displaystyle X(t_{n})}$ to get the next value.

So this means our distribution will be discontinuous (due to random number).

Question: can we shrink ${\displaystyle dt}$ small enough that our function is continuous?

For Euler method, this works fine:

${\displaystyle \lim _{\Delta t\rightarrow 0}{\frac {X(t_{n+1})-X(t_{n})}{\Delta t}}=F(x)}$

and we get a derivative,

${\displaystyle {\frac {dX}{dt}}=F}$

But now we have

${\displaystyle \lim _{\Delta t\rightarrow 0}{\frac {X(t_{n+1})-X(t_{n})}{\Delta t}}={\frac {1}{\sqrt {(\Delta t)}}}F(x)}$

and so as ${\displaystyle \Delta t}$ goes to zero, the RHS goes to infinity

We can't do a derivative of this, so calculus becomes difficult on these stochastic processes

This one is not really continuous

But we still may be able to do calculus, because there's still an area under the curve

Probability: may use more generalized definitions of a limit

e.g. aren't looking at single realization values of ${\displaystyle X}$ - if we're looking at the PDF at two points, we can say there is a limit in the PDF

${\displaystyle \lim _{\Delta t\rightarrow 0}{\frac {f_{X(t_{n+1})}-f_{X(t_{n})}}{\Delta t}}}$

There are four different probability limits that can be defined, and you can start doing calculus

Ito calculus, Strotanovich calculus, stochastic calculus, etc. - all go down the field of "not discrete, so need to define a new calculus"

But we're always dealing with smooth and continuous processes, so we won't go down that road

${\displaystyle {\begin{array}{l}X(t=0)=1\\X(t=1)=1+N\sim Normal(1,1)X(t=2)=X(t=1)+N\sim Normal+Normal\end{array}}}$

So you always have a normally-distributed process, but with increasing variance

Alternative definition of Markov process:

${\displaystyle X(t_{n+1})=X(t_{n})+g(X(t),dt)}$

If your function ${\displaystyle g}$ is normally distributed, with the same mean and variance, Central Limit Theorem tells you ${\displaystyle X(t)}$ will be normally distributed

Example of Wiener process:

Einstein's Brownian Motion Paper (1905)

3 papers:

• Brownian motion
• photoelectric effect
• special relativity

Pollen particle in water - randomly moving around, being bumped to the left, bumped to the right

Considered the first directly observable evidence of kinetic theory

#### Ornstein-Uhlenbeck Process

Also a Levy process

${\displaystyle X(t_{n+1})=X(t_{n})-\gamma X(t_{n})dt+{\sqrt {\beta ^{2}dt}}N_{t}^{t+dt}(0,1)}$

Second term on RHS is like an advection term

Third term is a random term like the one in the Wiener process

Example of Ornstein-Uhlenbeck process:

Langevin's Brownian Motion - let's let the position of a Brownian particle be goverened by Newton's second law

Have two variables: ${\displaystyle X}$ and ${\displaystyle V}$, where the position ${\displaystyle X}$ is continuous, and a velocity ${\displaystyle V}$ which is a Wiener process

Langevin considered this to be more physically sensible - because particle position isn't discontinuous

#### Poisson Process

Like a Bernoulli process, but we're going to

${\displaystyle X(t_{n+1})=X(t_{n})+1}$

${\displaystyle \Delta t\sim Poisson(\lambda )}$

The dt has a certain distribution - as opposed to the Wiener process, where we have an expression in terms of dt

So the y-value (variable ${\displaystyle X}$) is uniformly distributed (well, uniform - everything is 1)

But the x-axis (variable ${\displaystyle t}$) jumps are Poisson-distributed

Examples:

• Telephone calls arriving at a switchboard
• Page view request at web site

Things that, over a certain interval, are uniformly distributed

### Random Walk Processes

Depending on the conditions on your steps, you end up with different types of random walks

e.g. if your steps are normally distributed, you have a Wiener random walk

if your steps are Bernoulli steps, it is a Martingale random walk

etc...

But ALL are Markov processes

# October 28, 2010

(Missed some...)

Wiener process - distributed randomly about ${\displaystyle X_{0}}$

We can get statistics from a Wiener process:

• Means ${\displaystyle \mu _{X_{n}}}$ and ${\displaystyle \mu _{X_{n+1}}}$
• Variances ${\displaystyle \sigma _{X_{n}}}$ and ${\displaystyle \sigma _{X_{n+1}}}$
• Correlation ${\displaystyle \rho _{X_{n},X_{n+1}}}$ (how narrow the 2-D joint PDF surface is)

## Wiener Process Statistics

${\displaystyle X_{n+1}=X_{n}+{\sqrt {\delta ^{2}dt}}N(0,1)}$

where ${\displaystyle N(0,1)}$ is the normal distribution with mean 0 and variance 1

This can also be written as

${\displaystyle N(0,{\sqrt {\delta ^{2}dt}})}$

Property of normal distribution (see wikipedia:Normal distribution) - if we have ${\displaystyle X_{1}\sim Normal(\mu _{1},\sigma _{1})}$ and ${\displaystyle X_{2}\sim Normal(\mu _{2},\sigma _{2})}$, then for ${\displaystyle Y=aX_{1}+bX_{2}}$, ${\displaystyle Y\sim N(a\mu _{1}+b\mu _{2},a^{2}\sigma _{1}^{2}+b^{2}\sigma _{2}^{2})}$

Lemmons books:

${\displaystyle \displaystyle {\lim {at\leftarrow 0}X_{n+1}=X_{n}}}$

${\displaystyle \displaystyle {\lim {at\leftarrow 0}{\frac {X_{n+1}-X_{n}}{dt}}=\lim {at\leftarrow 0}{\sqrt {\frac {\delta ^{2}}{dt}}}N(0,1)}}$

which is NOT SMOOTH!

Then we can say

${\displaystyle X_{n+1}-X_{n}=(X_{n+1}-X_{n+{\frac {1}{2}}})+(X_{n+{\frac {1}{2}}}-X_{n})}$

${\displaystyle {\sqrt {\delta ^{2}dt}}N_{t}^{t+1}(0,1)={\sqrt {\delta ^{2}dt}}N_{t+{\frac {dt}{2}}}^{t+dt}(0,1)+{\sqrt {\delta ^{2}dt}}N_{t}^{t+{\frac {dt}{2}}}(0,1)}$

all the ${\displaystyle {\sqrt {\delta ^{2}dt}}}$ terms cancel out, and we get:

${\displaystyle N(0,1)=N(0,1)}$

which means the Wiener process is consistent (and independent of the dt selection)

Have a bunch of random processes, separated by intervals of ${\displaystyle dt}$, and construct a PDF

Definition of stochastic process: Set of random variables... performing a trial of an experiment... outcome is a set of random variables parameterized by t

${\displaystyle X(t)}$

When we put in a specific t (say ${\displaystyle t_{0}}$), we plug it in and get a particular value of ${\displaystyle X(t=t_{0})}$

So if we pick a value of t, we get a PDF for X at that t - e.g. ${\displaystyle f_{X(t_{5})}}$, or ${\displaystyle f_{X(t_{3})}}$, etc.

It would be great if we had the joint PDF, ${\displaystyle f_{X(t_{5}),X(t_{3})}}$, because then we can get the marginal PDF, the variances, the covariance, etc.

So what we've just shown is, no matter what our dt is, we always get the same PDF ${\displaystyle f_{X(t_{0})}}$ at a particular ${\displaystyle t_{0}}$

Wiener process is used more commonly because of this consistency

Analog for differential equations: if you have a differential equation, and you're integrating to a certain point in time, it doesn't matter if you take two timesteps or a thousand timesteps to get there, you will still get the same result.

Note: You can also get a similar consistency result for a Cauchy distribution, but because it doesn't have a finite variance, it isn't as useful

Now, using the method of moments,

${\displaystyle E(X_{n+1})=E(X_{n})+E\left({\sqrt {\delta ^{2}dt}}N_{n}^{n+1}(0,1)\right)}$

We can take constants out of the expectation operator, so the last term becomes:

${\displaystyle {\begin{array}{rcl}E\left({\sqrt {\delta ^{2}dt}}N_{n}^{n+1}(0,1)\right)&=&{\sqrt {\delta ^{2}dt}}E\left(N_{n}^{n+1}(0,1)\right)\\&=&0\end{array}}}$

Next, can write this as:

${\displaystyle {\frac {d}{dt}}E(X)=0}$

or alternatively,

${\displaystyle {\frac {d}{dt}}\langle X\rangle =0}$

We have an ODE for the first moment.

${\displaystyle {\begin{array}{rcl}{\frac {d}{dt}}Var(X)&=&{\frac {d}{dt}}\left(\langle X^{2}\rangle -\langle X\rangle ^{2}\right)\\&=&{\frac {d\langle X^{2}\rangle }{dt}}-2\langle X\rangle {\frac {d\langle X\rangle }{dt}}\\&=&{\frac {d\langle X^{2}\rangle }{dt}}\end{array}}}$

Next,

${\displaystyle {\begin{array}{rcl}X_{n+1}^{2}&=&\left[X_{n}+{\sqrt {\delta ^{2}dt}}N(0,1)\right]^{2}\\&=&X_{n}^{2}+2{\sqrt {\delta ^{2}dt}}X_{n}N_{t}^{t+dt}(0,1)+\delta ^{2}dt\left(N_{t}^{t+dt}(0,1)\right)^{2}\end{array}}}$

And taking the expectation of both sides:

${\displaystyle {\begin{array}{rcl}\langle X_{n+1}^{2}\rangle &=&\langle X_{n}^{2}\rangle +2{\sqrt {\delta ^{2}dt}}\langle X_{n}N_{t}^{t+dt}(0,1)\rangle +\delta ^{2}dt\langle \left(N_{t}^{t+dt}(0,1)\right)^{2}\rangle \end{array}}}$

For a Wiener process, the normal distribution ${\displaystyle N_{t}^{t+dt}}$ is added after ${\displaystyle X_{n}}$, and is independent of ${\displaystyle X_{n}}$ (however, ${\displaystyle X_{n+1}}$ is not independent of the normal distribution ${\displaystyle N_{t}^{dt}}$, because that normal distribution is used to obtain ${\displaystyle X_{n+1}}$)

So we can separate the expectation of these variables (because their joint DPF is equal to the product of their marginal PDFs), and the second expectation term becomes:

${\displaystyle \langle X_{n}N_{t}^{t+dt}\rangle =\langle X_{n}\rangle \times \langle N_{t}^{t+dt}\rangle }$

and the second term goes to 0, so that term goes away.

In the third expectation term, the expectation of the squared normal distribution ${\displaystyle \langle N_{t}^{t+dt}(0,1)^{2}\rangle }$ is NOT a normal distribution - for example, the squared normal distribution can never be negative.

wikipedia:Chi-square distribution is the product of normal distributions... has mean ${\displaystyle \mu =1}$... so the third expectation term goes to 1

Plugging in and simplifying yields

${\displaystyle {\frac {d\langle X^{2}\rangle }{dt}}={\frac {d}{dt}}Var(X)=\delta ^{2}}$

So the variance increases at a constant rate.

## Evolution of PDF in Time

Use successive substitution and same idea used before in finding that Wiener process independent of dt

${\displaystyle f_{x}(x;t)}$

Inspection:

${\displaystyle {\begin{array}{rcl}X(dt)&=&X(0)+{\sqrt {\delta ^{2}dt}}N_{0}^{dt}(0,1)\\X(2dt)&=&X(0)+N(0,\delta ^{2}(2dt))\\&\vdots &\\X(t)&=&X(0)+N(0,\delta ^{2}t)\end{array}}}$

This just says that as we advance in time, the mean of the distribution doesn't change, and the variance is linear in time, with coefficient ${\displaystyle \delta ^{2}}$.

## Einstein Paper

In Einstein's 1905 paper (see above for link), he finds the result:

${\displaystyle {\frac {\partial f_{X}}{\partial t}}={\frac {\delta ^{2}}{2}}{\frac {\delta ^{2}f_{X}}{dx^{2}}}}$

and he says this is the same as the heat equation, but for a distribution instead of a scalar:

${\displaystyle x\sim {\sqrt {Dt}}}$

The point being: there are three ways to get at the PDF:

• Method of moments (how the PDF evolves in time)
• Inspection (what we just did above)
• Einstein (the PDE of the PDF)

For the Wiener process, this is a lot easier than for other distributions - another 8 yrs for someone to do the same thing for the Wiener process with a drift term, e.g.

${\displaystyle X_{n+1}=X_{n}+{\sqrt {\delta ^{2}dt}}N(0,1)+Vdt}$

This is still going to be a Markov process, but is no longer a Martingale process... Adding that one extra term made it extremely difficult to derive the equivalent governing equation PDE, and took 8 years

When it was derived, it was called the wikipedia:Fokker-Planck equation

Point: it's powerful when you can go from a stochastic differential equation (e.g. definition of Wiener process; difficult to deal with) to a PDE (easier to deal with)

To generalize the process and mathematics required to go from a general stochastic differential equation to a PDE requires wikipedia:Ito calculus, and we're not going to go there

## Aside

Can take the joint PDF at two times,

${\displaystyle f_{X_{1},X_{2}}}$

and we can get the covariance ${\displaystyle Cov(X_{1},X_{2})}$ and the correlation function ${\displaystyle \rho _{X_{1},X_{2}}}$

We can find an expression for ${\displaystyle f_{X_{1},X_{2}}}$ and then use that to find the covariances and correlations.... or, we can find them directly from our stochastic differential equation

### Covariance

Definition of covariance is

${\displaystyle Cov(X,Y)=E((X-\langle X\rangle )(Y-\langle Y\rangle ))}$

so,

${\displaystyle Cov(X_{1},X_{2})=E\left((X_{1}-\langle X_{1}\rangle )(X_{2}-\langle X_{2}\rangle )\right)=E(X_{1}^{\prime }X_{2}^{\prime })}$

Now we can use the Wiener process stochastic differential equation to get

${\displaystyle Cov(X_{1},X_{2})=E\left((X_{1}^{\prime })^{2}+X_{1}^{\prime }N(0,\delta ^{2}dt)\right)}$

And we just did a couple of these operations above, so we get

${\displaystyle Cov(X_{1},X_{2})=\langle (X_{1}^{\prime })^{2}\rangle =\delta ^{2}t}$

### Correlation

Definition of correlation: ${\displaystyle Corr(X_{1},X_{2})={\frac {Cov(X_{1},X_{2})}{\sqrt {Var(X_{1})Var(X_{2})}}}}$

${\displaystyle \rho _{X_{1},X_{2}}={\frac {Cov(X_{1},X_{2})}{Var(X_{1})Var(X_{2})}}={\frac {\delta ^{2}t}{\delta ^{2}t\times \delta ^{2}(t+dt)}}={\sqrt {\frac {1}{1+{\frac {dt}{t}}}}}}$

When you plot this:

• Starts with a high correlation (starts at 1)
• It has a very long tail

Joint PDF: equal to the marginal PDF times the conditional PDF

${\displaystyle f_{X_{1},X_{2}}=f_{X_{1}}\times f_{X_{2}\vert X_{1}}}$

What is the conditional PDF?

We know the value of ${\displaystyle X_{1}}$ at some time... what's the probability of ${\displaystyle X_{2}}$ given ${\displaystyle X_{1}}$?

A couple of observations:

The value of X_2 is governed by the stochastic differential equation (the one that defines the Wiener process)

And we know that the Wiener process has consistency... so regardless of the timestep we take, the Wiener process stochastic differential equation will still hold

Meaning the relationship is one of:

${\displaystyle X_{n+1}=X_{n}+{\sqrt {\delta ^{2}dt}}N(0,1)}$

and this means that X_2 is related to X_1 by just adding a normal distribution... and that distribution has a variance ${\displaystyle \delta ^{2}t}$ and is added to ${\displaystyle X_{1}}$ (which meas it is a normal distribution with mean ${\displaystyle X_{1}}$)

${\displaystyle f_{X_{2}\vert X_{1}}=N(X_{1},\delta ^{2}t)}$

## Continuous and Smooth Realizations of a Continuous-Time Stochastic Process

Want to show both of these identities:

${\displaystyle \langle {\frac {\partial U}{\partial t}}\rangle ={\frac {\partial \langle U\rangle }{\partial t}}}$

and

${\displaystyle \langle {\frac {\partial Q(U)}{\partial t}}\rangle =\int _{-\infty }^{\infty }Q(u){\frac {\partial f_{U}(u;t)}{\partial t}}du}$

This will make it straightforward to derive PDF transport equations.

For the first:

${\displaystyle {\frac {\partial U}{\partial t}}=\lim _{t\leftarrow t^{\star }}{\frac {U(t^{\star })-U(t)}{t^{\star }-t}}}$

which becomes

${\displaystyle {\begin{array}{rcl}\langle {\frac {\partial U}{\partial t}}\rangle &=&\langle \lim _{t\leftarrow t^{\star }}{\frac {U(t^{\star })-U(t)}{t^{\star }-t}}\rangle =\lim _{t\leftarrow t^{\star }}{\frac {\langle U(t^{\star })-U(t)\rangle }{t^{\star }-t}}\end{array}}}$

and the numerator becomes

${\displaystyle {\begin{array}{rcl}\langle U(t^{\star })-U(t)\rangle &=&\int _{-\infty }^{\infty }(u^{\star }-u)f_{U^{\star },U}(u;t^{\star },t)du^{\star }du\\&=&\int _{-\infty }^{\infty }u^{\star }f_{U^{\star }}(u;t^{\star })du^{\star }-\int _{-\infty }^{\infty }uf_{U}(u;t)du\\&=&\langle U(t^{\star })\rangle -\langle U(t)\rangle \end{array}}}$

For the second identity:

${\displaystyle \langle {\frac {\partial Q(U)}{\partial t}}=\lim _{t\rightarrow t^{\star }}{\frac {\langle Q(U(t^{\star }))-Q(U(t))\rangle }{t^{\star }-t}}}$

${\displaystyle \langle Q(U^{\star })-Q(U)\rangle =\int \int _{\infty }^{\infty }\left(Q(u^{\star })-Q(u)\right)f_{U^{\star },U}(u^{\star },u;t^{\star },t)du^{\star }du}$

which becomes:

${\displaystyle \langle Q(U^{\star })-Q(U)\rangle =\int _{-\infty }^{\infty }Q(u^{\star })f_{U^{\star }}(u;t^{\star })du-\int _{-\infty }^{\infty }Q(u)f_{U}(u;t)du}$

(Note: removing the star from the dummy variable in the first integral, but still indicating a difference by including the star in the PDF variables)

Next step:

${\displaystyle \langle Q(U^{\star })-Q(U)\rangle =\int _{-\infty }^{\infty }Q(u)\left(f_{U^{\star }}(u;t^{\star })-f_{U}(u;t)\right)du}$

and bringing in the limit from above:

${\displaystyle \lim _{t\rightarrow t^{\star }}{\frac {\langle Q(U(t^{\star }))-Q(U(t))}{t^{\star }-t}}=\int _{-\infty }^{\infty }Q(u)\lim _{t^{\star }\rightarrow t}{\frac {f_{U^{\star }}(u;t^{\star })-f_{U}(u;t)}{t^{\star }-t}}du}$

which is equal to the final identity we were trying to prove in the first place...

${\displaystyle \int _{-\infty }^{\infty }Q(u){\frac {\partial f_{U}(u;t)}{\partial t}}du}$

## Derivation of PDF Transport Equation

Momentum equation:

${\displaystyle \rho {\frac {DU_{i}}{Dt}}=-{\frac {\partial p}{\partial x_{i}}}-{\frac {\partial \tau _{ij}}{\partial x_{j}}}+\rho g_{i}=A_{i}}$

and species equation:

${\displaystyle \rho {\frac {D\phi _{\alpha }}{Dt}}=-{\frac {\partial J_{j,\alpha }}{\partial x_{j}}}+\rho S_{\alpha }({\boldsymbol {\phi }})=\Theta _{\alpha }}$

Now we start out with a function ${\displaystyle Q}$, which has the following properties:

• ${\displaystyle Q(u,\phi )}$
• Scalar
• Only a function of one realization at one time (not ${\displaystyle U,\phi }$ at different times...)
• ${\displaystyle Q}$ must be a nice function (can't go to infinity very fast, so that when we calculate the moments, the PDF times Q can't go to infinity - i.e. it doesn't go to infinity so fast it overpowers the tails of the PDF and therefore makes the moment integral infinity)

${\displaystyle \langle \rho {\frac {D}{Dt}}Q(U,\phi )\rangle =\langle \rho {\frac {\partial Q}{\partial t}}+\rho U_{j}{\frac {\partial Q}{\partial x_{j}}}\rangle =\langle {\frac {\partial \rho Q}{\partial t}}+{\frac {\partial \rho U_{j}Q}{\partial x_{j}}}\rangle ={\frac {\partial \langle \rho Q\rangle }{\partial t}}+{\frac {\partial \langle \rho U_{j}Q\rangle }{\partial x_{j}}}}$

by the definition of the total derivative.

This can be expanded, using the definition of the expectation, as:

${\displaystyle \langle \rho {\frac {D}{Dt}}Q(U,\phi )\rangle =\int \dots \int _{-\infty }^{\infty }Q(u,\psi )\left({\frac {\partial \rho f_{U,\phi }}{\partial t}}+{\frac {\partial \rho u_{j}f_{U,\phi }}{\partial x_{j}}}\right)dud\psi }$

Then, using the chain rule:

${\displaystyle \langle \rho {\frac {DQ(U,\phi )}{Dt}}\rangle =\langle \rho {\frac {\partial Q}{\partial U_{i}}}{\frac {DU_{i}}{Dt}}+\rho {\frac {\partial Q}{\partial \phi _{\alpha }}}{\frac {D\phi _{\alpha }}{Dt}}\rangle =\langle {\frac {\partial Q}{\partial U_{i}}}A_{i}\rangle +\langle {\frac {\partial Q}{\partial \phi _{\alpha }}}\Theta _{\alpha }\rangle }$

We are going to use the rule

${\displaystyle f_{U,\phi ,z}=f_{U,\phi \vert z}f_{z}=f_{z\vert U,\phi }f_{U,\phi }}$

to make

${\displaystyle \langle \rho {\frac {DQ(U,\phi )}{Dt}}\rangle =-\int \int _{-\infty }^{\infty }Q{\frac {\partial }{\partial \psi _{\alpha }}}\left(\langle \Theta _{\alpha }\vert u,\psi \rangle f_{U,\phi }\right)dud\psi -\int \int _{-\infty }^{\infty }Q{\frac {\partial }{\partial u_{j}}}\left(\langle A_{j}\vert u,\psi \rangle f_{U,\phi }\right)dud\psi }$

So now we set these two equalities of ${\displaystyle \langle \rho {\frac {DQ(U,\phi )}{Dt}}\rangle }$ equal to one another... and we're doing this for arbitrary Q... and as a result, we get the following:

${\displaystyle {\frac {\partial \rho f_{U,\phi }}{\partial t}}+{\frac {\partial \rho u_{j}f_{U,\phi }}{\partial x_{j}}}+{\frac {\partial }{\partial \psi _{\alpha }}}\left(\langle \Theta _{\alpha }\vert u,\psi \rangle f_{U,\phi }\right)+{\frac {\partial }{\partial u_{j}}}\left(\langle A_{j}\vert u,\psi \rangle f_{U,\phi }\right)=0}$