Say I have two normal distributions with means $\mu_1$ and $\mu_2$ and standard deviations $\sigma_1$ and $\sigma_2$, respectively. A t-test reveals that the means are significantly different, but the two distributions overlap a fair bit, too. I am selecting randomly from distribution 1, but at some point switch to distribution 2 without my knowledge.
How would I identify the point at which the switch occurred? Presumably, t-tests could also help me identify when the mean has shifted significantly, but I don’t know how to divide my observations to apply the t-tests. (E.g., do I use my 10 most recent observations? 100?) Is there an alternative approach that can identify a switch between distributions? Would the accuracy of such a test be affected by the degree to which the distributions overlap?