正在加载图片...
14.7 Do Two-Dimensional Distributions Differ? 645 111/j: decoding its row 1j=1-j*11; and column. mm=(m1=1i-k1)*(m2=1j-kj); pairs=tab[ki+1][kj+1]*tab[li+1][lj+1]; if (mm){ Not a tie. en1 +pairs; en2 +pairs; s +=(mm >0 pairs -pairs); Concordant,or discordant. else if (m1)en1 +=pairs; if (m2)en2 +pairs; 2 2 *tau=s/sqrt(en1*en2) 83g svar=(4.0*points+10.0)/(9.0*points*(points-1.0)); 19881992 *z=(*tau)/sqrt(svar); *prob=erfcc(fabs(*z)/1.4142136); 11800 (including this one) Cambridge NUMERICAL RECIPES CITED REFERENCES AND FURTHER READING: (Nort Lehmann,E.L.1975,Nonparametrics:Statistical Methods Based on Ranks (San Francisco: server computer University Press. THE Holden-Day). America to make one paper Downie,N.M.,and Heath,R.W.1965,Basic Statistica/Methods,2nd ed.(New York:Harper ART Row.pp.206-209. Norusis,M.J.1982,SPSS Introductory Guide:Basic Statistics and Operations;and 1985,SPSS- Programs X Advanced Statistics Guide (New York:McGraw-Hill). SCIENTIFIC 14.7 Do Two-Dimensional Distributions Differ? COMPUTING (ISBN 188810920 We here discuss a useful generalization of the K-S test (814.3)to two-dimensional distributions.This generalization is due to Fasano and Franceschini [1],a variant on an earlier Numerical Recipes 10-621 idea due to Peacock [2]. In a two-dimensional distribution,each data point is characterized by an (r,y)pair of idge.org 43108 values.An example near to our hearts is that each of the 19 neutrinos that were detected from Supernova 1987A is characterized by a time t and by an energy Ei(see [31).We might wish to know whether these measured pairs (E:),i =1...19 are consistent with a (outside theoretical model that predicts neutrino flux as a function of both time and energy-that is, a two-dimensional probability distribution in the (x,y)[here,(t,E)]plane.That would be North Software. a one-sample test.Or,given two sets of neutrino detections,from two comparable detectors, 6 we might want to know whether they are compatible with each other,a two-sample test. In the spirit of the tried-and-true,one-dimensional K-S test,we want to range over the (y)plane in search of some kind of maximum cumulative difference between two two-dimensional distributions.Unfortunately,cumulative probability distribution is not well-defined in more than one dimension!Peacock's insight was that a good surrogate is the integrated probability in each of four natural quadrants around a given point (,i), namely the total probabilities (or fraction of data)in (i,y>y),(<i,y >yi), (i,y<yi),i,y<yi).The two-dimensional K-S statistic D is now taken to be the maximum difference(ranging both over data points and over quadrants)of the corresponding integrated probabilities.When comparing two data sets,the value of D may depend on which data set is ranged over.In that case,define an effective D as the average14.7 Do Two-Dimensional Distributions Differ? 645 Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). li=l/j; decoding its row lj=l-j*li; and column. mm=(m1=li-ki)*(m2=lj-kj); pairs=tab[ki+1][kj+1]*tab[li+1][lj+1]; if (mm) { Not a tie. en1 += pairs; en2 += pairs; s += (mm > 0 ? pairs : -pairs); Concordant, or discordant. } else { if (m1) en1 += pairs; if (m2) en2 += pairs; } } } *tau=s/sqrt(en1*en2); svar=(4.0*points+10.0)/(9.0*points*(points-1.0)); *z=(*tau)/sqrt(svar); *prob=erfcc(fabs(*z)/1.4142136); } CITED REFERENCES AND FURTHER READING: Lehmann, E.L. 1975, Nonparametrics: Statistical Methods Based on Ranks (San Francisco: Holden-Day). Downie, N.M., and Heath, R.W. 1965, Basic Statistical Methods, 2nd ed. (New York: Harper & Row), pp. 206–209. Norusis, M.J. 1982, SPSS Introductory Guide: Basic Statistics and Operations; and 1985, SPSS￾X Advanced Statistics Guide (New York: McGraw-Hill). 14.7 Do Two-Dimensional Distributions Differ? We here discuss a useful generalization of the K–S test (§14.3) to two-dimensional distributions. This generalization is due to Fasano and Franceschini [1], a variant on an earlier idea due to Peacock [2]. In a two-dimensional distribution, each data point is characterized by an (x, y) pair of values. An example near to our hearts is that each of the 19 neutrinos that were detected from Supernova 1987A is characterized by a time ti and by an energy Ei (see [3]). We might wish to know whether these measured pairs (ti, Ei), i = 1 ... 19 are consistent with a theoretical model that predicts neutrino flux as a function of both time and energy — that is, a two-dimensional probability distribution in the (x, y) [here, (t, E)] plane. That would be a one-sample test. Or, given two sets of neutrino detections, from two comparable detectors, we might want to know whether they are compatible with each other, a two-sample test. In the spirit of the tried-and-true, one-dimensional K–S test, we want to range over the (x, y) plane in search of some kind of maximum cumulative difference between two two-dimensional distributions. Unfortunately, cumulative probability distribution is not well-defined in more than one dimension! Peacock’s insight was that a good surrogate is the integrated probability in each of four natural quadrants around a given point (xi, yi), namely the total probabilities (or fraction of data) in (x>xi,y > yi), (x<xi,y > yi), (x<xi,y < yi), (x>xi,y < yi). The two-dimensional K–S statistic D is now taken to be the maximum difference (ranging both over data points and over quadrants) of the corresponding integrated probabilities. When comparing two data sets, the value of D may depend on which data set is ranged over. In that case, define an effective D as the average
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有