  This decade will see the first direct detections of gravitational waves by
observatories such as Advanced LIGO and Virgo. Among the prime sources are
coalescences of binary neutron stars and black holes, which are ideal probes of
dynamical spacetime. This will herald a new era in the empirical study of
gravitation. For the first time, we will have access to the genuinely
strong-field dynamics, where low-energy imprints of quantum gravity may well
show up. In addition, we will be able to search for effects which might only
make their presence known at large distance scales, such as the ones that
gravitational waves must traverse in going from source to observer. Finally,
coalescing binaries can be used as cosmic distance markers, to study the
large-scale structure and evolution of the Universe.
  With the advanced detector era fast approaching, concrete data analysis
algorithms are being developed to look for deviations from general relativity
in signals from coalescing binaries, taking into account the noisy detector
output as well as the expectation that most sources will be near the threshold
of detectability. Similarly, several practical methods have been proposed to
use them for cosmology. We explain the state of the art, including the
obstacles that still need to be overcome in order to make optimal use of the
signals that will be detected. Although the emphasis will be on
second-generation observatories, we will also discuss some of the science that
could be done with future third-generation ground-based facilities such as
Einstein Telescope, as well as with space-based detectors.
