Say you have two signals with 100 data points in each signal. Then there are 20 time lags where the computation of the normalized cross-correlation between those signals only considers 10 or less pairs of data points. It seems like the normalized cross-correlation is less meaningful at these lags because it is computed from less data. My question is, is there a general way of accounting for the uncertainty introduced when we look at the correlation with higher lags? Or does that vary too much based on the context?
Describing "correlation" as just a sample by sample multiplication and then a sum of the products of your two data sets [note that I am calling them data sets, not signals to avoid later confusion], correlated components will increase in magnitude at rate N (20Log N in dB), while independent components will increase in magnitude at the square root of N (10Log N in dB). If we consider the correlated components as the "Signal" of interest and the independent components as noise, we can see that we get a 20Log N - 10Log N = 10LogN increase in SNR due to the process of correlating.
With that in mind, consider your example if the first data set is a signal of interest "buried" in noise. Let's say it is a pseudo-random sequence, which is nice for this explanation in that we will get a sharp correlation at one delay and minimum correlation elsewhere. The second data set is the pseudo-random sequence itself. We correlate to find the presence of the sequence in the noisy data set, along with the delay (the lag where we get maximum correlation). Now here you should see the answer to your question in light of my description above: Assume the sequences are completely aligned in the two 100 sample datasets (lag=0), in this case we get 100 samples where the signal accumulates in the correlation, to 100x= 40 dB, while the noise component accumulates to sqrt(100x) = 20dB, and therefore you got a 20 dB net processing gain in SNR due to your 100 samples (important! Assuming here the noise from sample to sample in the first data set is independent, meaning white in frequency).
Now consider the sequences are not aligned until you are at a lag of 90 samples, such that only 10 samples really are multiplied and then summed. In this case the signal accumulates by 10x or 20dB and the noise accumulates by sqrt(10) = 10dB for a net processing gain in SNR of 10 dB.