Question: I am photographing a scene with white and black elements in it. Starting at the f/22 stop, I widen the aperture one stop and decrease the exposure time by a factor of 2, take a picture, and keep doing this for all the f-stops on the lens. My expectation is that raw counts should stay the same inside a white region or a black region since **halving the exposure time compensates for widening the aperture**. But when I select a white region and average its pixel raw counts for each image, there is **variability between the images** (the standard deviation of the raw counts is ~5% of the mean). Same thing if I select and average a black region. I am not knowingly changing anything else (illumination, camera position), and the camera is a scientific CMOS. What could be causing this variation: noise, or something more systematic?

Answer: 
In theory, yes — stops are interchangeable. In practice, they do not *perfectly* cancel to complete precision.

> 
> the standard deviation of the raw counts is ~5% of the mean
> 
> 
> 

In photographic terms, this is *basically nothing*. It is far below human perception, and even when the difference is noticeable, the generally-expected workflow involves working with each image individually, so the photographer can compensate either in the field or in post-production.

Cameras meant for photography are not measuring devices; using them as such is setting yourself up for disappointment. Making the devices much more precise would be a lot more expensive and provide no benefit for the target market. Even if you have a camera made for scientific purposes, these particular tolerances might not be within the relevant area of concern.

If you're trying to get perfection for something like a time-lapse or another series of photos, post-processing to even out the fluctuations is your best bet.
I think it wasn't mentioned: with increase in exposure time comes increase in thermal Dark Shot noise. You can read more [here](https://www.thorlabs.com/newgrouppage9.cfm?objectgroup_id=10773), for example

[![enter image description here](https://i.stack.imgur.com/AFRfb.gif)](https://i.stack.imgur.com/AFRfb.gif)