cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Bug in MATHCAD14 Gamma PDF??

jhbickel
1-Visitor

Bug in MATHCAD14 Gamma PDF??

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
5 REPLIES 5

First, make sure you use the right Gamma representation.

jmG

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
RichardJ
19-Tanzanite
(To:jhbickel)

As Tom says, it's just a numerical problem. Type

TOL:10^-7

above the integrals.

Richard

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

>>I think I get soused <<

That can cause a variety of problems, in many contexts.
__________________
� � � � Tom Gutman
Announcements

Top Tags