Diffusion-Based Hypothesis Testing and Change-Point Detection