File Size as a Measure of Image Detail
As discussed for the Nikon D800E, file sizes with lossless compressed images are larger for images containing more data, and hence the file is a crude measure of the amount of image detail present in the file. Of course, an image with a blurred background naturally has less detail, so context must be included.
RAW file size (lossless-compressed variants) for the same scene across apertures is an excellent measure of the total detail recorded, which includes the effects of depth of field, diffraction, exposure, and overall lens performance.
Some cameras don’t offer lossless compression (a troublesome waste of space); the Leica M cameras are of this type. Don’t confuse lossy compression (can be OK, but has potential issues) with lossless compression (same as original).
On a shoot today, I made 138 images with the Sigma DP3 Merrill. The average file size was 48.7MB, but observe that one whopper was 72.3MB (!). The smallest was 44.14MB.
Sigma uses lossless compression (good) to store the files, which is why the size varies: image content is more or less compressible for each image. The compression might also account for why saving a file takes so long.
Brightness
Thanks to reader Samuli V for pointing out that in general, brighter images also are larger (less compressible). This is true and worth stating explicitly on its own. However, it can also be thought of as detail: an underexposed image has less numeric precision; a brighter one greater numeric precision (e.g. an average of 8 bits used out of 12 bits possible on the sensor, versus 11 or 12 bits for a bright exposure).
Hence the value of ETTR: it increases the detail (numeric precision) which also tends to create greater variance in values (less compressible, higher Shannon entropy).
With a darker image the high-order bits are likely to be zero, and thus can be compressed away, reducing file size.
Other factors including noise (think high ISO) also affect file size. Noisy files are hard to compress because the low-order 4-5 bits vary randomly.
Here’s our bad-boy 72.3MB image— it’s chock full of single-pixel details. With the Sigma/Foveon sensor, each pixel is 12 X 3 bits (36 bits) and can record a true color value. Finished images are 14.75 megapixels, but there’s also an embedded JPEG and other stuff in the file. Anyway, 14.75 X 36 bits * 1 byte/8 bits = 66.375MB of data.