Skip to main content
1-Visitor
April 4, 2010
Question

Bug in MATHCAD14 Gamma PDF??

  • April 4, 2010
  • 3 replies
  • 4765 views
I just noted what appears to be a bug in the Gamma distribution PDF for MATHCAD14

Integrating over (0,inf) shows it integrates to 1.0 as expected.

Attempts to compute mean value does not compute.

Attempts to perform interation using fundamental definition of Gamma PDF (instead of MATHCAD built in function) - does not compute.

Attempts to compute mean over truncated range (0,1) appears to be close to expected mean value - but extending the integration >1 results in highly erratic behavior.

Anybody else observed this? Is there a work-around?
___________________________________
Dr. John H. Bickel, Ph.D.
Evergreen Safety & Reliability Technologies, LLC
28559 Cavan Lane, Evergreen, CO 80439
Mobile +1(303)359-9664

3 replies

1-Visitor
April 4, 2010
First, make sure you use the right Gamma representation.

jmG
19-Tanzanite
April 5, 2010
As Tom says, it's just a numerical problem. Type

TOL:10^-7

above the integrals.

Richard
jhbickel1-VisitorAuthor
1-Visitor
April 5, 2010
Yes!!

Thanks for the advice. I think I get soused to using MATHCAD for routine things that I forget about subtle features such as TOL settings.
___________________________________
Dr. John H. Bickel, Ph.D.
Evergreen Safety & Reliability Technologies, LLC
28559 Cavan Lane, Evergreen, CO 80439
Tel. +1(303)670-3302
Fax. +1(303)670-3305
Mobile +1(303)359-9664
1-Visitor
April 5, 2010
>>I think I get soused <<

That can cause a variety of problems, in many contexts.
__________________
� � � � Tom Gutman
1-Visitor
April 5, 2010
Near as I can tell the problem is a numericial one, due to the large scaling factor you are applying. When I calculate means for the gamma distribution as provided by Mathcad, I have no problems.
__________________
� � � � Tom Gutman