Post Reply 
HP17bII+ Programming t-distribution
07-25-2015, 02:03 PM
Post: #12
RE: HP17bII+ Programming t-distribution
(07-25-2015 11:29 AM)Don Shepherd Wrote:  I think I am getting outside of my area of comfort!

You might still remember Valentin's HP-15C Mini-challenge that was solved by Gerson using Euler's reflection formula:

\(\Gamma(z)\Gamma(1-z) = \frac{\pi}{\sin{(\pi z)}}\)

Now if you set \(z=\frac{1}{2}\) you get:

\(\Gamma(\tfrac{1}{2})\Gamma(\tfrac{1}{2}) = \frac{\pi}{\sin{(\tfrac{\pi}{2})}} = \frac{\pi}{1} = \pi \)

From this we can conclude that in fact: \(\Gamma(\tfrac{1}{2})=\sqrt{\pi}\)

Often I have to write down concrete examples to understand formulas.
Thus for \(\nu=6\) we can use \(\Gamma(x+1)=x \Gamma(x)\) to get:

\(\begin{align}
\Gamma(\frac{\nu+1}{2})&=\Gamma(\frac{7}{2})=\Gamma(\frac{5}{2}+1) \\
&=\frac{5}{2}\cdot\Gamma(\frac{5}{2}) \\
&=\frac{5}{2}\cdot\frac{3}{2}\cdot\Gamma(\frac{3}{2}) \\
&=\frac{5}{2}\cdot\frac{3}{2}\cdot\frac{1}{2}\cdot\Gamma(\frac{1}{2}) \\
&=\frac{5}{2}\cdot\frac{3}{2}\cdot\frac{1}{2}\cdot\sqrt{\pi} \\
\end{align}\)

We don't end up with a factorial but with the double factorial 5!! in the numerator.
Thus we just insert the missing values which happen to be even:

\(\begin{align}
\Gamma(\frac{7}{2})&=\frac{5}{2}\cdot\frac{3}{2}\cdot\frac{1}{2}\cdot\sqrt{\pi} \\
&=\frac{5}{2}\cdot\frac{4}{4}\cdot\frac{3}{2}\cdot\frac{2}{2}\cdot\frac{1}{2}​\cdot\sqrt{\pi} \\
&=\frac{5}{2}\cdot\frac{4}{2\cdot2}\cdot\frac{3}{2}\cdot\frac{2}{2\cdot 1}\cdot\frac{1}{2}\cdot\sqrt{\pi} \\\end{align}\)

Now we end up with 5! in the nominator. In the denominator we end up with the product of 25 and 2!:

\(\Gamma(\frac{7}{2})=\frac{5!}{2^5\,2!}\,\sqrt{\pi}\)

Compare this to the general formula if you set \(\nu=6\):

\(\Gamma(\frac{6+1}{2})=\frac{(6-1)!}{2^{6-1}\,(\frac{6}{2}-1)!}\,\sqrt{\pi}\)


Quote:Something in my implementation of that equation causes the 17b to not be able to evaluate it at all.

I didn't enter your formula but as it's written right now the T=(…) is missing.
I assume that in this case the expression is just set to 0.
And this might explain that no solution was found.

HTH
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP17bII+ Programming t-distribution - Thomas Klemm - 07-25-2015 02:03 PM



User(s) browsing this thread: 2 Guest(s)