  Total internal reflection microscopy (TIRM) measures changes in the distance
between a colloidal particle and a transparent substrate by measuring the
intensity of light scattered by the particle when it is illuminated by the
evanescent field that is created from light totally internally reflected at the
substrate interface. From these measurements, the height-dependent effective
potential $\varphi(z)$ between the colloidal particle and the substrate can be
measured. The spatial resolution with which TIRM can resolve the height $z$ and
effective potential $\varphi(z)$ is limited by the intrinsic shot noise of the
photon counting process used to measure the scattered light intensity. We
develop a model to determine the spatial resolution with which TIRM can measure
$\varphi(z)$ and verify its validity with simulations and experiments. We
further establish the critical role of photon-counting statistics and the
intensity integration time $\tau$ in TIRM measurements, which is a trade-off
between narrowing the width of the photon counting distribution and capturing
the instantaneous position of the probe particle.
