Skip to content

[kalman] update RV notation#900

Open
longye-tian wants to merge 3 commits into
mainfrom
kal_rv
Open

[kalman] update RV notation#900
longye-tian wants to merge 3 commits into
mainfrom
kal_rv

Conversation

@longye-tian

Copy link
Copy Markdown
Contributor

Hi @mmcky

This PR updates the RV notation following #898 .

In particular, this extends the new uppercase/lowercase convention to the Implementation section and Exercises:

  • use $X_t$ and $Y_t$ for random state and signal variables;
  • keep lowercase notation for realizations, density arguments, filter estimates, and code variables;
  • clarify that the Exercise 3 plotted errors use simulated realizations.

Best,
Longye

longye-tian and others added 3 commits June 8, 2026 17:16
Update the two "Constant value of state x_t" comments to X_t so the
code comments match the uppercase random-variable convention used in
the surrounding prose. The realized initial value x_0 comment stays
lowercase by design.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mmcky

mmcky commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Reviewed — the uppercase/lowercase RV convention is applied correctly and consistently, and the new x[:, t] is the realized value of $X_t$ note nicely bridges the math and the Ex3 code.

I pushed a small follow-up commit (dc7ca23) updating the two # Constant value of state x_t code comments to X_t to match. LGTM once CI is green.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-900--sunny-cactus-210e3e.netlify.app

Commit: dc7ca23

📚 Changed Lectures


Build Info

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Kalman filter lecture (lectures/kalman.md) to consistently apply the “uppercase = random variable / lowercase = realization” convention across the Implementation section and Exercises, aligning with the notation introduced earlier in the lecture and requested in #898.

Changes:

  • Updated the LinearStateSpace model equations in the Implementation section to use $X_t$ / $Y_t$ for random state and signal variables.
  • Revised Exercises 1–4 text and code comments to use $X_t$ for random states while keeping lowercase for realizations/estimates/code variables.
  • Clarified in Exercise 3 that the plotted squared errors are based on simulated realizations (and added an explicit note tying x[:, t] to the realized $X_t$).

Comment thread lectures/kalman.md
The measurement equation is $Y_t = \theta + v_t$ where $v_t$ is $N(0,1)$ and IID.

The task of this exercise to simulate the model and, using the code from `kalman.py`, plot the first five predictive densities $p_t(x) = N(\hat x_t, \Sigma_t)$.
The task of this exercise to simulate the model and, using the code from `kalman.py`, plot the first five predictive densities $p_t(x) = N(\hat x_t, \Sigma_t)$ for $X_t$.
Comment thread lectures/kalman.md
Comment on lines +730 to +734
Our horse race will be assessed in terms of realized squared error.

In particular, your task is to generate a graph plotting observations of both $\| x_t - A x_{t-1} \|^2$ and $\| x_t - \hat x_t \|^2$ against $t$ for $t = 1, \ldots, 49$.
In particular, your task is to generate a graph plotting simulated realizations of both $\| X_t - A X_{t-1} \|^2$ and $\| X_t - \hat x_t \|^2$ against $t$ for $t = 1, \ldots, 49$.

In the code below, `x[:, t]` is the realized value of $X_t$ along the simulated path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants