MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

A Bug?

  • To: mathgroup at
  • Subject: [mg35277] A Bug?
  • From: "Johannes Ludsteck" <johannes.ludsteck at>
  • Date: Sat, 6 Jul 2002 05:44:19 -0400 (EDT)
  • Organization: Universitaet Regensburg
  • Sender: owner-wri-mathgroup at

Dear MathGroup members,

let Mathematica evaluate
In[1]:= oStatCDF[x_,r_,n_,F_]=
  Sum[Binomial[n,i] F[x]^i (1-F[x])^(n-i), {i,r,n}]

Out[1]= (1 - F[x])^(n - r) F[x]^r Gamma[1 + n]
			Hypergeometric2F1[1,-n + r, 1 + r,
				-F[x]/(1 - F[x])]/
			(Gamma[1 + n - r] Gamma[1 + r])

Looks fine, but now define
In[2]:= F[x_]:=1
and substitute this into oStatCDF
In[3]:= oStatCDF[x,r,n,F]
Out[3]= Indeterminate

This does not look fine, since I would expect a more
determinate result. Now try to help Mathematica by
substituting F[x_]=1 by hand. Then
F[x]^i (1-F[x])^(n-i) simplifies to 1^i 0^(n-i) == 1

In[4]:= simp[r_,n_]=Sum[Binomial[n,i] ,{i,r,n}]
Out[4]= (Gamma[1+n] Hypergeometric2F1[1,-n+r,1+r,-1])
		/ (Gamma[1+n-r] Gamma[1+r])

Now apply simp to r = 5 and n = 100 to obtain
In[5]:= simp[5,10]
Out[5]= 638

Of course, 638 != Indeterminate

Is this a Bug or did I make a mistake?

Best regards,
	Johannes Ludsteck

Johannes Ludsteck
Economics Department
University of Regensburg
Universitaetsstrasse 31
93053 Regensburg
Phone +49/0941/943-2741

  • Prev by Date: comments and questions
  • Next by Date: Re: Integrate fails without warning?
  • Previous by thread: comments and questions
  • Next by thread: Re: A Bug?