A weighted $$chi ^2$$χ2 test to detect the presence of a major change point in non-stationary Markov chains