Class VanDerWaerden1969

java.lang.Object
dev.nm.stat.random.rng.univariate.beta.VanDerWaerden1969
All Implemented Interfaces:
RandomBetaGenerator, RandomNumberGenerator, Seedable

@Deprecated public class VanDerWaerden1969 extends Object implements RandomBetaGenerator
Deprecated.
Cheng1978 is a much better algorithm.
If X and Y are independent, with X ~ Γ(α,θ) and Y ~ Γ(β,θ) then X/(X+Y) ~ Beta(α,β), so one algorithm for generating beta variates is to generate X/(X+Y), where X is a gamma variate with parameters Γ(α,1) and Y is an independent gamma variate with parameters Γ(β,1).
  • Constructor Details

    • VanDerWaerden1969

      public VanDerWaerden1969(RandomGammaGenerator X, RandomGammaGenerator Y)
      Deprecated.
      Construct a random number generator to sample from the beta distribution.
      Parameters:
      X - a random gamma generator
      Y - a random gamma generator
    • VanDerWaerden1969

      public VanDerWaerden1969(double alpha, double beta)
      Deprecated.
      Construct a random number generator to sample from the beta distribution.
      Parameters:
      alpha - the gamma distribution parameter, α, for X
      beta - the gamma distribution parameter, β, for X
  • Method Details

    • seed

      public void seed(long... seeds)
      Deprecated.
      Description copied from interface: Seedable
      Seed the random number/vector/scenario generator to produce repeatable experiments.
      Specified by:
      seed in interface Seedable
      Parameters:
      seeds - the seeds
    • nextDouble

      public double nextDouble()
      Deprecated.
      Description copied from interface: RandomNumberGenerator
      Get the next random double.
      Specified by:
      nextDouble in interface RandomNumberGenerator
      Returns:
      the next random number