Difference between revisions of "Manuals/calci/KSTESTNORMAL"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "==Feature==")
 
Line 1: Line 1:
==Feature==
+
<div style="font-size:25px">'''KSTESTNORMAL(XRange,ObservedFrequency,Mean,Stdev,Test,Logicalvalue)'''</div><br/>
 +
*<math>xRange</math> is the array of x values.
 +
*<math>ObservedFrequency</math> is the frequency of values to test.
 +
*<math>Mean</math> is the mean of set of values.
 +
*<math>Stdev</math> is the standard deviation of the set of values.
 +
*<math>Test</math> is the type of the test.
 +
*<math>Logicalvalue</math> is either TRUE or FALSE.
 +
 
 +
==Description==
 +
*This function gives the test statistic of the K-S test.
 +
*K-S test is indicating the Kolmogorov-Smirnov test.
 +
*It is one of the non parametric test.
 +
*This test is the equality of continuous one dimensional probability distribution.
 +
*It can be used to compare sample with a reference probability distribution or to compare two samples.
 +
*This test statistic measures a distance between the empirical distribution function of the sample and the cumulative distribution function of the reference distribution, or between the empirical distribution functions of two samples.
 +
*The two-sample KS test is one of the most useful and general nonparametric methods for comparing two samples.
 +
*It is sensitive to differences in both location and shape of the empirical cumulative distribution functions of the two samples.
 +
*This test can be modified to serve as a goodness of fit test.
 +
*The assumption of the KS test is:
 +
*Null Hypothesis(H0):The sampled population is normally distributed.
 +
*Alternative hypothesis(Ha):The sampled population is not  normally distributed.
 +
*The Kolmogorov-Smirnov test to compare a data set to a given theoretical distribution is as follows:
 +
*1.Data set sorted into increasing order and denoted as <math>x_i</math>, where i=1,...,n.
 +
*2.Smallest empirical estimate of fraction of points falling below <math>x_i</math>, and computed as <math>\frac{(i-1)}{n}</math> for i=1,...,n.
 +
*3.Largest empirical estimate of fraction of points falling below <math>x_i</math> and computed as <math>\frac{i}{n}</math> for i=1,...,n.
 +
*4.Theoretical estimate of fraction of points falling below <math>x_i</math> and computed as <math>F(x_i)</math>, where    F(x) is the theoretical distribution function being tested.
 +
5.Find the absolute value of difference of Smallest and largest empirical value  with the theoretical estimation of points.
 +
*This is a measure of "error" for this data point.
 +
*6.From the largest error, we can compute the test statistic.
 +
*The Kolmogorov-Smirnov test statitic for the cumulative distribution F(x) is:<math> D_n=Sup_x|F_n(x)-F(x)|</math>,where <math>sup_x</math> is the supremum of the set of distances.
 +
*<math>F_n(x)</math> is the empirical distribution function for n,with the observations <math>X_i</math> is defined as:<math>F_n(x)=\frac{1}{n}\sum_{i=1}^n I_{X_i\le x},where <math>I_{Xi\le x}</math> is the indicator function, equal to 1 if <math>X_i\le x</math> and equal to 0 otherwise.

Revision as of 05:17, 22 May 2014

KSTESTNORMAL(XRange,ObservedFrequency,Mean,Stdev,Test,Logicalvalue)


  • is the array of x values.
  • is the frequency of values to test.
  • is the mean of set of values.
  • is the standard deviation of the set of values.
  • is the type of the test.
  • is either TRUE or FALSE.

Description

  • This function gives the test statistic of the K-S test.
  • K-S test is indicating the Kolmogorov-Smirnov test.
  • It is one of the non parametric test.
  • This test is the equality of continuous one dimensional probability distribution.
  • It can be used to compare sample with a reference probability distribution or to compare two samples.
  • This test statistic measures a distance between the empirical distribution function of the sample and the cumulative distribution function of the reference distribution, or between the empirical distribution functions of two samples.
  • The two-sample KS test is one of the most useful and general nonparametric methods for comparing two samples.
  • It is sensitive to differences in both location and shape of the empirical cumulative distribution functions of the two samples.
  • This test can be modified to serve as a goodness of fit test.
  • The assumption of the KS test is:
  • Null Hypothesis(H0):The sampled population is normally distributed.
  • Alternative hypothesis(Ha):The sampled population is not normally distributed.
  • The Kolmogorov-Smirnov test to compare a data set to a given theoretical distribution is as follows:
  • 1.Data set sorted into increasing order and denoted as , where i=1,...,n.
  • 2.Smallest empirical estimate of fraction of points falling below , and computed as for i=1,...,n.
  • 3.Largest empirical estimate of fraction of points falling below and computed as for i=1,...,n.
  • 4.Theoretical estimate of fraction of points falling below and computed as , where F(x) is the theoretical distribution function being tested.

5.Find the absolute value of difference of Smallest and largest empirical value with the theoretical estimation of points.

  • This is a measure of "error" for this data point.
  • 6.From the largest error, we can compute the test statistic.
  • The Kolmogorov-Smirnov test statitic for the cumulative distribution F(x) is:,where is the supremum of the set of distances.
  • is the empirical distribution function for n,with the observations is defined as: is the indicator function, equal to 1 if and equal to 0 otherwise.