Community Server

The platform that enables you to build rich, interactive communities
Welcome to Community Server Sign in | Join | Help
in Search

Computing Critical Values from Parametric Distributions

Last post 01-08-2009, 6:07 PM by Sherman. 2 replies.
Sort Posts: Previous Next
  •  01-07-2009, 2:35 PM 76

    Computing Critical Values from Parametric Distributions

    Can statistics101 do this?

    That is, given a sample size (or degrees of freedom) and a proportion of the distribution of interest (say .05 of the right tail) can statistics101 give me a t-value or an f-value?

    For example, in R I can tell the program that I want to use the t-distribution and that I 98 degrees of freedom and I want a one-tailed test at the .05 level and R will return the associated t-value.

    Thanks,

    Sherman
  •  01-08-2009, 10:09 AM 77 in reply to 76

    Re: Computing Critical Values from Parametric Distributions

    Sherman,

    You can use the subroutine TDIST to generate a t distribution, then use PERCENTILE to find the t value, remembering that for the right tail, you'd need to use 100 minus the desired proportion. In Resampling Stats code:
    INCLUDE "lib\tDistribution.txt"
    '. . .
    TDIST 10000 98 tDistribution                 'Draw numbers from the t distribution.
    PERCENTILE tDistribution 95 t                'Find t for p = 0.05.
    HISTOGRAM percent binsize 0.25 tDistribution 'Histogram added for visualization
    PRINT t
    But a t distribution with 98 degrees of freedom is effectively a normal distribution.

    I haven't yet added an f distribution to the library, but here's a subroutine to generate one if you need it:
    INCLUDE "lib\chiSquareDistribution.txt"
    '. . .
    NEWCMD FDIST size df1 df2 result
       CHISQUAREDIST size df1 X
       CHISQUAREDIST size df2 Y
       LET result = (X/df1) / (Y / df2)
    END
    where "size" is the number of values to generate from the f distribution with degrees of freedom "df1" and "df2".

    regards,

    John
  •  01-08-2009, 6:07 PM 78 in reply to 77

    Re: Computing Critical Values from Parametric Distributions

    Hi John,

    This is exactly what I was looking for...I didn't realize there was already a library that included the t-distribution, etc. Thanks for your help once again!

    Sherman
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems