Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Old bug in corrcoef not yet fixed
Date: Thu, 08 Jan 2009 02:19:49 -0500
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gk49el$784$1@fred.mathworks.com>
References: <gk3k0q$hko$1@fred.mathworks.com> <gk3oon$be3$1@fred.mathworks.com> <gk3so5$h1e$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1231399189 7428 172.31.57.88 (8 Jan 2009 07:19:49 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 8 Jan 2009 07:19:49 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
In-Reply-To: <gk3so5$h1e$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:510368

Pasco Alquim wrote:

> Sorry, but what I see in the docs is
> 
> [...]=corrcoef(...,'param1',val1,'param2',val2,...) specifies additional parameters and their values. Valid parameters are the following. 
>   'alpha' A number between 0 and 1 to specify a confidence level of 100*(1 - alpha)%. Default is 0.05 for 95% confidence intervals.
> 
> No mention that, when 'alpha' is provided, one must have 4 argouts

What exactly would you expect the confidence level argument to _do_ if you do not compute the confidence bounds?

> And why should p be the probability for the 95% confidence only? Which is in fact is what it does.

You seem to have a fundamental misunderstanding of what a p-value is.  Choosing a confidence level _in advance_ for a confidence interval has absolutely nothing to do with a p-value, which is the probability of an observed event given an assumed null model.  At best, you could describe the p-value as the smallest significance level at which the null hypothesis "H0: correlation = 0" would have been accepted.

The second output argument from corrcoef is exactly what the help describes it to be:

"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."