Package com.opengamma.analytics.math.statistics.distribution

Examples of com.opengamma.analytics.math.statistics.distribution.NormalDistribution


  @Override
  public ProbabilityDistribution<Double> evaluate(final double[] x) {
    Validate.notNull(x, "x");
    ArgumentChecker.notEmpty(x, "x");
    return new NormalDistribution(_mean.evaluate(x), _std.evaluate(x));
  }
View Full Code Here


  @Override
  public ProbabilityDistribution<Double> evaluate(final double[] x) {
    Validate.notNull(x, "x");
    ArgumentChecker.notEmpty(x, "x");
    final double m1 = _first.evaluate(x);
    return new NormalDistribution(m1, Math.sqrt(_second.evaluate(x) - m1 * m1));
  }
View Full Code Here

    // Construct a N(0, 1) random number generator
    NormalRandomNumberGenerator normRand = new NormalRandomNumberGenerator(0.0, 1.0);

    // Construct a N(0, 1) distribution object (for calculating the default barrier level)
    NormalDistribution normDist = new NormalDistribution(0.0, 1.0);

    // Compute the vector of systemic factors
    final double[] systemicFactor = normRand.getVector(numberOfSimulations);

    // Main loop of simulation
View Full Code Here

    // Vector to hold the default barrier level for each obligor
    double[] defaultBarrierLevel = new double[numberOfObligors];

    // Construct a N(0, 1) distribution object (for calculating the default barrier level)
    NormalDistribution normDist = new NormalDistribution(0.0, 1.0);

    // Compute the default barrier level for each obligor
    for (int i = 0; i < numberOfObligors; i++) {

      final double defaultProbability = scenarioGenerator.getDefaultProbability()[i];
      defaultBarrierLevel[i] = normDist.getInverseCDF(defaultProbability);
    }

    return defaultBarrierLevel;
  }
View Full Code Here

    }
    if (maxLag < 0) {
      s_logger.warn("Maximum lag was less than zero; using absolute value");
    }
    _level = level;
    final ProbabilityDistribution<Double> normal = new NormalDistribution(0, 1);
    _criticalValue = normal.getInverseCDF(1 - level / 2.);
    _h = maxLag;
  }
View Full Code Here

    }
    if (!ArgumentChecker.isInRangeExcludingLow(0, 1, level)) {
      throw new IllegalArgumentException("Level must be between 0 and 1");
    }
    _maxOrder = maxOrder;
    _criticalValue = new NormalDistribution(0, 1).getInverseCDF(1 - level / 2.);
  }
View Full Code Here

  public RankTestIIDHypothesis(final double level) {
    if (!ArgumentChecker.isInRangeExcludingLow(0, 1, level)) {
      throw new IllegalArgumentException("Level must be between 0 and 1");
    }
    _criticalValue = new NormalDistribution(0, 1).getInverseCDF(1 - level / 2.);
  }
View Full Code Here

  public TurningPointIIDHypothesis(final double level) {
    if (!ArgumentChecker.isInRangeExcludingLow(0, 1, level)) {
      throw new IllegalArgumentException("Level must be between 0 and 1");
    }
    _criticalValue = new NormalDistribution(0, 1).getInverseCDF(1 - level / 2.);
  }
View Full Code Here

  public DifferenceSignIIDHypothesis(final double level) {
    if (!ArgumentChecker.isInRangeExcludingLow(0, 1, level)) {
      throw new IllegalArgumentException("Level must be between 0 and 1");
    }
    _criticalValue = new NormalDistribution(0, 1).getInverseCDF(1 - level / 2.);
  }
View Full Code Here

      public Double evaluate(final Double s) {
        if (s == 0) {
          return 0.0;
        }
        final double x = Math.log(s / forward.getSpot());
        final NormalDistribution dist = new NormalDistribution(0, _volRootTOffset);
        return initialProb * dist.getPDF(x) / s;
      }
    };

    return new ExtendedCoupledPDEDataBundle(FunctionalDoublesSurface.from(a), FunctionalDoublesSurface.from(b), FunctionalDoublesSurface.from(c), FunctionalDoublesSurface.from(aStar),
        FunctionalDoublesSurface.from(bStar), -lambda2, initialCondition);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.math.statistics.distribution.NormalDistribution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.