Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!elk.ncren.net!usenet01.sei.cmu.edu!news.cse.ohio-state.edu!news.glorb.com!news2.glorb.com!postnews.google.com!b3g2000pre.googlegroups.com!not-for-mail
From: Mehdi <zeidouni@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Problem with chi2pdf command
Date: Tue, 20 Oct 2009 10:17:46 -0700 (PDT)
Organization: http://groups.google.com
Lines: 19
Message-ID: <9c4ab2e8-c489-470d-a965-5a09da289114@b3g2000pre.googlegroups.com>
References: <6424e579-857f-4338-9eed-3c1cec652721@y10g2000prg.googlegroups.com> 
	<5ff6306e-bd1d-49be-a568-0652e62956c2@b3g2000pre.googlegroups.com>
NNTP-Posting-Host: 136.159.250.61
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256059066 15004 127.0.0.1 (20 Oct 2009 17:17:46 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 20 Oct 2009 17:17:46 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: b3g2000pre.googlegroups.com; posting-host=136.159.250.61; 
	posting-account=ChACEQoAAAA8AqGZA8k-AHZJR_ViGrOl
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) 
	Gecko/2009082707 Firefox/3.0.14 GTB5 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:578753


On Oct 20, 8:09 am, Brian Borchers <borchers.br...@gmail.com> wrote:
> On Oct 20, 7:56 am, Mehdi <zeido...@gmail.com> wrote:
>
> > Hello everyone:
> > I am using the command below to find the probability of chi-square
> > larger than 0.0052 with 1 degree of freedom: chi2pdf(0.0052,1)
> > for this I am getting a probability of 5.5164 which is larger than 1
> > (the probability should vary between 0 and 1). Any comment on this is
> > much appreciated.
>
> > Yours,
> > Mehdi
>
> You want the CDF, not the pdf, of the Chi^2 distribution.  Use chi2cdf
> instead.

Thanks for your answer. You're right. Actually I should have used 1-
chi2cdf(0.0052,1).
Mehdi