From: Mehdi on
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
From: Brian Borchers on
On Oct 20, 7:56 am, Mehdi <zeido...(a)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.
From: Mehdi on
On Oct 20, 8:09 am, Brian Borchers <borchers.br...(a)gmail.com> wrote:
> On Oct 20, 7:56 am, Mehdi <zeido...(a)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