You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/manual.adoc
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -686,3 +686,47 @@ An instance of Mean can be reset between samples using the reset() method.
686
686
If the state of a Mean object is required to be saved between simulation runs then it can be made persistent by using either of the saveState methods. The first instance saves the state to a file, whereas the second can be used to save the state to an instance of the java.io.DataOutputStream class. There are likewise two corresponding ways in which the state can be restored.
687
687
688
688
The print method simply prints to System.out the current state of the object.
689
+
690
+
=== Variance
691
+
692
+
This class is derived from Mean, and in addition to providing the above mentioned functionality also provides the following:
693
+
694
+
----
695
+
public class Variance extends Mean
696
+
{
697
+
public void setValue (double value) throws IllegalArgumentException;
698
+
699
+
public void reset ();
700
+
701
+
public double variance ();
702
+
public double stdDev ();
703
+
704
+
public double confidence (double value);
705
+
706
+
public void print ();
707
+
708
+
public boolean saveState (String fileName) throws IOException;
709
+
public boolean saveState (DataOutputStream oFile) throws IOException;
710
+
711
+
public boolean restoreState (String fileName) throws FileNotFoundException, IOException;
712
+
public boolean restoreState (DataInputStream iFile) throws IOException;
713
+
};
714
+
----
715
+
716
+
variance() returns the variance of the samples:
717
+
718
+
1
719
+
n
720
+
721
+
722
+
2
723
+
724
+
_
725
+
Σ (Si-Mean())
726
+
727
+
n
728
+
729
+
i=1
730
+
731
+
732
+
stdDev() returns the standard deviation of the samples, which is the square root of the variance.
0 commit comments