Thanks Harlan! I think you are absolutely correct. It would be better to
reverse everything. It is confusing. It's been a while, but I now see the
problem I had from a while ago.
Here is Mma info on Gamma:
Information["Gamma"]
"Gamma[z] is the Euler gamma function. Gamma[a, z] is the incomplete gamma
function. Gamma[a, z0, z1] is the generalized incomplete gamma function..."
What threw me off was "z" being used in just Gamma[z], but now I see that
"z" becomes an integration limit in Gamma[a,z]. Add to this having to use
the Gamma Distribution in Excel, and I had it backwards.
In addition, mma also mentions that "...Note that the arguments in the
incomplete form of Gamma are arranged differently from those in the
incomplete form of Beta." Coupled together, I thought the "other way" was
correct.
I may still have it backwards, but I "think" it is a decreasing function. I
have never gotten it to work without "1 - .GammaDist(..." According to
mma, it's an integration from z to infinity.
Here's the op's Maple problem, along with mma definition of the incomplete
gamma function.
{a = 1.0345, z = 0.0247};
Integrate[t^(a - 1)/E^t,{t, z, Infinity}]
0.9604748394434477
(Same answer as Op's Maple program)
Here's a short table as z increases...
Table[Gamma[4., z], {z, 1, 5}]
5.886071058743077,
5.1427407629912825,
3.883391332693388,
2.6008207222002535,
1.5901554917841703
Anyway, I think you are correct. Switching everything around would be
better. (And would be more in line with mma & Maple.)
Function Gamma(Alpha, z)
With WorksheetFunction
Gamma = Exp(.GammaLn(Alpha)) * (1 - .GammaDist(z, Alpha, 1, True))
End With
End Function
Sub TestIt()
Debug.Print Gamma(1.0345, 0.0247)
End Sub
returns:
0.960474839401151
Thanks again! This cleared up a related problem. :>)