The function software/module_A_chisq.m implements a module for the feature calculation (5.1). The module uses a floating reference hypothesis for normalization (Section 2.3.4). The function software/module_A_chisq_synth.m implements UMS and function software/module_A_chisq_test.m tests both functions.

Example 8   We now provide an example of the application of the SPA to a linear combination of exponentials. We performed an acid test (see Section 2.3.8) by generating 1000 samples of a 100-by-1 vector $ {\bf x}$ of independent exponentially distributed RVs. The elements of $ {\bf x}$ were scaled such that the expected value of the $ i$-th element was $ 100+i$, $ i=1,2 \ldots N$. Let the PDF of $ {\bf x}$ under these conditions be denoted by $ p({\bf x}\vert H_a)$. Although the elements of $ {\bf x}$ have different means, they are independent, so $ p({\bf x}\vert H_a)$ is easily obtained from the joint PDF from product of chi-square distributions with 2 degrees of freedom (Section 16.1.2).

Next, we applied the linear transformation $ {\bf z}= {\bf A} {\bf x}$, where

$\displaystyle {\bf A} = \left[
\begin{array}{rr} 1 & .01  1 & .02  1 & .03 \\
\vdots & \vdots  1 & 1

Notice that the columns of $ {\bf A}$ form a linear subspace which contains both the special scaling function applied to $ {\bf x}$ under $ H_a$ as well as constant scaling under $ H_0$. We can assume, therefore, that $ {\bf z}$ will be approximately sufficient for $ H_a$ vs. $ H_0$. We then estimated the PDF $ p({\bf z}\vert H_a)$ using a Gaussian mixture model (Section 13.2.1).

Using the module software/module_A_chisq.m, we obtained the projected PDF:

$\displaystyle \log p_p({\bf x}\vert H_a) = \log J({\bf x}) + \log p({\bf z}\vert H_a),$


$\displaystyle \log J({\bf x}) = \log p({\bf x}\vert H_0$$ ({\bf z})$$\displaystyle ) - \log p({\bf z}\vert H_0$$ ({\bf z})$$\displaystyle ).$

Projected PDF values are plotted against the true values of $ p({\bf x}\vert H_a)$ in Figure 5.1. The agreement is very close. The script software/module_A_chisq_test.m runs the example with the following syntax:

Figure 5.1: Acid test results for module_A_chisq.m.
\includegraphics[width=4.2in,height=3.9in, clip]{A_chisq_spa.eps}

We then changed matrix $ {\bf A}$ to include only the first column (a constant). This makes $ {\bf z}$ a scalar and no longer an approximate sufficient statistic for $ H_a$ vs. $ H_0$. The result is shown in Figure 5.2. Note the worsening of the error. The script software/module_A_chisq_test.m runs this test with the following syntax:

Figure 5.2: Acid test results for module_A_chisq.m with insufficient features.
\includegraphics[width=4.5in,height=3.0in, clip]{A_chisq_spa2.eps}

Baggenstoss 2017-05-19