x tcdf y is the CDF at y of the t-distribution with x degrees of freedom

tcdf=: 4 : 0
 assert. y<%:x
 0.5 + y * (!-:x-1) * ((0.5,-:1+x) H. 1.5 x%~-*:y) % (%:o.x) * !<:-:x
)

   5 tcdf 2.01505 1.47588
0.95 0.899999

The y<%:x restriction is rather limiting.  Perhaps Ewart Shaw
or others knowledgeable on this subject know of a better
formulation for the CDF.



----- Original Message -----
From: Brian Schott <[EMAIL PROTECTED]>
Date: Tuesday, August 12, 2008 6:43
Subject: Re: [Jprogramming] general Gamma distribution
To: Programming forum <[email protected]>

> Robert,
> 
>       I may have misunderstood your original question
> regarding the student's T distribution. I thought you were
> asking for a way to generate random variates from the T, but
> you may have been asking for a way to compute probabilities
> from the student's T. If the latter was your question, I am
> afraid that computing probabilities is much more difficult
> and I have no thoughts about that.
> 
>       OTOH if you are thinking about constructing
> confidence intervals around sample means using the student
> T, then you need random normal variates and a table lookup
> of a student's T to build the interval(s) and it would be
> easier to read in a table of student's T values or just the
> ones you need for the sample sizes and levels of confidence
> you are simulating.
> 
> 
> On Tue, 12 Aug 2008, Robert Cyr wrote:
> 
> + Bran Schott said:
> + T_k = Z/sqrt(U/k)
> +
> + I have seen the usual formulas for building the distribution 
> function,but+ none like this one. It seems very interesting.
> +
> + As for the cdf required for the usual confidence 
> interval,  accuracy comes
> + at a price.  Perhaps less accurate but useful is a simple 
> list of a few
> + dozen factors and a simple formula.
> +
> + Robert Cyr
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to