  We formulate a Bayesian framework to analyze ringdown gravitational waves
from colliding binary black holes and test the no-hair theorem. The idea hinges
on mode cleaning -- revealing subdominant oscillation modes by removing
dominant ones using newly proposed ${\it rational~filters}$. By incorporating
the filter into Bayesian inference, we construct a likelihood function that
depends only on the mass and spin of the remnant black hole (no dependence on
mode amplitudes and phases) and implement an efficient pipeline to constrain
the remnant mass and spin without Markov chain Monte Carlo (MCMC). We test
ringdown models by cleaning combinations of different modes and evaluating the
consistency between the residual data and pure noise. The model evidence and
Bayes factor are used to demonstrate the presence of a particular mode and to
infer the mode starting time. In addition, we design a hybrid approach to
estimate the remnant black hole properties exclusively from a single mode using
MCMC after mode cleaning. We apply the framework to GW150914 and demonstrate
more definitive evidence of the first overtone by cleaning the fundamental
mode. This new framework provides a powerful tool for black hole spectroscopy
in future gravitational-wave events.
