Single-particle tracking experiments have been used widely to study the heterogeneity of a sample. Segments with dissimilar diffusive behaviors are associated with different intermediate states, usually by visual inspection of the tracking trace. A likelihood-based, systematic approach is presented to remove this incertitude. Maximum likelihood estimators are derived for the determination of diffusion coefficients. A likelihood ratio test is applied to the localization of the changes in them. Simulations suggest that the proposed procedure is statistically robust and is able to quantitatively recover time-dependent changes in diffusion coefficients even in the presence of large measurement noise.