# A Kalman Filter for estimating z-scores?

I have been struggling to fit the following problem into a linear state space model for a Kalman Filter (KF). I'm having a hard time seeing what I'm doing wrong. I suspect I'm violating some law of KF state space modeling. Perhaps something is non-gaussian, non-linear, non-kosher?

I have data from players who score points in a game each day. The game involves both skill and luck. With a KF in mind I am thinking about skill as the unobserved state and luck as part of the observation noise. Here is some (contrived) data:

        Points Scored
Player  Day 1   Day 2   Day 3
1       10      118     50
2       15      100     49
3       20      130     51


I am also assuming players are endowed with a skill level (relative to the other players) which does not change over time. Further, points scored are exogenously and randomly mean shifted/scaled each day. As you can see in the example data above, Player 3 is more skilled because he scores more points than the other players. Also, the distribution of points moves and scales -- that is to say means and variances of points scored change from day to day.

I'll index players $i=1,\dots,N$ and time $t=1,\dots,T$. Let $y_{it}$ be the points scored by player $i$ at time $t$.

My first approach was to estimate skill using something like a z-score (or a t-stat). For each player at each time step I compute: $z_{it} = \frac{y_{it} - \bar{y_t}}{s_{y_t}}$

Then I average across time to estimate skill: $\widehat{skill_i} = \bar{z_i}$

As far as I can tell, so far so good. Now I want to Kalmanize this thing so I can update estimates of skill as new data arrive. I start to think about the state and its relationship with the observable points scored. But this is where I get stuck.

Suppose the true, unobservable skill level for a player $i$ is $\theta_i$ and this comes from a gaussian distribution with mean and variance $(\mu_\theta, \sigma_\theta^2)$. Luck is $\epsilon_{it}$ with mean and variance $(0,\sigma_{\epsilon}^2)$ Further suppose the common daily mean shift and scaling factor are $\alpha_t$ and $\gamma_t$, respectively, where both come from gaussian distributions with means and variances $(\mu_{\alpha}, \sigma_{\alpha}^2)$, and $(\mu_{\gamma}, \sigma_{\gamma}^2)$.

I model the observed points scored by player $i$ at time $t$ as: $y_{it} = \alpha_t + \gamma_t (\theta_i + \epsilon_{it})$

The state transition equations are easy: $\theta_{it} = \theta_i$. Each player's skill is assumed to be constant across time.

The player's luck is the observation noise.

Although it seems like I have everything defined right, I can't quite seem to figure out how to make $\alpha_t$ and $\gamma_t$ fit into a KF model - should they be part of the state? If so, how can I get a linear KF to multiply states? If they aren't part of the state, but are time-varying coefficients, how can I make that work?

And of course I should also be asking: Is the Kalman Filter even an appropriate estimation strategy for skill?

Help! So many thanks in advance!

If $\alpha_t$ and $\gamma_t$ are known you have a linear state-space model. Even if $\alpha_t$ is unknown and you estimate it online (i.e. add another state) the problem can be solved using KF. However, if $\gamma_t$ is unknown the problem is no longer linear in the states, your measurement model is then non-linear.
Edit: Just to clarify a bit, time-varying constants are not a problem in the KF. The part that makes it "non-linear" is $\gamma_t(\theta_i+\epsilon_{it})$.