How to measure correlation between 1 bit samples and theoretical original waveform? I'm investigating quantization error.
I have an analogue waveform that looks like this and is of theoretically infinite resolution:-

I've sampled it as (8 bit oscilloscope readings &amp; 0b1) to produce a file of single ones or zeros. The samples are partially random as per quantization theory, but I want to check the correlation with the analogue original. Theory suggests that there should be some correlation.
How can I do that? Clearly I can't compare the 1 bit samples with the 8 bit samples they came from.
Put another way, how can I show that my quantization is entirely uncorrelated to the underlying waveform?

Edit &amp; maybe a solution:-
St is the theoretical and perfect(!) signal.
S1 is my sample set as (scope reading) &amp; 0b1.
S2 is another independent sample set as (scope reading) &amp; 0b1.
It occurs to me that I can't possibly compare S1 with St, as quantisation error will be present in both sets. But, if S1 ~ St, then by inference S2 ~ St. Hence I can test the hypothesis that S1 ~ S2 since they're both derived from common signal St. If there is a correlation, then S1 must be correlated to St too.
So I can just use normal correlation analysis (or Hamming distance, Jaccard index) between S1 and S2 to measure any. Yes/no?
I've sampled it at a 1 bit resolution (as 8 bit oscilloscope readings &amp; 0b1)

No. Taking the LSB is NOT 1 bit quantization. A one bit quantizers are not trivial to design. For a zero mean signal that's reasonably symmetrically distributed over positive and negative values, you can just take the sign bit. For signals that are asymmetrically distributed around their mean, designing a decent 1 bit quantizer takes a bit of work.
In your example you should quantize so that you get a &quot;1&quot; of the signal is above the mean and and &quot;0&quot; if it's below the mean. If you do this, you will see that both quantization noise and quantized signal are highly correlated with the original signal. Both will be periodic with the same period.
If you want to study quantization noise, I recommend starting with higher bit levels, i.e. where the amplitude of the signal is much larger than the quantization steps. This makes the choice of quantizer very simple and in most case you can assume that the quantization noise is uniformly distributed. Otherwise, you need to tackle the subject of &quot;optimum quantizer&quot; which requires some non-trivial math.