Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: Old bug in corrcoef not yet fixed Date: Thu, 8 Jan 2009 02:35:03 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 41 Message-ID: <gk3oon$be3$1@fred.mathworks.com> References: <gk3k0q$hko$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1231382103 11715 172.30.248.37 (8 Jan 2009 02:35:03 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 8 Jan 2009 02:35:03 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:510342 "Pasco Alquim" <pasquimm@yahoo.com> wrote in message <gk3k0q$hko$1@fred.mathworks.com>... > Help info of corrcoef says that > > % 'alpha' A number between 0 and 1 to specify a confidence > % level of 100*(1-ALPHA)%. Default is 0.05 for 95% > % confidence intervals. > > However, the 'alpha' value is simply ignored (as far back as in R13) > e.g > Sorry for the repetition but I forgot one very important thin in the subject - the BUG word > > xy = rand(10,2); > [r,p]=corrcoef(xy) > > r = > 1.0000 0.3724 > 0.3724 1.0000 > p = > > 1.0000 0.2892 > 0.2892 1.0000 > > > [r,p]=corrcoef(xy,'alpha',0.5); > r = > 1.0000 0.3724 > 0.3724 1.0000 > p = > 1.0000 0.2892 > 0.2892 1.0000 As I understand it, the confidence level set with the 'alpha' parameter is used in computing the confidence interval bounds, 'rlo' and 'rup', returned in the third and fourth output values of 'corrcoef': [r,p,rlo,rup] = corrcoef(...) It has nothing to do with the 'r' and 'p' values returned. In particular the 'p' values, which are based on a statistical normality assumption about the data, do not involve a confidence level setting. To quote Mathworks' documentation, "Each p-value is the probability of getting a correlation as large as the observed value by random chance, when the true correlation is zero." You don't need a confidence level to make such a probability assessment, just a reference to an assumed probability distribution. To show any differences between the default 'alpha' value .05 and the .5 value you entered, you would have to display these confidence interval bounds. Do you detect any effect there? Roger Stafford