Skip to content

[kalman] Extend the $X$ / $x$ (random variable vs realization) notation to the Implementation section and Exercises #898

Closed

Description

@mmcky

Hi @longye-tian,

Thanks again for the excellent PR in #897 — the new $X$ (random vector) vs $x$ (realization) distinction reads really well and makes the exposition much clearer.

As a small follow-up suggestion: the new convention is currently applied to the main exposition (from The basic idea through Convergence), but a couple of later spots still use lowercase $x$ for the random state, so the notation isn't quite consistent end-to-end:

  • Implementation section — the LinearStateSpace equations still read
    $$
    x_{t+1} = A x_t + C w_{t+1}, \qquad y_t = G x_t + H v_t
    $$
    which uses lowercase $x_t$ / $y_t$ for the random state and signal.
  • Exercises — these still refer to the hidden state as ${x_t}$, $x_t$, $x_0$, etc. (e.g. Exercise 1's "the hidden state ${x_t}$ is in fact constant", and the squared-error expressions in Exercise 3).

A reader who has just internalized "uppercase = random variable, lowercase = a realization" then meets lowercase random states in these sections.

There's a reasonable case either way:

  1. Extend the convention to the Implementation section and Exercises so it's consistent throughout, or
  2. Leave it scoped to the conceptual exposition — one could argue the LinearStateSpace API genuinely uses lowercase, so matching it there is fine.

What do you think?

Follow-up to #893 / #897.

Activity

  1. longye-tian commented on Jun 8, 2026

    @longye-tian
    Contributor

    Many thanks @mmcky , I agree with you

    I think the best follow-up is to extend the convention through the Implementation section and the Exercises in the mathematical notation, while keeping the Python variable names lowercase to match the LinearStateSpace API and the simulated arrays.

    So, for example, the state-space equations would use $X_t$ and $Y_t$, but the code would still use names such as x, y, and x_hat.

    I’ll put up a small follow-up PR for this notation consistency point.

  2. mmcky commented on Jun 8, 2026

    @mmcky
    ContributorAuthor
  3. linked a pull request that will close this issue[kalman] update RV notation #900on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions