Friday 4 September 2026

Quant interview

First passage of drifting Brownian motion by change of measure

hard · Girsanov and change of measure

Let W=(Wt)t≥0 be a standard Brownian motion on a probability space (Ω,F,P) with its natural filtration (Ft). Fix ν∈R and a>0, and set Xt=νt+Wt,τ=inf{t≥0:Xt=a}∈(0,∞].

You may use the following facts about a driftless standard Brownian motion B and its first passage time τa0=inf{t:Bt=a} (with a>0): P(τa0∈dt)=a2πt3e−a2/(2t)dt,E[e−sτa0]=e−a2s  (s>0), and P(τa0<∞)=1.

  1. Construct explicitly an equivalent measure Q on each Ft under which X is a standard Brownian motion, and write down the Radon–Nikodym derivative dPdQ|Ft as a function of Xt and t.

  2. Using the change of measure, show that under P P(τ∈dt)=a2πt3exp(−(a−νt)22t)dt,t>0. Be explicit about the step that lets you replace X at time T by its value at time τ.

  3. Deduce closed forms for EP[e−λτ1{τ<∞}] (for λ>0) and for P(τ<∞), and check that the two are consistent as λ↓0.

Solution

Setting up the measure change

Under P, W is a standard Brownian motion and Xt=νt+Wt carries drift ν. We want a measure under which the drift is removed. Define, for each t, the positive random variable Lt=exp(−νWt−12ν2t), which is an (Ft,P)–martingale with EP[Lt]=1 (Novikov's condition holds trivially, the exponent being linear in W). Set dQdP|Ft=Lt.

By Girsanov's theorem, under Q the process W~t:=Wt+νt=Xt is a standard Brownian motion. So under Q, X is driftless standard Brownian motion — exactly the process whose passage law we were handed.

The derivative we actually need runs the other way. Since Lt is invertible, dPdQ|Ft=Lt−1=exp(νWt+12ν2t). Substituting Wt=Xt−νt gives the required form in terms of X: dPdQ|Ft=Zt,Zt:=exp(νXt−12ν2t). Note Zt is a Q–martingale (it is the Girsanov density of P relative to Q, and under Q the process X is a Q–BM, so Z is a stochastic exponential of νX).

The passage-time density

Let f≥0 be Borel. For a bounded horizon T, the stopping time τ∧T is bounded, and the density process satisfies the optional-sampling identity for Radon–Nikodym derivatives: dPdQ|Fτ∧T=Zτ∧T. Hence, since {τ≤T}∈Fτ∧T, EP[f(τ)1{τ≤T}]=EQ[Zτ∧Tf(τ)1{τ≤T}]=EQ[Zτf(τ)1{τ≤T}].

This is the step a candidate is most likely to fumble: you must weight by Z evaluated at τ, not at T. Using a bounded stopping time τ∧T (rather than the fixed T) is precisely what lets you do this cleanly, sidestepping any uniform-integrability worry about ZT. On the event {τ<∞} the definition of τ pins the path: Xτ=a, so Zτ=exp(νa−12ν2τ)on {τ<∞}. Letting T↑∞ (monotone convergence, f≥0), EP[f(τ)1{τ<∞}]=EQ[eνa−12ν2τf(τ)1{τ<∞}].

Under Q, τ is the first passage of a standard Brownian motion to a, so it has the given driftless density and is finite Q–a.s. Therefore P(τ∈dt)=eνa−12ν2t·a2πt3e−a2/(2t)dt. Complete the square in the exponent: νa−12ν2t−a22t=−12t(a2−2νat+ν2t2)=−(a−νt)22t. Hence  P(τ∈dt)=a2πt3exp(−(a−νt)22t)dt  the inverse-Gaussian first-passage law.

Laplace transform and total mass

Take f(t)=e−λt, λ>0. Then EP[e−λτ1{τ<∞}]=eνaEQ[e−(λ+12ν2)τ]=eνae−a2(λ+ν2/2), using the driftless Laplace transform EQ[e−sτ]=e−a2s with s=λ+12ν2. Thus  EP[e−λτ1{τ<∞}]=exp(a(ν−ν2+2λ)) .

Letting λ↓0 and using monotone convergence recovers the total mass: P(τ<∞)=exp(a(ν−|ν|))={1,ν≥0,[2pt]e2νa,ν<0.

This is the sanity check: with upward or zero drift the level a>0 is hit with certainty, whereas with downward drift (ν<0) the hitting probability is e2νa<1, decaying in the barrier a and in the strength of the adverse drift. The Laplace transform at λ=0 agrees with this directly.

Note

The slicker but less illuminating route to part 3 skips the density: the process Mt=exp(θXt−(θν+12θ2)t) is a P–martingale for any θ, and optional stopping at τ (with θ>0 chosen so that θν+12θ2=λ, i.e. θ=ν2+2λ−ν) gives E[e−λτ1{τ<∞}]eθa=1, reproducing the boxed answer. The Girsanov derivation is worth doing because it delivers the full density in one stroke. A common wrong turn is to weight by ZT=eνXT−12ν2T with the fixed horizon and to forget that on the passage event the relevant value is Xτ=a; that error typically produces a stray dependence on XT that cannot be integrated out.

Statistics in machine learning

When an instrument only works conditionally

medium · Causal inference: confounding, backdoor adjustment and instruments

Consider the linear-Gaussian structural causal model with mutually independent exogenous variables

U~N(0,1),C~N(0,1),ϵZ,ϵX,ϵY~N(0,1),

and structural equations

Z=C+ϵZ,

X=Z+U+ϵX,

Y=2X+2U+3C+ϵY.

All variables have mean zero. The analyst observes Z,X,Y,C; the variable U is unobserved. The causal quantity of interest is the effect of a unit intervention on X, i.e. the coefficient β=2 on X in the equation for Y.

  1. Compute the population coefficient of the simple linear regression of Y on X (single regressor, no intercept needed since means are zero), and its bias for β.

  2. Compute the marginal instrumental-variable estimand βIV=Cov(Z,Y)Cov(Z,X). Is Z a valid instrument marginally? State precisely which instrument condition fails and give the numerical value.

  3. Compute the conditional instrumental-variable estimand obtained by using Z as an instrument after linearly partialling C out of Z, X and Y; equivalently βcIV=Cov(Z,Y∣C)Cov(Z,X∣C). Show it recovers β, and explain why conditioning on C restores instrument validity even though U remains unobserved.

Solution

Throughout, a population regression coefficient of A on B (mean zero) is Cov(A,B)/Var(B); this is the L2 projection, exact here because everything is jointly Gaussian. For Gaussian vectors a partial covariance Cov(A,B∣C) equals the covariance of the residuals of A and B after linearly regressing each on C — this is the content of the Frisch–Waugh–Lovell identity, and it is the step that makes part 3 mechanical.

First record the second moments we will reuse:

Var(Z)=Var(C)+Var(ϵZ)=1+1=2,

Var(X)=Var(Z)+Var(U)+Var(ϵX)=2+1+1=4,

Cov(X,U)=Var(U)=1,Cov(X,C)=Cov(Z,C)=1,Cov(Z,C)=1.

Part 1: naive OLS

Cov(X,Y)=2Var(X)+2Cov(X,U)+3Cov(X,C)=2(4)+2(1)+3(1)=13.

βOLS=Cov(X,Y)Var(X)=134=3.25.

The bias is 3.25−2=1.25, contributed by the two open backdoor paths X←U→Y and X←Z←C→Y; numerically (2·1+3·1)/4=5/4.

Part 2: marginal IV fails

Cov(Z,X)=Var(Z)=2.

Cov(Z,Y)=2Cov(Z,X)+2Cov(Z,U)+3Cov(Z,C)=2(2)+0+3(1)=7.

βIV=72=3.5.

This is biased. Relevance holds (Cov(Z,X)=2≠0) and Z⟂U, but the exclusion/exogeneity condition fails: there is an open path Z←C→Y, so Z is associated with Y through a route that does not pass through X. The extra term is exactly κλ/(αVar(Z))=3·1/(1·2)=1.5 on top of β.

Part 3: conditional IV

Regress each variable on C and take residuals. The projection coefficient of Z on C is Cov(Z,C)/Var(C)=1, so

Z~=Z−C=ϵZ,Var(Z~)=1.

Because Z~=ϵZ is orthogonal to C, partial covariances reduce to covariances with ϵZ:

Cov(Z,X∣C)=Cov(ϵZ,X)=Cov(ϵZ,Z+U+ϵX)=Var(ϵZ)=1,

Cov(Z,Y∣C)=Cov(ϵZ,Y)=Cov(ϵZ,2X+2U+3C+ϵY)=2Cov(ϵZ,X)=2.

βcIV=21=2=β.

Conditioning on C blocks the path Z←C→Y, restoring the exclusion condition, while relevance survives (Cov(Z,X∣C)=1≠0) and Z⟂U∣C still holds. Crucially, U never had to be observed: an instrument only needs the confounder-to-outcome path from the instrument to be blocked, not the treatment's own confounding, which the instrument sidesteps rather than adjusts away.

Note

A tempting fix is ordinary backdoor adjustment: regress Y on X and C. This does not work, because the residual of X after removing C is X~=ϵZ+U+ϵX (variance 3), and Cov(X~,Y)=2Var(X~)+2Cov(X~,U)=2(3)+2(1)=8, giving an X-coefficient of 8/3≈2.67. No adjustment set built from observables blocks X←U→Y, since U is unobserved — which is precisely why an instrument is needed here rather than backdoor adjustment. Final answers: βOLS=3.25, βIV=3.5, βcIV=2.


Two new problems every morning at 8am · every day so far