Next: Function: statistics() Up: GRASP Routines: Stochastic background Previous: Function: analyze()   Contents

## Function: prelim_stats()

0

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)

but different variances
 (11.24.269)

then one can show that the weighted-average
 (11.24.270)

has maximum signal-to-noise ratio when . Roughly speaking, the above averaging scheme assigns more weight to signal values that are measured when the detectors are quiet,'' than to signal values that are measured when the detectors are noisy.''

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

(i)
The total observation time is
 (11.24.271)

where is the total number of measurements, and is the observation time of an individual measurement.
(ii)
The theoretical mean is given by the product
 (11.24.272)

This follows from our choice of normalization constant for the optimal filter function. (See Sec.  for more details.)
(iii)
The theoretical variance is given by
 (11.24.273)

Note that when the detector noise power spectra are constant, for and . This case arises, for example, if we do 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)

The factor of comes from our assumption that the individual measurements are statistically independent.
(v)
The experimental mean is the weighted-average
 (11.24.275)

(vi)
The experimental variance is given by
 (11.24.276)

When the weights are constant, the above formula reduces to the usual expression
 (11.24.277)

for the variance of measurements .
(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)

The value of this quantity should be on the order of .

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