  The pseudo-marginal algorithm is a popular variant of the
Metropolis--Hastings scheme which allows us to sample asymptotically from a
target probability density $\pi$, when we are only able to estimate an
unnormalized version of $\pi$ pointwise unbiasedly. It has found numerous
applications in Bayesian statistics as there are many scenarios where the
likelihood function is intractable but can be estimated unbiasedly using Monte
Carlo samples. Using many samples will typically result in averages computed
under this chain with lower asymptotic variances than the corresponding
averages that use fewer samples. For a fixed computing time, it has been shown
in several recent contributions that an efficient implementation of the
pseudo-marginal method requires the variance of the log-likelihood ratio
estimator appearing in the acceptance probability of the algorithm to be of
order 1, which in turn usually requires scaling the number $N$ of Monte Carlo
samples linearly with the number $T$ of data points. We propose a modification
of the pseudo-marginal algorithm, termed the correlated pseudo-marginal
algorithm, which is based on a novel log-likelihood ratio estimator computed
using the difference of two positively correlated log-likelihood estimators. We
show that the parameters of this scheme can be selected such that the variance
of this estimator is order $1$ as $N,T\rightarrow\infty$ whenever
$N/T\rightarrow 0$. By combining these results with the Bernstein-von Mises
theorem, we provide an analysis of the performance of the correlated
pseudo-marginal algorithm in the large $T$ regime. In our numerical examples,
the efficiency of computations is increased relative to the standard
pseudo-marginal algorithm by more than 20 fold for values of $T$ of a few
hundreds to more than 100 fold for values of $T$ of around 10,000-20,000.
