tests_of_fit
Class NPP

java.lang.Object
  |
  +--tests_of_fit.NPP

public class NPP
extends java.lang.Object

This class returns the appropriate Weisberg-Bingham scores as well as the Weisberg-Bingham version of the Shapiro-Wilk test of normality statistic. It can be used in the production of normal probability plots, and in tests of normality.

It assumes that the data has already been sorted.


Field Summary
 double[] scores
           
 double sw
           
 
Constructor Summary
NPP()
           
 
Method Summary
 void generate(double[] sorted_data, int n, NPP npp)
           This method takes a set of sorted data and returns the associated normal scores (Weisberg-Bingham versions) and the value of the Weisberg-Bingham version of the Shapiro-Wilk statistic for this data.
 double SW(double[] sorted_data, double[] scores, int n)
          This routine calculates the value of a version of the Shapiro-Wilk test of normality statistic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scores

public double[] scores

sw

public double sw
Constructor Detail

NPP

public NPP()
Method Detail

generate

public void generate(double[] sorted_data,
                     int n,
                     NPP npp)

This method takes a set of sorted data and returns the associated normal scores (Weisberg-Bingham versions) and the value of the Weisberg-Bingham version of the Shapiro-Wilk statistic for this data.

Parameters:
n - The number of data points.
npp - The normal probability plot (NPP) object returned by the method. This includes a vector of Weisberg-Bingham scores (in npp.scores) and the value of the Weisberg-Bingham test of normality statistic (in npp.sw).

SW

public double SW(double[] sorted_data,
                 double[] scores,
                 int n)
This routine calculates the value of a version of the Shapiro-Wilk test of normality statistic. The version depends on the values of the scores.

It assumes that the data has already been sorted.