next up previous contents
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 $\Omega_0$ (dimensionless) of the frequency spectrum $\Omega_{\rm gw}(f)$ for the stochastic background:

\begin{displaymath}
\Omega_{\rm gw}(f)=\left\{
\begin{array}{cl}
\Omega_0 & \qua...
... f_{\rm high}\0 & \quad {\rm otherwise.}
\end{array}\right.
\end{displaymath}

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

prelim_stats() calculates the theoretical and experimental mean value, standard deviation, and signal-to-noise ratio, weighting each measurement $S_i$ by the inverse of the theoretical variance $\sigma_i^2$ 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 $S_i$ $(i=1,2,\cdots,n)$ denote a set of $n$ statistically independent random variables, each having the same mean value

\begin{displaymath}
\mu:=\langle S_i\rangle\ ,
\end{displaymath} (11.24.268)

but different variances
\begin{displaymath}
\sigma_i^2:=\langle S_i^2\rangle - \langle S_i\rangle^2\ ,
\end{displaymath} (11.24.269)

then one can show that the weighted-average
\begin{displaymath}
\bar S:={\sum_{i=1}^n \lambda_i S_i\over \sum_{j=1}^n \lambda_j}
\end{displaymath} (11.24.270)

has maximum signal-to-noise ratio when $\lambda_i=\sigma_i^{-2}$. 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
\begin{displaymath}
T_{\rm tot}:=n\ T\ ,
\end{displaymath} (11.24.271)

where $n$ is the total number of measurements, and $T$ is the observation time of an individual measurement.
(ii)
The theoretical mean is given by the product
\begin{displaymath}
\mu_{\rm theory}=\Omega_0\ T\ .
\end{displaymath} (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
\begin{displaymath}
\sigma^2_{\rm theory}={n\over \sum_{i=1}^n\sigma_i^{-2}}\ .
\end{displaymath} (11.24.273)

Note that when the detector noise power spectra are constant, $\sigma^2_i=:\sigma^2$ for $i=1,2,\cdots,n$ and $\sigma^2_{\rm theory}=\sigma^2$. 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 $n$ measurements) is given by
\begin{displaymath}
{\rm SNR}_{\rm theory}=\sqrt{n}\ {\mu_{\rm theory}\over\sigma_{\rm theory}}\ .
\end{displaymath} (11.24.274)

The factor of $\sqrt n$ comes from our assumption that the $n$ individual measurements are statistically independent.
(v)
The experimental mean is the weighted-average
\begin{displaymath}
\mu_{\rm expt}:={\sum_{i=1}^n\sigma_i^{-2}S_i\over
\sum_{j=1}^n \sigma_j^{-2}}\ .
\end{displaymath} (11.24.275)

(vi)
The experimental variance is given by
\begin{displaymath}
\sigma^2_{\rm expt}:={\sum_{i=1}^n\sigma_i^{-2}S_i^2\over
\sum_{j=1}^n \sigma_j^{-2}}-\mu_{\rm expt}^2\ .
\end{displaymath} (11.24.276)

When the weights $\sigma_i^{-2}$ are constant, the above formula reduces to the usual expression
\begin{displaymath}
\sigma^2_{\rm expt}={1\over n}\sum_{i=1}^n S_i^2-
\left({1\over n}\sum_{i=1}^n S_i\right)^2
\end{displaymath} (11.24.277)

for the variance of $n$ measurements $S_i$.
(vii)
The experimental signal-to-noise ratio is given by
\begin{displaymath}
{\rm SNR}_{\rm expt}=\sqrt{n}\ {\mu_{\rm expt}\over
\sigma_{\rm expt}}\ .
\end{displaymath} (11.24.278)

(viii)
The relative error in the signal-to-noise ratios is
\begin{displaymath}
{\rm relative\ error}:=\left\vert
{{\rm SNR}_{\rm theory}-{\...
...rm expt}\over
{\rm SNR}_{\rm theory}}\right\vert\cdot 100\%\ .
\end{displaymath} (11.24.279)

The value of this quantity should be on the order of $(1/{\rm SNR}_{\rm theory})\cdot 100\%$.

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.


next up previous contents
Next: Function: statistics() Up: GRASP Routines: Stochastic background Previous: Function: analyze()   Contents
Bruce Allen 2000-11-19