diff --git a/src/site/xdoc/userguide/distribution.xml b/src/site/xdoc/userguide/distribution.xml index 7015d4758..91f55779d 100644 --- a/src/site/xdoc/userguide/distribution.xml +++ b/src/site/xdoc/userguide/distribution.xml @@ -45,8 +45,7 @@ and a domain value, x, cumulativeProbability computes P(X <= x) (i.e. the lower tail probability of X).

- DistributionFactory factory = DistributionFactory.newInstance(); -TDistribution t = factory.createTDistribution(29); +TDistribution t = new TDistributionImpl(29); double lowerTail = t.cumulativeProbability(-2.656); // P(T <= -2.656) double upperTail = 1.0 - t.cumulativeProbability(2.75); // P(T >= 2.75)

diff --git a/src/site/xdoc/userguide/stat.xml b/src/site/xdoc/userguide/stat.xml index c9fe12822..58dc85da3 100644 --- a/src/site/xdoc/userguide/stat.xml +++ b/src/site/xdoc/userguide/stat.xml @@ -153,8 +153,8 @@

Using the DescriptiveStatistics aggregate (values are stored in memory): -// Get a DescriptiveStatistics instance using factory method -DescriptiveStatistics stats = DescriptiveStatistics.newInstance(); +// Get a DescriptiveStatistics instance +DescriptiveStatistics stats = new DescriptiveStatistics(); // Add the data from the array for( int i = 0; i < inputArray.length; i++) { @@ -170,8 +170,8 @@ double median = stats.getMedian();
Using the SummaryStatistics aggregate (values are not stored in memory): -// Get a SummaryStatistics instance using factory method -SummaryStatistics stats = SummaryStatistics.newInstance(); +// Get a SummaryStatistics instance +SummaryStatistics stats = new SummaryStatistics(); // Read data from an input stream, // adding values and updating sums, counters, etc. @@ -206,7 +206,7 @@ mean = StatUtils.mean(values, 0, 3); window size set to 100 // Create a DescriptiveStats instance and set the window size to 100 -DescriptiveStatistics stats = DescriptiveStatistics.newInstance(); +DescriptiveStatistics stats = new DescriptiveStatistics(); stats.setWindowSize(100); // Read data from an input stream, @@ -230,7 +230,7 @@ in.close(); // Create a SynchronizedDescriptiveStatistics instance and // use as any other DescriptiveStatistics instance -DescriptiveStatistics stats = DescriptiveStatistics.newInstance(SynchronizedDescriptiveStatistics.class); +DescriptiveStatistics stats = new SynchronizedDescriptiveStatistics();
Compute statistics for multiple samples and overall statistics concurrently
@@ -842,8 +842,7 @@ System.out.println(TestUtils.t(mu, observed)); double[] observed ={1d, 2d, 3d}; double mu = 2.5d; -SummaryStatistics sampleStats = null; -sampleStats = SummaryStatistics.newInstance(); +SummaryStatistics sampleStats = new SummaryStatistics(); for (int i = 0; i < observed.length; i++) { sampleStats.addValue(observed[i]); }