Function:

`prelim_stats(float omega_0,float t,double signal,double variance)`

This function calculates and displays the theoretical and
experimental mean value, standard deviation, and signal-to-noise ratio
for a set of stochastic background cross-correlation signal measurements,
weighting each measurement by the inverse of the theoretical
variance associated with that measurement.

The arguments of `prelim_stats()` are:

`omega_0:`Input. The constant value (dimensionless) of the frequency spectrum for the stochastic background:

should be greater than or equal to zero.`float t:`Input. The observation time (in sec) of an individual measurement.`double signal:`Input. The value of the current cross-correlation signal measurement. This variable has units of seconds.`double variance:`Input. The value of the theoretical variance associated with the current cross-correlation signal measurement. This variable has units of sec.

`prelim_stats()` calculates the theoretical and experimental
mean value, standard deviation, and signal-to-noise ratio,
weighting each measurement by the inverse of the theoretical
variance associated with that measurement.
This choice of weighting maximizes the theoretical signal-to-noise,
allowing for possible drifts in the detector noise power spectra
over the course of time.
More precisely, if we let
denote a set of
statistically independent random variables, each having the same
mean value

(11.24.268) |

(11.24.269) |

(11.24.270) |

The values calculated and displayed by `prelim_stats()` are
determined as follows:

- (i)
- The total observation time is

(11.24.271) - (ii)
- The theoretical mean is given by the product

(11.24.272) - (iii)
- The theoretical variance is given by

(11.24.273) *not*calculate real-time noise power spectra, but use noise power information contained in data files instead. - (iv)
- The theoretical signal-to-noise ratio (for
measurements) is given by

(11.24.274) - (v)
- The experimental mean is the weighted-average

(11.24.275) - (vi)
- The experimental variance is given by

(11.24.276)

(11.24.277) - (vii)
- The experimental signal-to-noise ratio is given
by

(11.24.278) - (viii)
- The relative error in the signal-to-noise
ratios is

(11.24.279)

Note: `prelim_stats()` has internally-defined static variables
which keep track of the number of times that it has been called, the
sum of the weights, the sum of weights times the signal values, and
the sum of the weights times the signal values squared.

- Authors: Bruce Allen, ballen@dirac.phys.uwm.edu, and Joseph Romano, romano@csd.uwm.edu
- Comments: None.