Examples of variance()


Examples of flanagan.analysis.Stat.variance()

                double[] hold = new double[this.numberOfRows];
                for(int j=0; j<this.numberOfRows; j++){
                    hold[i] = this.matrix[j][i];
                }
                Stat st = new Stat(hold);
                variances[i] = st.variance();
            }

            return variances;
        }
View Full Code Here

Examples of flanagan.analysis.Stat.variance()

        this.transformedMaximum = st2.maximum();
        this.transformedMedian = st2.median();
        this.transformedRange = this.transformedMaximum - this.transformedMinimum;
        this.transformedMean = st2.mean();
        this.transformedStandardDeviation = st2.standardDeviation();
        this.transformedVariance = st2.variance();
        this.transformedMomentSkewness = st2.momentSkewness();
        this.transformedMedianSkewness = st2.medianSkewness();
        this.transformedQuartileSkewness = st2.quartileSkewness();
        this.transformedExcessKurtosis = st2.excessKurtosis();
View Full Code Here

Examples of net.jcores.jre.cores.CoreNumber.variance()

    @SuppressWarnings("boxing")
    public static void main(String[] args) {
        CoreNumber number = $(2.0, 4, 6, null, 8, 100);

        System.out.println(number.average());
        System.out.println(number.variance());
       
        System.out.println($.range(1, 50000).random(10).as(CoreNumber.class).standarddeviation());
        System.out.println($.range(1, 50).random(6).string().join(" "));
        System.out.println($.range(1, 50).random(1.0).string().join(" "));
View Full Code Here

Examples of org.jquantlib.math.statistics.GenericSequenceStatistics.variance()

                           + "    calculated: " + calculated.get(i) + "\n"
                           + "    expected:   " + expected);
        }

        expected = 2.23333333333;
        calculated = ss.variance();
        for (i=0; i<dimension; i++) {
            if (Math.abs(calculated.get(i)-expected) > tolerance)
                fail("SequenceStatistics<" + name + ">: "
                           + (i+1) + " dimension: "
                           + "wrong variance\n"
View Full Code Here

Examples of org.jquantlib.processes.GeneralizedBlackScholesProcess.variance()

        //The standard deviation = volatility*sqrt(dt)
        System.out.println("The stdDeviation of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.stdDeviation(process.time(date18.clone()), handleToStockQuote.currentLink().value(), 0.01));

        //Calulating the variance of the process after time = 18th day from today with value of the stock as specified from the quote
        //The variance = volatility*volatility*dt
        System.out.println("The variance of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.variance(process.time(date18.clone()), handleToStockQuote.currentLink().value(), 0.01));

        //Calulating the expected value of the stock quote after time = 18th day from today with the current value of the stock as specified from the quote
        //The expectedValue = intialValue*exp(drift*dt)-----can be obtained by integrating----->dx/x= drift*dt
        System.out.println("Expected value = "+process.expectation(process.time(date18.clone()), handleToStockQuote.currentLink().value(), 0.01));

View Full Code Here

Examples of org.jquantlib.processes.StochasticProcess1D.variance()

        //The standard deviation = volatility*sqrt(dt)
        System.out.println("The stdDeviation of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.stdDeviation(process.time(date18.clone()), handleToStockQuote.currentLink().value(), 0.01));

        //Calulating the variance of the process after time = 18th day from today with value of the stock as specified from the quote
        //The variance = volatility*volatility*dt
        System.out.println("The variance of the process after time = 18th day from today with value of the stock as specified from the quote = "+process.variance(process.time(date18.clone()), handleToStockQuote.currentLink().value(), 0.01));

        //Calulating the expected value of the stock quote after time = 18th day from today with the current value of the stock as specified from the quote
        //The expectedValue = intialValue*exp(drift*dt)-----can be obtained by integrating----->dx/x= drift*dt
        System.out.println("Expected value = "+process.expectation(process.time(date18.clone()), handleToStockQuote.currentLink().value(), 0.01));

View Full Code Here

Examples of umontreal.iro.lecuyer.stat.Tally.variance()

      System.out.println ("QMC with Korobov point set with " + n +
          " points and random shift + baker:\n");
      statQMC.setConfidenceIntervalStudent();
      System.out.println (statQMC.report (0.95, 3));
      System.out.println ("Total CPU time: " + timer.format() + "\n");
      double varQMC = p.getNumPoints() * statQMC.variance();
      double cpuQMC = timer.getSeconds() / (m * n);
      System.out.printf ("Variance ratio:   %9.4g%n", varMC/varQMC);
      System.out.printf ("Efficiency ratio: %9.4g%n",
           (varMC * cpuMC) / (varQMC * cpuQMC));
   }
View Full Code Here

Examples of umontreal.iro.lecuyer.stat.Tally.variance()

      System.out.println ("QMC with Sobol point set with " + n +
          " points and affine matrix scramble:\n");
      statQMC.setConfidenceIntervalStudent();
      System.out.println (statQMC.report (0.95, 3));
      System.out.println ("Total CPU time: " + timer.format() + "\n");
      double varQMC = p.getNumPoints() * statQMC.variance();
      double cpuQMC = timer.getSeconds() / (m * n);
      System.out.printf ("Variance ratio:   %9.4g%n", varMC/varQMC);
      System.out.printf ("Efficiency ratio: %9.4g%n",
           (varMC * cpuMC) / (varQMC * cpuQMC));
   }
View Full Code Here

Examples of umontreal.iro.lecuyer.stat.Tally.variance()

      for (int i = 0; i < v.length; i++) {
         Tally tally = get (i);
         if (tally == null || tally.numberObs() < 2)
            v[i] = Double.NaN;
         else
            v[i] = tally.variance();
      }
   }


   /**
 
View Full Code Here

Examples of umontreal.iro.lecuyer.stat.Tally.variance()

      double cov = covariance (i, j);
      Tally tallyi = get (i);
      Tally tallyj = get (j);
      if (tallyi == null || tallyj == null)
         return Double.NaN;
      return cov/Math.sqrt (tallyi.variance()*tallyj.variance());
   }


   /**
    * Constructs and returns the sample covariance matrix
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.