Katkat

Solve Markov, OLS-rotation, and coin-toss probability

VoleonData Scientist · Technical Screen

Last updated

This multi-part question evaluates understanding of Markov chain and stochastic matrix properties, linear-algebra facts about eigenvalues and stationary distributions, invariance and sampling-distribution properties of OLS under orthonormal rotations, and discrete stopping-time probability reasoning for coin-flip processes.

Answer the following three interview questions.

1) Basic properties of a Markov (transition) matrix

Let (P) be a transition matrix of a (time-homogeneous) Markov chain on (n) states.

  • State the defining properties of (P) (stochasticity, non-negativity, etc.).
  • State key linear-algebra properties that always hold (e.g., eigenvalue facts, stationary distribution existence conditions).
  • Briefly describe conditions under which (P^k) converges as (k\to\infty) and what it converges to.

2) OLS properties after a rotation (two independent uniforms)

You observe i.i.d. data ((x_{i1}, x_{i2}, y_i)) for (i=1,\dots,n), where

  • (x_{i1}, x_{i2}) are independent and identically distributed (\mathrm{Unif}(-1,1)) (mean 0),
  • the data follow a linear model (y_i = \beta_0 + \beta_1 x_{i1} + \beta_2 x_{i2} + \varepsilon_i) with (\mathbb{E}[\varepsilon_i\mid x_{i1},x_{i2}]=0) and (\mathrm{Var}(\varepsilon_i\mid x_{i1},x_{i2})=\sigma^2).

You fit OLS with an intercept. Now define a rotated feature vector [x_i^* = R,x_i,\qquad x_i = (x_{i1},x_{i2})^\top,] where (R) is a 2D rotation matrix (orthonormal: (R^\top R=I)). You refit OLS using (x_i^*) (with an intercept).

  • How do the estimated coefficients transform (relationship between (\hat\beta) and (\hat\beta^*))?
  • Are the fitted values (\hat y) invariant to this rotation?
  • Under what conditions (on the design distribution) is the sampling distribution of the slope estimator “rotation-invariant” (at least in second moments)?

3) Two players flipping coins in parallel

A and B flip fair coins simultaneously each round.

  • A’s stopping time (T_A): the first round (t\ge 2) at which A has flipped two consecutive heads (i.e., A has (H) at rounds (t-1) and (t)).
  • B’s stopping time (T_B): the first round (t\ge 1) at which B flips a tail.

Compute (\mathbb{P}(T_A < T_B)). (If both events happen in the same round, that is not counted as “A before B”.)