When searching over a large parameter space for anomalies such as events,
peaks, objects, or particles, there is a large probability that spurious
signals with seemingly high significance will be found. This is known as the
look-elsewhere effect and is prevalent throughout cosmology, (astro)particle
physics, and beyond. To avoid making false claims of detection, one must
account for this effect when assigning the statistical significance of an
anomaly. This is typically accomplished by considering the trials factor, which
is generally computed numerically via potentially expensive simulations. In
this paper we develop a continuous generalization of the Bonferroni and Sidak
corrections by applying the Laplace approximation to evaluate the Bayes factor,
and in turn relating the trials factor to the prior-to-posterior volume ratio.
We use this to define a test statistic whose frequentist properties have a
simple interpretation in terms of the global $p$-value, or statistical
significance. We apply this method to various physics-based examples and show
it to work well for the full range of $p$-values, i.e. in both the asymptotic
and non-asymptotic regimes. We also show that this method naturally accounts
for other model complexities such as additional degrees of freedom,
generalizing Wilks' theorem. This provides a fast way to quantify statistical
significance in light of the look-elsewhere effect, without resorting to
expensive simulations.