|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--experimental.statistics
Normal curve and normal curve graphing functions
This class supports the following public functions:
stddev( double v[] )
Calculate the standard deviation, mean, low and high values from an array of doubles.
integrate_curve( point curve[] )
Integrate a normal curve over a set of histogram bins.
normal_curve(...)
Calculate a normal curve, given a mean and standard deviation. The curve is plotted over the range from low to high.
There are also two public nested classes:
bell_info: mean, standard deviation, low and high value for a normal curve
point: x and y values
This code is largely experimental and was written to understand how a graph of sorted Haar coefficient values relates to a normal curve with the same mean and standard deviation.
Inner Class Summary | |
class |
statistics.bell_info
Bell curve info: mean, sigma (the standard deviation), low (the start of the curve area) and high (the end of the curve area). |
class |
statistics.point
A point on a graph |
Constructor Summary | |
statistics()
|
Method Summary | |
void |
integrate_curve(statistics.point[] curve)
The amount of Gaussian noise in the Haar wavelet coefficients can be seen by graphing a histogram of the coefficients along with a Gaussian (normal) curve. |
private statistics.bell_info |
new_info(double mean,
double sigma,
double low,
double high)
Allocate a bell_info object and initialize it with the arguments mean, sigma, low and high. |
static statistics.point[] |
normal_curve(statistics.bell_info info,
int num_points)
Calculate the information for a graph (composed of point objects) based on the bell_info argument. |
private statistics.point[] |
point_array(int size)
Allocate an array of point objects. |
private void |
print_bins(histo.bin[] histoBins)
Print a histogram bin to stanard output. |
static statistics.bell_info |
stddev(double[] v)
Calculate the mean, standard deviation. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public statistics()
Method Detail |
private statistics.bell_info new_info(double mean, double sigma, double low, double high)
public static statistics.bell_info stddev(double[] v)
Calculate the mean, standard deviation. Also note the low and high of the number range.
The stddev function is passed an array of numbers. It returns the statistics for a normal curve based on those numbers: mean, standard deviation, low value and high value.
private statistics.point[] point_array(int size)
private void print_bins(histo.bin[] histoBins)
Print a histogram bin to stanard output.
public void integrate_curve(statistics.point[] curve)
The amount of Gaussian noise in the Haar wavelet coefficients can be seen by graphing a histogram of the coefficients along with a Gaussian (normal) curve. For this graph to be meaningful the two histograms must be expressed in the same scale.
The statistics.normal_curve function generates a normal bell curve around the median where the x-axis is the number range over which the curve is plotted and the y-axis the the percentage probability for a point to appear at the associated place on the x-axis.
In contrast the y-axis for the histogram calculated for the Haar coefficients reflects the percentage of the total points in that particular histogram bin range.
The histogram of the Haar coefficients is plotted by calculating the percentage of the total for each histogram bin. This means that all the Haar histogram bins sum to one. To plot the normal curve in the same units as the histogram plot of the Haar coefficients, the normal curve is integrated over each histogram bin. The area under the normal curve is one also. The output is written to the standard output.
Summary:
Input argument curve:
x-axis: number range y-axis: probability fraction
public static statistics.point[] normal_curve(statistics.bell_info info, int num_points)
f(y) = (1/(s * sqrt(2 * pi)) e-(1/(2 * s2)(y-u)2
Where u is the mean and s is the standard deviation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |