Answers.Body: <p>Let me denote the events with simpler symbols</p>
  <ul>
  <li><span class="math-container">$A = X_{t+1}$</span></li>
  <li><span class="math-container">$C = e_{1:t} = e_1, \dots e_t$</span></li>
  <li><span class="math-container">$D = e_{t+1}$</span></li>
  </ul>
  <p>So, we can rewrite</p>
  <p><span class="math-container">$$
  P(X_{t+1} \mid e_{1:t}, e_{t+1}) = \alpha P(e_{t+1} \mid X_{t+1},  e_{1:t}) P(X_{t+1} \mid  e_{1:t})\tag{1}\label{1}
  $$</span></p>
  <p>as follows</p>
  <p><span class="math-container">$$
  P(A \mid C, D) = \alpha P(D \mid A,  C) P(A \mid  C)
  \tag{2}\label{2}
  $$</span></p>
  <p>Now, note that <span class="math-container">$C, D$</span> is a shorthand for <span class="math-container">$C \cap D = B$</span>, so <span class="math-container">$P(A \mid C, D) = P(A \mid B)$</span>.</p>
  <p>So, by the Bayes rule, we have</p>
  <p><span class="math-container">\begin{align}
  P(A \mid B) 
  &amp;= \frac{P(B \mid A) P(A) }{P(B)} \\
  &amp;= \frac{\color{red}{P(C, D \mid A)} P(A) }{P(C, D)}
  \tag{3}\label{3}
  \end{align}</span></p>
  <p>Let's expand the red term</p>
  <p><span class="math-container">\begin{align}
  \color{red}{P(C, D \mid A)}  
  &amp;= P(B \mid A) \\
  &amp;= \frac{P(B, A) }{P(A)}\\
  &amp;= \color{blue}{\frac{P(C, D, A) }{P(A)}}
  \tag{4}\label{4}
  \end{align}</span></p>
  <p>Now, let <span class="math-container">$E = C, A = C \cap A$</span>. So, let's continue writing \ref{4}</p>
  <p><span class="math-container">\begin{align}
  \color{blue}{\frac{P(C, D, A) }{P(A)}}
  &amp;=\frac{P(D, E) }{P(A)} \\
  &amp;= \frac{P(D \mid E) P(E) }{P(A)} \\
  &amp;= \frac{P(D \mid C, A) P(C, A) }{P(A)} \\
  &amp;= \color{green}{\frac{P(D \mid C, A) P(A \mid C) P(C) }{P(A)}}
  \tag{5}\label{5}
  \end{align}</span>
  Let's put \ref{5} back into \ref{3}</p>
  <p><span class="math-container">\begin{align}
  P(A \mid B) 
  &amp;= \frac{\color{green}{\frac{P(D \mid C, A) P(A \mid C) P(C) }{P(A)}} P(A) }{P(C, D)} \\
  &amp;= \frac{ P(D \mid C, A) P(A \mid C) P(C) }{P(C, D)} \\
  &amp;= \frac{ P(D \mid C, A) P(A \mid C) P(C) }{P(D \mid C) P(C)} \\
  &amp;= \frac{ P(D \mid C, A) P(A \mid C) }{P(D \mid C)} \\
  &amp;= \frac{1}{P(D \mid C)} P(D \mid C, A) P(A \mid C) \\
  &amp;= \alpha P(D \mid C, A) P(A \mid C)
  \tag{6}\label{6}
  \end{align}</span></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T18:51:55.730Z
