  We present a novel approach for measuring the two-point correlation function
of galaxies in narrow pencil beam surveys with varying depths. Our methodology
is utilized to expand high-redshift galaxy clustering investigations up to $z
\sim 8$ by analyzing a comprehensive sample consisting of $N_g = 160$ Lyman
break galaxy candidates obtained through optical and near-infrared photometric
data within the CANDELS GOODS datasets from the Hubble Space Telescope Legacy
Fields. For bright sources with $M_{UV} < -19.8$, we determine a galaxy bias of
$b = 9.33\pm4.90$ at $\overline{z} = 7.7$ and a correlation length of $r_0 =
10.74\pm7.06$ $h^{-1}Mpc$. We obtain similar results for the XDF, with a galaxy
bias measurement of $b = 8.26\pm3.41$ at the same redshift for a slightly
fainter sample with a median luminosity of $M_{UV} = -18.4$. By comparing with
dark-matter halo bias and employing abundance matching, we deduce a
characteristic halo mass of $M_h \sim 10^{11.5} M_{\odot}$ and a duty cycle
close to unity. To validate our approach for variable-depth datasets, we
replicate the analysis in a region with near-uniform depth using a standard
two-point correlation function estimator, yielding consistent outcomes. Our
study not only provides a valuable tool for future utilization in JWST datasets
but also suggests that the clustering of early galaxies continues to increase
with redshift beyond $z \gtrsim 8$, potentially contributing to the existence
of protocluster structures observed in early JWST imaging and spectroscopic
surveys at $z \gtrsim 8$.
