By downloading this code you agree to the
Source Code Use License (PDF). |
{ version = 1.12; (* of ttest.p 2015 Jul 20} (* begin module describe.ttest *) (* name ttest: Student's t-test synopsis ttest(ttestp: in, list: out, output: out) files ttestp: parameters to control the program: A set of 6 lines defines the two distributions: N (integer) for first distribution mean (real) for first distribution standard deviation (real) for first distribution N (integer) for second distribution mean (real) for second distribution standard deviation (real) for second distribution The 7th line is the factor to divide the sample by. If we have an Rsequence calculated from a dimeric sequence, then the two halves are NOT independent. The correct calculation takes this into account by using the same N for the one-way sites and by dividing the mean by 2. Squaring the standard deviation gives the variance. This variance is divided by 2 and then square rooted to get the variance of the half sites. If this "sample division factor" is 1, then the calculations proceed without them. If the factor is 2, then the changes described above are made. list: Input values and calculated T value output: messages to the user description This simple program performs the T test computations. examples 7 OxyR binding site sequences were analzyed for information content and the standard deviation calculated by the rsim.p program. This gave 15.4 +/- 1.9 bits for n = 14 sequences. A randomization experiment was performed and 16 sequences which bind OxyR were recovered. These were analyzed as above. This gave 17.5 +/- 1.2 bits for n = 32 sequences. Since both the sequences and their complements were used for the calculation, only half site information should be used. The ttest p file is: 14 n1: number of samples, sample 1 15.4 m1: mean, sample 1 1.9 s1: standard deviation, sample 1 32 n2: number of samples, sample 2 17.5 m2: mean, sample 2 1.2 s2: standard deviation, sample 2 2 sample division factor. The resulting list file is: ******************************************************************************** old: ttest 1.04 sample division by a factor of 2 distribution 1 | distribution 2 number 14 | 32 mean 7.70000 | 8.75000 standard dev. 1.34350 | 0.84853 sigma-D = 0.38914 degrees of freedom = 44 t = -2.69827 This is significant (p < 0.02). So the randomization did not give a similar information content to the wild type. ******************************************************************************** ttest 1.08 sample division by a factor of 2 distribution 1 | distribution 2 number 14 | 32 mean 7.70000 | 8.75000 standard dev. 1.34350 | 0.84853 sigma-D = 0.38914 degrees of freedom = 44 t = -2.69827 p = 0.99508 documentation @book{Press1989, author = "W. H. Press and B. P. Flannery and S. A. Teukolsky and W. T. Vetterling", title = "Numerical Recipies in Pascal. The Art of Scientific Computing", publisher = "Cambridge University Press", address = "Cambridge", year = "1989"} @article{Schneider.oxyr, author = "T. D. Schneider", title = "Reading of {DNA} Sequence Logos: Prediction of Major Groove Binding by Information Theory", journal = "Meth. Enzym.", volume = "274", pages = "445-455", year = "1996"} Given a t value from a Student's t test, and the degrees of freedom, df, return the probability for a two tailed test. The code was originally in java script, from: Richard Lowry Department of Psychology Vassar College Poughkeepsie, NY 12604-0396 USA office: (914)437-7381 fax: (914)437-7538 lowry@vassar.edu http://faculty.vassar.edu/~lowry/VassarStats.html The original functional html containing this code is given below the Pascal. It was translated to Pascal by Tom Schneider. A concise description of the t-test is given on page 1256 of: @article{Bulyk.Church2002, author = "M. L. Bulyk and P. L. Johnson and G. M. Church", title = "{Nucleotides of transcription factor binding sites exert interdependent effects on the binding affinities of transcription factors}", journal = "Nucleic Acids Res.", volume = "30", pages = "1255--1261", pmid = "11861919", pmcid = "PMC101241", year = "2002"} see also rseq.p, rsim.p, multtest.p http://www.statsol.com/tools/stattools/ttestindependenttool.html http://faculty.vassar.edu/~lowry/VassarStats.html Bulyk.Church2002: http://www.ncbi.nlm.nih.gov/pubmed/11861919 author Thomas Dana Schneider bugs technical notes *) (* end module describe.ttest *) {This manual page was created by makman 1.45}{created by htmlink 1.62}