Answers.Text: I got lost at that line, let A = C and A after (4).
Answers.UserDisplayName: mLstudent33
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T18:58:36.023Z
Answers.Text: @mLstudent33 It's let $E = C, A$. But $C, A$ is a shorthand for $C \cap A$ (i.e. the intersection of C and A, so I am denoting $C \cap A$ by $E$ in order to apply the regular definition of joint and conditional probabilities. Note that events are sets. I've edited the answer to add another step that clarifies what I did.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T19:41:57.530Z
Answers.Text: Thanks but I still do not see how 5 can be substituted for P(B | A).  Oops I see it now
Answers.UserDisplayName: mLstudent33
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T19:47:28.613Z
Answers.Text: P(C,D | A) is P(C,D | A) :)
Answers.UserDisplayName: mLstudent33
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T23:55:49.633Z
Answers.Text: Are you returning back or the question is impressive enough?
Answers.UserDisplayName: hanugm
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T09:30:38.237Z
Answers.Text: @hanugm I've restarted to answer questions every once in a while. I answer the ones that I either can answer quickly or I like. This was one that I liked because it was about the Bayes rule ;)
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T11:08:44.203Z
Answers.LastActivityDate: 2022-04-05T07:55:40.613Z
Answers.LastEditDate: 2022-04-05T07:55:40.613Z
Answers.UserDisplayName: nbro
Body: <p>On page 572 of Norvig &amp; Russell's AI book (edition 3)</p>
  <p><a href="https://i.sstatic.net/yMBRU.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yMBRU.png" alt="Bayes rule filtering" /></a></p>
  <p>Going from the first line to the second line in one shot like that, I am lost.</p>
  <p>Can someone walk me through it step by step?</p>
  <p>I tried but got:</p>
  <p><span class="math-container">$$
  \frac{P(X_{t+1}) * P(e_{1:t} | X_{t+1}) * P(e_{t+1} | X_{t+1}) }{P(e_{1:t}, e_{t+1})}
  $$</span></p>
  <p>and then do not know how to turn it into that second line that says (using Bayes's rule)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-01T08:50:50.257Z
Comments.Text: You can use mathjax to format the equations.
Comments.UserDisplayName: nbro
Tags: <norvig-russell><bayes-theorem>
Title: Why is $P(X_{t+1} \mid e_{1:t}, e_{t+1}) = \alpha P(e_{t+1} \mid X_{t+1}, e_{1:t}) P(X_{t+1} \mid e_{1:t})$ true in Norvig & Russell's book?
UserDisplayName: mLstudent33
ThreadText: # Why is $P(X_{t+1} \mid e_{1:t}, e_{t+1}) = \alpha P(e_{t+1} \mid X_{t+1}, e_{1:t}) P(X_{t+1} \mid e_{1:t})$ true in Norvig & Russell's book?
  
  (Asked by: username_0 on 2022-04-01)
  
  On page 572 of Norvig & Russell's AI book (edition 3)
  
  [![Bayes rule filtering](https://i.sstatic.net/yMBRU.png)](https://i.sstatic.net/yMBRU.png)
  
  Going from the first line to the second line in one shot like that, I am lost.
  
  Can someone walk me through it step by step?
  
  I tried but got:
  
  $$
  \frac{P(X\_{t+1}) \* P(e\_{1:t} | X\_{t+1}) \* P(e\_{t+1} | X\_{t+1}) }{P(e\_{1:t}, e\_{t+1})}
  $$
  
  and then do not know how to turn it into that second line that says (using Bayes's rule)
  
  **Tags:** norvig-russell, bayes-theorem
  > **Comments:**
  > **username_1**: You can use mathjax to format the equations.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-04-02. Score: 1 | Accepted answer
  
  Let me denote the events with simpler symbols
  
  * $A = X\_{t+1}$
  * $C = e\_{1:t} = e\_1, \dots e\_t$
  * $D = e\_{t+1}$
  
  So, we can rewrite
  
  $$
  P(X\_{t+1} \mid e\_{1:t}, e\_{t+1}) = \alpha P(e\_{t+1} \mid X\_{t+1}, e\_{1:t}) P(X\_{t+1} \mid e\_{1:t})\tag{1}\label{1}
  $$
  
  as follows
  
  $$
  P(A \mid C, D) = \alpha P(D \mid A, C) P(A \mid C)
  \tag{2}\label{2}
  $$
  
  Now, note that $C, D$ is a shorthand for $C \cap D = B$, so $P(A \mid C, D) = P(A \mid B)$.
  
  So, by the Bayes rule, we have
  
  \begin{align}
  P(A \mid B)
  &= \frac{P(B \mid A) P(A) }{P(B)} \\
  &= \frac{\color{red}{P(C, D \mid A)} P(A) }{P(C, D)}
  \tag{3}\label{3}
  \end{align}
  
  Let's expand the red term
  
  \begin{align}
  \color{red}{P(C, D \mid A)}
  &= P(B \mid A) \\
  &= \frac{P(B, A) }{P(A)}\\
  &= \color{blue}{\frac{P(C, D, A) }{P(A)}}
  \tag{4}\label{4}
  \end{align}
  
  Now, let $E = C, A = C \cap A$. So, let's continue writing \ref{4}
  
  \begin{align}
  \color{blue}{\frac{P(C, D, A) }{P(A)}}
  &=\frac{P(D, E) }{P(A)} \\
  &= \frac{P(D \mid E) P(E) }{P(A)} \\
  &= \frac{P(D \mid C, A) P(C, A) }{P(A)} \\
  &= \color{green}{\frac{P(D \mid C, A) P(A \mid C) P(C) }{P(A)}}
  \tag{5}\label{5}
  \end{align}
  Let's put \ref{5} back into \ref{3}
  
  \begin{align}
  P(A \mid B)
  &= \frac{\color{green}{\frac{P(D \mid C, A) P(A \mid C) P(C) }{P(A)}} P(A) }{P(C, D)} \\
  &= \frac{ P(D \mid C, A) P(A \mid C) P(C) }{P(C, D)} \\
  &= \frac{ P(D \mid C, A) P(A \mid C) P(C) }{P(D \mid C) P(C)} \\
  &= \frac{ P(D \mid C, A) P(A \mid C) }{P(D \mid C)} \\
  &= \frac{1}{P(D \mid C)} P(D \mid C, A) P(A \mid C) \\
  &= \alpha P(D \mid C, A) P(A \mid C)
  \tag{6}\label{6}
  \end{align}
  
  > **Comments:**
  > **username_0**: I got lost at that line, let A = C and A after (4).  
  > **username_1**: @mLstudent33 It's let $E = C, A$. But $C, A$ is a shorthand for $C \cap A$ (i.e. the intersection of C and A, so I am denoting $C \cap A$ by $E$ in order to apply the regular definition of joint and conditional probabilities. Note that events are sets. I've edited the answer to add another step that clarifies what I did.  
  > **username_0**: Thanks but I still do not see how 5 can be substituted for P(B | A).  Oops I see it now  
  > **username_0**: P(C,D | A) is P(C,D | A) :)  
  > **username_2**: Are you returning back or the question is impressive enough?  
  > **username_1**: @hanugm I've restarted to answer questions every once in a while. I answer the ones that I either can answer quickly or I like. This was one that I liked because it was about the Bayes rule ;)  
  
  ---
  
  