# Class MathUtils.RunningStat

java.lang.Object
htsjdk.tribble.util.MathUtils.RunningStat

Enclosing class:
  `MathUtils`

public static class MathUtils.RunningStat extends Object
a class for calculating moving statistics - this class returns the mean, variance, and std dev after accumulating any number of records. taken from http://www.johndcook.com/standard_deviation.html

## Constructor Summary

Constructors
Constructor
Description
`RunningStat()`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
`final double`
`mean()`
`final long`
`numDataValues()`
`void`
`push(double x)`
`double`
`standardDeviation()`
`double`
`variance()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RunningStat

public RunningStat()

## Method Details

### push

public void push(double x)

Parameters:
  `x` - the value to add to the running mean and variance

### clear

public void clear()

### numDataValues

public final long numDataValues()

### mean

public final double mean()

### variance

public double variance()

### standardDeviation

public double standardDeviation()