Skip to content

Instantly share code, notes, and snippets.

@mschauer
Last active October 22, 2022 22:16
Show Gist options
  • Save mschauer/517b1b3d8eb8301823864ba67bd67f4d to your computer and use it in GitHub Desktop.
Save mschauer/517b1b3d8eb8301823864ba67bd67f4d to your computer and use it in GitHub Desktop.
Precision Brownian motion
d = 100
ts_ = range(0, 1, length=d+1)[2:end]
Γ = SymTridiagonal([2.0ones(d-1); 1.0], -ones(d-1))/ts_[1]
# Note the covariance matrix of B.M is
ts = range(0, 1, length=d+1)[2:end]
Γ0 = inv([min(i,j) for i in ts_, j in ts_])
@test norm(Γ0 - Γ) < 1e-7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment