diff --git a/Lectures_my/MC_2016/Lecture7/mchrzasz.log b/Lectures_my/MC_2016/Lecture7/mchrzasz.log index e03a068..3e50f5c 100644 --- a/Lectures_my/MC_2016/Lecture7/mchrzasz.log +++ b/Lectures_my/MC_2016/Lecture7/mchrzasz.log @@ -1,4 +1,4 @@ -This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 22 APR 2016 17:42 +This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 8 MAY 2016 13:16 entering extended mode restricted \write18 enabled. %&-line parsing enabled. diff --git a/Lectures_my/MC_2016/Lecture7/mchrzasz.pdf b/Lectures_my/MC_2016/Lecture7/mchrzasz.pdf index 5ea4e85..89166fc 100644 --- a/Lectures_my/MC_2016/Lecture7/mchrzasz.pdf +++ b/Lectures_my/MC_2016/Lecture7/mchrzasz.pdf Binary files differ diff --git a/Lectures_my/MC_2016/Lecture7/mchrzasz.tex b/Lectures_my/MC_2016/Lecture7/mchrzasz.tex index a7a66ae..31c8126 100644 --- a/Lectures_my/MC_2016/Lecture7/mchrzasz.tex +++ b/Lectures_my/MC_2016/Lecture7/mchrzasz.tex @@ -428,7 +428,7 @@ \end{exampleblock} \ARROW Prove $(y \leq -1)$: \begin{align*} -\mathcal{P}\lbrace Y\leq y\rbrace = \frac{1}{2} \mathcal{P}\lbrace X \leq y \rbrace + \frac{1}{2} \mathcal{P}\lbrace \frac{1}{X} \leq \rbrace = 0+\frac{1}{2}\lbrace \frac{1}{y} \leq X <0 \rbrace \\ = \frac{1}{2} \frac{2}{\pi} \int_{1/y}^0 \frac{dr }{1+t^2}=\frac{1}{\pi} \arctan y +\frac{1}{2}~~~{\rm c.d.f~of~}C(0,1) +\mathcal{P}\lbrace Y\leq y\rbrace = \frac{1}{2} \mathcal{P}\lbrace X \leq y \rbrace + \frac{1}{2} \mathcal{P}\lbrace \frac{1}{X} \leq \rbrace = 0+\frac{1}{2}\lbrace \frac{1}{y} \leq X <0 \rbrace \\ = \frac{1}{2} \frac{2}{\pi} \int_{1/y}^0 \frac{dt }{1+t^2}=\frac{1}{\pi} \arctan x +\frac{1}{2}~~~{\rm c.d.f~of~}C(0,1) \end{align*} \ARROW The cut-off Breit-Wigner distribution we generate with elimination method using $\mathcal{U}(-1,1)$\\ \ARROW E7.3 Generate the Brei-Wigner distribution with all described methods. diff --git a/Lectures_my/MC_2016/Lecture8/mchrzasz.log b/Lectures_my/MC_2016/Lecture8/mchrzasz.log index 46eb0b2..50b36c8 100644 --- a/Lectures_my/MC_2016/Lecture8/mchrzasz.log +++ b/Lectures_my/MC_2016/Lecture8/mchrzasz.log @@ -1,4 +1,4 @@ -This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 21 APR 2016 18:15 +This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) (format=xelatex 2015.4.1) 8 MAY 2016 13:33 entering extended mode restricted \write18 enabled. %&-line parsing enabled. diff --git a/Lectures_my/MC_2016/Lecture8/mchrzasz.tex b/Lectures_my/MC_2016/Lecture8/mchrzasz.tex index 73ce3ec..3699f76 100644 --- a/Lectures_my/MC_2016/Lecture8/mchrzasz.tex +++ b/Lectures_my/MC_2016/Lecture8/mchrzasz.tex @@ -417,15 +417,15 @@ \begin{align*} \overrightarrow{x}=\overrightarrow{a} + \textbf{H} \overrightarrow{x} \Rightarrow (\textbf{I} - \textbf{H})\overrightarrow{x}=\overrightarrow{a} \end{align*} -where $\textbf{I}=\delta_{ij}$ - unit matrix, $\delta_{ij}$ is the Kronecker delta. +where $\textbf{I}=\delta_{ij}$ - unit matrix, $\delta_{ij}$ is the Kronecker delta.\\ \ARROW What one can do is to represent the solution in terns of Neumann series: \begin{align*} -\overrightarrow{x}^0=(\textbf{I}-\textbf{H})^{-1}\overrightarrow{a}= \overrightarrow{a} \textbf{H} \overrightarrow{a} + \textbf{H}^2 \overrightarrow{a}+ \textbf{H}^3 \overrightarrow{a}+ ... +\overrightarrow{x}^0=(\textbf{I}-\textbf{H})^{-1}\overrightarrow{a}= \overrightarrow{a} + \textbf{H} \overrightarrow{a} + \textbf{H}^2 \overrightarrow{a}+ \textbf{H}^3 \overrightarrow{a}+ ... \end{align*} \ARROW So for the $i^{th}$ component we have: \begin{align*} -x_i^0=a_i+\sum_{j=1}^nh_{ij} a_j + \sum_{j_1 =1}^n \sum_{j_2 =1}^n h_{ij_1} h_{ij_2} a_{j_2} \\ -+...+\sum_{j_1 =1}^n ...\sum_{j_n =1}^n h_{ij_1}... h_{ij_n} a_{j_n} +x_i^0=a_i+\sum_{j=1}^nh_{ij} a_j + \sum_{j_1 =1}^n \sum_{j_2 =1}^n h_{ij_1} h_{j_1 j_2} a_{j_2} \\ ++...+\sum_{j_1 =1}^n ...\sum_{j_n =1}^n h_{ij_1}... h_{j_{n-1} j_n} a_{j_n} \end{align*} \ARROW We will construct a probabilistic interpretation using MCMC and then we show that the expected value is equal to the above formula. \end{footnotesize} @@ -451,7 +451,7 @@ \item State at $t$ time is denoted as $i_t(i_t=0,1,2,...,n;t=0,1,....)$ \item We make a random walk accordingly to to the following rules: \begin{itemize} -\item At the begging of the walk ($t=0$) we are at $i_0$. +\item At the beginning of the walk ($t=0$) we are at $i_0$. \item In the $t$ moment we are in the $i_t$ position then in $t+1$ time stamp we move to state $i_{t+1}$ with the probability $h_{i_t i_{t+1}}$. \item We stop walking if we are in state $0$. \end{itemize} @@ -472,7 +472,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}\frametitle{Neumann-Ulam method} \begin{footnotesize} -\ARROW The $X(\gamma)$ variable is a random variable from: $\lbrace a_1/h_{1,0},a_2/h_{2,0},...,a_n/h_{n,0} \rbrace$. The probability that $X(\gamma) a_j/h_{j,0}$ is equal to the probability that the last non zero state of the $\gamma$ trajectory is $j$.\\ +\ARROW The $X(\gamma)$ variable is a random variable from: $\lbrace a_1/h_{1,0},a_2/h_{2,0},...,a_n/h_{n,0} \rbrace$. The probability that $X(\gamma)= a_j/h_{j,0}$ is equal to the probability that the last non zero state of the $\gamma$ trajectory is $j$.\\ \ARROW The expected value of the $X(\gamma)$ trajectory if the trajectory begins from $i_0=s$ is: \begin{align*} E \lbrace X(\gamma) \vert i_0=s \rbrace=\sum_{k=0}^{\infty} \sum_{ \lbrace \gamma_k \rbrace} X(\gamma) P(\gamma) @@ -499,13 +499,13 @@ -$\lbrace \gamma_1 \rbrace$: Trajectories: $\gamma_1=(i_0,i_1=s \vert 0),~i_1 \neq 0$, $P(\gamma_1)= P(s,i_1,0)=h_{s,i_1}h_{i_1,0} $ and $X(\gamma_1)=a_{i_1}/h_{i_1,0}$. So: +$\lbrace \gamma_1 \rbrace$: Trajectories: $\gamma_1=(i_0=s,i_1 \vert 0),~i_1 \neq 0$, $P(\gamma_1)= P(s,i_1,0)=h_{s,i_1}h_{i_1,0} $ and $X(\gamma_1)=a_{i_1}/h_{i_1,0}$. So: \begin{align*} \sum_{\gamma_1}X(\gamma)P(\gamma) = \sum_{i_1=1}^n \frac{a_{i_1}}{h_{i_1,0}} h_{s,i_1} h_{i_1,0}= \sum_{i=1}^n h_{s,i_1}a_{i_1} \end{align*} -$\lbrace \gamma_2 \rbrace$: Trajectories: $\gamma_2=(i_0,i_1,i_2=s \vert 0),~i_1,i_2 \neq 0$, $P(\gamma_2)= P(s,i_1, i_2,0)=h_{s,i_1}h_{i_1,i_2}h_{i_1,0} $ and $X(\gamma_2)=a_{i_2}/h_{i_2,0}$. So: +$\lbrace \gamma_2 \rbrace$: Trajectories: $\gamma_2=(i_0=s,i_1,i_2 \vert 0),~i_1,i_2 \neq 0$, $P(\gamma_2)= P(s,i_1, i_2,0)=h_{s,i_1}h_{i_1,i_2}h_{i_1,0} $ and $X(\gamma_2)=a_{i_2}/h_{i_2,0}$. So: \begin{align*} \sum_{\gamma_2}X(\gamma)P(\gamma) = \sum_{i_1=1}^n \sum_{i_2=1}^n \frac{a_{i_2}}{h_{i_2,0}} h_{s,i_1} h_{i_1,i_2} h_{i_2,0}= \sum_{i_1=1}^n \sum_{i_2=1}^n h_{s,i_1} h_{i_1,i_2} a_{i_2} \end{align*} @@ -624,9 +624,9 @@ \item The dual method calculates the whole $\overrightarrow{x}_0$ vector. \item The algorithm: \begin{itemize} -\item On the indexes: $\lbrace0,1,...,n\rbrace$ we set a probability distribution:\\ $q_1, q_2,..., q_n$, $q_i>0$ and $\sum_i=1^n q_i=1$. +\item On the indexes: $\lbrace0,1,...,n\rbrace$ we set a probability distribution:\\ $q_1, q_2,..., q_n$, $q_i>0$ and $\sum_{i=1^n} q_i=1$. \item The starting point we select from $q_i$ distribution. -\item If in $t$ time we are in $i_t$ state then with probability $p(i_{t+1} \vert i_t) = h_{i_{t+1},i_{t}}$ in $t+1$ we will be in state $i_1$. For $i_{t+1}=0$ we define the probability: $h_{0,i_{t}}=1-\sum_{j=1}^n h_{j,i_{t}}$. Here we also assume that $h_{j,i_{t}} > 0$. +\item If in $t$ time we are in $i_t$ state then with probability $p(i_{t+1} \vert i_t) = h_{i_{t+1},i_{t}}$ in $t+1$ we will be in state $i_{t+1}$. For $i_{t+1}=0$ we define the probability: $h_{0,i_{t}}=1-\sum_{j=1}^n h_{j,i_{t}}$. Here we also assume that $h_{j,i_{t}} > 0$. \item NOTE: there the matrix is transposed compared to previous method: $H^{T}$. \item Again we end our walk when we are at state $0$. \item For the trajectory: $\gamma = (i_0, i_1,...,i_k, 0)$, we assign the vector: @@ -751,7 +751,7 @@ \begin{frame}\frametitle{Generalization, proof} \ARROW For a $X(\gamma)$ trajectory the expected value is: \begin{align*} -E \lbrace X(\gamma_k) = \sum_{k=0}^{\infty}\sum_{\gamma_k} X(\gamma_k)P \lbrace X(\gamma_k) \rbrace +E \lbrace X(\gamma_k) \rbrace = \sum_{k=0}^{\infty}\sum_{\gamma_k} X(\gamma_k)P \lbrace X(\gamma_k) \rbrace \end{align*} \ARROW The probability is given by the formula: \begin{align*} @@ -792,7 +792,7 @@ \ARROW W.Wasow (1956) was smarter: \begin{itemize} -\item For the trajectory: $\gamma(i_0,i_1,...,i_k,0)$ we look trajectories begging with: +\item For the trajectory: $\gamma(i_0,i_1,...,i_k,0)$ we look trajectories: \begin{align*} (i_0),~(i_0,i_1),~(i_0,i_1,...,i_k) \end{align*}