# Statistical Significance p Value

In this context, the p value can be defined as the probability that a random expression profile shows max correlation greater than a given value (Fig. 3). The p value is experimentally calculated by generating random expression profiles, calculating maxCorr for each random profile, and finally, counting the frequency of a random expression profile showing maxCorr greater than the chosen value. When a maxCorr value increases, the associatedp value decreases; in other words, a smaller p value indicates that random expression profiles are more unlikely to show a defined maxCorr.

1. Generate 100,000 random expression profiles and calculate maxCorr for each of them, thereby creating the maxCorr distribution of random expression profiles. The Mathematica code to obtain this distribution is as follows:

randomCorrs={}; For[i=1,i<= 100000,i++, randomExpression=Table[Random[NormalDistribution[0,1]], {t,1,12}];

corrs=Table[Correlation[randomExpression,cosines[[i]]] ,{i,1,Length[cosines]}]; randomCorr = Max[corrs]; AppendTo[randomCorrs,randomCorr];

This process usually takes several hours on an up-to-date PC (such as Pentium4 3GHz; see Note 3). Time

Fig. 2. Crosscorrelation between the expression profile of a gene and theoretical cosine waves. The experimental profile (black line) is compared with 60 cosine waves of fixed periodicity (e.g., 24 h), varying in phase from 0 to 24 h. A gray line indicates the best-correlated cosine wave. For convenience, only 6 out of the 60 cosine waves are shown here.

Time

Fig. 2. Crosscorrelation between the expression profile of a gene and theoretical cosine waves. The experimental profile (black line) is compared with 60 cosine waves of fixed periodicity (e.g., 24 h), varying in phase from 0 to 24 h. A gray line indicates the best-correlated cosine wave. For convenience, only 6 out of the 60 cosine waves are shown here.

2. Save the result in a file:

Save["C:\\work\\randomCorrs.txt",randomCorrs];

3. Using the following Mathematica code it is possible to reload the random correlation data at any time, even after restarting Mathematica:

4. Count the number of times that a random expression profile shows maxCorrs greater than a specified value. The following Mathematica code can be used to perform this (see Note 4):

CountGreater[maxCorr_,value_]:=Length[ Select[randomCorrs,(# > value)&]]

5. Calculate the p value with the following code:

sortRandomCorrs=Sort[randomCorrs]; pValues=Table[CountGreater[sortRandomCorrs, maxCorrs[[i]]]/Length[sortRandomCorrs],{i,1/ Length[maxCorrs]}];

a Cross Correlation b Fourier transform a Cross Correlation b Fourier transform Fig. 3. maxCorr and s/n ratio distributions calculated from 100,000 random expression profiles. The curves indicate the probability of obtaining a particular value of maxCorr (A) or s/n ratio (B), when 100,000 random expression profiles are generated. The shaded area, compared with the total under the probability curve, indicates thep value associated with a particular value of maxCorr (= 0.7, A) or s/n ratio (= 2.3, B). In this graph thep values are about 0.05.

Fig. 3. maxCorr and s/n ratio distributions calculated from 100,000 random expression profiles. The curves indicate the probability of obtaining a particular value of maxCorr (A) or s/n ratio (B), when 100,000 random expression profiles are generated. The shaded area, compared with the total under the probability curve, indicates thep value associated with a particular value of maxCorr (= 0.7, A) or s/n ratio (= 2.3, B). In this graph thep values are about 0.05.