  Baryon Acoustic Oscillations are a feature imprinted in the galaxy
distribution by acoustic waves traveling in the plasma of the early universe.
Their detection at the expected scale in large-scale structures strongly
supports current cosmological models with a nearly linear evolution from
redshift approximately 1000, and the existence of dark energy. Besides, BAOs
provide a standard ruler for studying cosmic expansion. In this paper we focus
on methods for BAO detection using the correlation function measurement. For
each method, we want to understand the tested hypothesis (the hypothesis H0 to
be rejected) and the underlying assumptions. We first present wavelet methods
which are mildly model-dependent and mostly sensitive to the BAO feature. Then
we turn to fully model-dependent methods. We present the most often used method
based on the chi^2 statistic, but we find it has limitations. In general the
assumptions of the chi^2 method are not verified, and it only gives a rough
estimate of the significance. The estimate can become very wrong when
considering more realistic hypotheses, where the covariance matrix of the
measurement depends on cosmological parameters. Instead we propose to use a new
method based on two modifications: we modify the procedure for computing the
significance and make it rigorous, and we modify the statistic to obtain better
results in the case of varying covariance matrix. We verify with simulations
that correct significances are different from the ones obtained using the
classical chi^2 procedure. We also test a simple example of varying covariance
matrix. In this case we find that our modified statistic outperforms the
classical chi^2 statistic when both significances are correctly computed.
Finally we find that taking into account variations of the covariance matrix
can change both BAO detection levels and cosmological parameter constraints.
