SSJ
V. 2.6.

umontreal.iro.lecuyer.randvar
Class StudentNoncentralGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.StudentNoncentralGen

public class StudentNoncentralGen
extends RandomVariateGen

This class implements random variate generators for the noncentral Student-t distribution with n > 0 degrees of freedom and noncentrality parameter δ. If X is distributed according to a normal distribution with mean δ and variance 1, and Y (statistically independent of X) is distributed according to a chi-square distribution with n degrees of freedom, then

T ' = X/(Y/n)1/2

has a noncentral t-distribution with n degrees of freedom and noncentrality parameter δ.


Constructor Summary
StudentNoncentralGen(NormalGen ngen, ChiSquareGen cgen)
          Creates a noncentral-t random variate generator using normal generator ngen and chi-square generator cgen.
 
Method Summary
 double nextDouble()
          Generates a random number from the continuous distribution contained in this object.
 void setChiSquareGen(ChiSquareGen cgen)
          Sets the chi-square generator to cgen.
 void setNormalGen(NormalGen ngen)
          Sets the normal generator to ngen.
 
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, setStream, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StudentNoncentralGen

public StudentNoncentralGen(NormalGen ngen,
                            ChiSquareGen cgen)
Creates a noncentral-t random variate generator using normal generator ngen and chi-square generator cgen.

Method Detail

nextDouble

public double nextDouble()
Description copied from class: RandomVariateGen
Generates a random number from the continuous distribution contained in this object. By default, this method uses inversion by calling the inverseF method of the distribution object. Alternative generating methods are provided in subclasses.

Overrides:
nextDouble in class RandomVariateGen
Returns:
the generated value

setNormalGen

public void setNormalGen(NormalGen ngen)
Sets the normal generator to ngen.


setChiSquareGen

public void setChiSquareGen(ChiSquareGen cgen)
Sets the chi-square generator to cgen.


SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.