Statistical inference as Green's functions