  Our goal is to estimate empirically, for the first time, the cosmic variance
that affects merger fraction studies based on close pairs. We compute the
merger fraction from photometric redshift close pairs with 10h^-1 kpc <= rp <=
50h^-1 kpc and Dv <= 500 km/s, and measure it in the 48 sub-fields of the
ALHAMBRA survey. We study the distribution of the measured merger fractions,
that follow a log-normal function, and estimate the cosmic variance sigma_v as
the intrinsic dispersion of the observed distribution. We develop a maximum
likelihood estimator to measure a reliable sigma_v and avoid the dispersion due
to the observational errors (including the Poisson shot noise term). The cosmic
variance of the merger fraction depends mainly on (i) the number density of the
populations under study, both for the principal (n_1) and the companion (n_2)
galaxy in the close pair, and (ii) the probed cosmic volume V_c. We find a
significant dependence on neither the search radius used to define close
companions, the redshift, nor the physical selection (luminosity or stellar
mass) of the samples. We provide a parametrisation of the cosmic variance with
n_1, n_2, and V_c, sigma_v = 0.48 n_1^{-0.54} V_c^{-0.48} (n_2/n_1)^{-0.37}.
Thanks to this prescription, future merger fraction studies based on close
pairs could account properly for the cosmic variance on their results.
