Re: Simple addition to random module - Student's t



On Sep 2, 6:15 pm, Thomas Philips <tkp...@xxxxxxxxx> wrote:
I mis-spoke - the variance is infinite when df=2 (the variance is df/
(df-2),

Yes: the variance is infinite both for df=2 and df=1, and Student's t
with df=1 doesn't even have an expectation. I don't see why this
would stop you from generating meaningful samples, though.

and you get the Cauchy when df=2.

Are you sure about this? All my statistics books are currently hiding
in my mother-in-law's attic, several hundred miles away, but wikipedia
and mathworld seem to say that df=1 gives you the Cauchy distribution.

I made the mistake because the denominator is  equivalent to the
square root of the sample variance of df normal observations,

As I'm reading it, the denominator is the square root of the sample
variance of *df+1* independent standard normal observations. I agree
that the wikipedia description is a bit confusing.

It seems that there are uses for Student's t distribution with
non-integral degrees of freedom. The Boost library, and the R
programming language both allow non-integral degrees of freedom.
So (as Robert Kern already suggested), you could drop the test
for integrality of df. In fact, you could just drop the tests
on df entirely: df <= 0.0 will be picked up in the gammavariate
call.

--
Mark
.



Relevant Pages

  • Re: F-test questions (freshman level)
    ... Even I could figure out that the degrees of freedom were ... "Fisher's variance ratio test" ... The t-test procedure in SPSS gives a test for equal ...
    (sci.stat.math)
  • Re: summation of Chi and Gaussian
    ... > and b is Gaussin with zero mean and variance 1. ... > guess it is also a chi square distribution of n ... > degrees of freedom. ...
    (sci.stat.math)
  • Re: sampling distribution of differences of means
    ... At-test with appropriate degrees of freedom is correct, ... the samples are used to estimate the variance. ... Rich Ulrich ...
    (sci.stat.math)
  • Re: Chi-Square distribution
    ... I know this is the same thing as finding the mean and variance of a chi-square distribution with n-1 degrees of freedom. ...
    (sci.math)
  • Re: standard deviation, but without the mean
    ... The standard deviation is the square root of the variance. ... Suppose Xsum is the sum of the the first n numbes and that X2 is ...
    (sci.stat.math)