An eigenvalue localization theorem for stochastic matrices and its application to Randi\'c matrices