Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TODO about covariance in comment #214

Closed
matt-graham opened this issue Jan 21, 2022 · 0 comments · Fixed by #216
Closed

Fix TODO about covariance in comment #214

matt-graham opened this issue Jan 21, 2022 · 0 comments · Fixed by #216

Comments

@matt-graham
Copy link
Member

The answer to the question in

# Covariance between observations R_22, from equationd 3-4 in in Dietrich & Newsam 96
# TODO: Ask Alex why we add sigma^2 on the diagonal
function covariance_stations!(cov::AbstractMatrix{T}, grid::Grid, stations::NamedTuple, noise_params::NamedTuple, std::T) where T
cov .= covariance.(abs.(stations.ist .- stations.ist') .* grid.dx,
abs.(stations.jst' .- stations.jst) .* grid.dy,
(noise_params,)) .+ I(stations.nst) .* std.^2
end

is I believe explained in the first complete paragraph in the second page (page number 1645) of Dietrich and Newsam 1995

Second, in practice, measurements z₂* of Z on Ω are likely to be noisy. This is usually modelled by assuming that [z₂*]ₖ = Z(xₖ, yₖ) + εₖ, where the errors εₖ, are zero mean Gaussian random variables which may be correlated among themselves with correlation matrix Σ, but are independent of the vectors z₁ and z₂. This extension can be easily accommodated in the results presented above by simply replacing the matrix R₂₂ in (3) and subsequent equations by R̅₂₂ = R₂₂ + Σ.

In our case we are assuming Σ = σ²I (that is the observation errors / noise variables are independent zero-mean Gaussian random variables with standard deviation σ) so R̅₂₂ = R₂₂ + σ²I.

If that answers the question I can create a PR to update the comment to summarize the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant