# Xx

where P(x) is the probability that x events will occur, x is the mean number of events, e is the base of natural logarithms (2.718...), and x! denotes x -factorial.

The x! term computes the number of arrangements of photons that are possible, and xx describes how many different combinations of photons will yield x events. The e~x term adjusts probabilities so that for zero to infinity events, the sum of the probabilities is 100%.

The Poisson distribution tells us, for example, that when the mean number of photons, x, is 1 per sample, there's a 36.8% chance that zero events will occur, a 36.8% chance that one event will occur, an 18.4% chance that two events will occur, a 6.1% chance that three events will occur, a 1.5% chance that four events will occur, and an 0.3% chance that five events will occur in each sample. Poisson statistics is the mathematical scaffolding behind the irregular "click-a-click, clic-kitty, clack" pattern of the Geiger counter and the random sound of raindrops on the tin roof. Blind chance means that sometimes no events occur, sometimes several events occur, and sometimes (but rarely) many events occur.

In Poisson statistics, the number of events is always a positive integer. Positive because, by the nature of events, fewer than zero cannot happen. Integers because there is no such thing as half an event—an event (such as capturing a photon) either happens or does not happen. Everything we've said about x, *Jk, and signal-to-noise ratio in the sections above applies to the Poisson distribution.

When the mean signal grows larger than about 20 events, however, the Poisson distribution becomes nearly indistinguishable from a Gaussian distribution (although technically, it remains a Poisson distribution). The Gaussian distribution, or normal distribution, is the standard bell-shaped curve that everyone who studies statistics knows and cherishes. The Gaussian distribution describes just about every process in which random deviations from a mean value occur.

The following describes the probability that x photon detections will occur in a sample interval:

Jinx where P(x) is the probability that x events will occur, x is the mean value, and e is the base of natural logarithms (2.718...). In this case, the \/ Jinx term insures that the sum of probabilities from zero to infinity events will equal 1.0.

What we've said in the earlier sections about x , Jk , and signal-to-noise ratio also applies to this Gaussian approximation of the Poisson distribution. In this respect, the Poisson and Gaussian distributions for counting photons are wonderfully simple and well-behaved.

### 2.3.2 Collecting More Photons by Image Summing

Because more photons produce higher image quality, astronomers try to collect as many as possible. One way to increase the total number of photons is to increase the exposure time, which is effective so long as no important parts of the image reach the sensor's full-well capacity (the largest signal it can produce). Another method is to add a series of images together, which increases the number of photons in the sample, thereby increasing the signal-to-noise ratio.

Assuming that the images are in register so that the same features appear at the same location from one image to the next, then given a mean count of x photons at a given location, adding N images will put a total flux of Nx photons in that location. The signal-to-noise ratio for the summed image, SNR^, will be:

Comparing the SNR for a single image to the SNR for N images reveals that the summing N image improves the SNR by a factor of Jn . If you want a signal-to-noise ratio that is four times better than you are getting from a single image, you need to sum 16 images.

As a practical matter, summing can be inconvenient when you are trying to compare summed data made with different numbers of images. Instead of summing the images, you can average them by dividing the sum by the N. In averaging, both the signal and the noise are reduced by the same factor. The signal-to-noise ratio for the averaged image will be:

JWx/N

Providing you do not integerize the quotient, the signal-to-noise ratio is exactly the same whether you have summed or averaged multiple images.

The images that you see on amateur websites and for that matter, from the Hubble Space Telescope, are made by summing many images. Hubble's Ultra-Deep Field image of galaxies in early Universe was made by summing hundreds of images taken during a two-week time frame. A side benefit of summing images is that if some of the them are marred by airplane trails, bad guiding, or blurring, you just throw away the bad images and sum good ones.

### 2.3.3 Measuring Noise

Up to this point we have assumed that you have magically known how many photons fell on the detector. Knowing this enabled you to compute the noise and the signal-to-noise ratio. But in fact, you seldom know directly how many photons created the signal—all you have is a series of samples expressed in arbitrary units, ADUs, or analog-to-digital units. The numerical pixel values in the images from your digital camera or CCD are in units of ADUs.

Despite not knowing the true number of photons, you can still determine the signal-to-noise ratio at a specified signal level such as the sky background. Here's how you can go about doing just that.

You already know how to calculate the mean value of the sample in a set of signal values—as in Equations 2.1 and 2.2, you sum the signal values and divide the sum by the number of samples. That gives you the signal. The standard deviation measures the departure of the samples from the mean value; so suppose that after computing the mean, you subtract the mean value from each sample value. Sometimes an individual sample will be larger than the mean so the deviation from the mean will be positive, and sometimes the sample will be smaller than the mean so the deviation will be a negative number. If you average all the deviations together, the positives and negatives will largely cancel. To make all deviations positive, you square the deviations, take the mean value, and then to counteract having squared the deviations, you take the square root of the mean of the deviations. This gives the "root mean square" deviation, or standard deviation from the mean of a series of measurements.

In mathematical notation, the root-mean-square operation looks like this:

In this equation, we've used the Greek letter o (sigma) to denote the standard deviation, x for the mean value, and n for the number of samples we have of x. Many pocket calculators and adding machines have a built-in standard deviation function—you enter a set of values for x , press the statistics key, and the machine computes x and o.

You can summarize what you know about the signal with the statement that the signal equals x ± o. The value of x expresses the mean, and the value of a captures the degree of uncertainty in the mean value. If the deviations in the value of x have a normal distribution, then:

• 68.3% of samples will fall x in the range x ± a,

• 95.4% of samples will fall x in the range x ±2 o, and

• 99.7% of samples will fall x in the range x ± 3a.

For these statistical properties to apply, the signal must follow a Gaussian distribution. While not the case with every type of random event, when it comes to counting reasonably large numbers of photons, these statistical rules do apply.

### 2.3.4 Signals Become More Complicated

Although it is tempting to expect the signal-to-noise ratio to be x/o , that simply is not true. The reason is that although you have computed the mean value of x in ADUs, you don't actually know whether zero ADUs means zero photons. In many types of measurement, and in all CCD cameras, the zero point in ADUs is offset from the true zero signal level. This zero offset is called the signal bias, or just plain bias. In other words, even when zero photons fall on the detector, the camera reports a bias signal, usually a small positive value such as 100.

Measurement bias is nothing new—in fact, you are used to dealing with it in

your daily life. If you want one pound of cashew nuts at the grocery store, you can weigh the nuts. However, before putting any nuts on the scale, you check its reading. If the empty scale reads half a pound, you know that you must add nuts until the scale reads one-and-a-half pounds. The zero-point offset of the scale is exactly the same as the bias value in a digital camera.

To find the signal-to-noise ratio, you must subtract the bias value, which we will call b , from the mean signal, thus: 