Kstest: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 3: | Line 3: | ||
===Synopsis=== | ===Synopsis=== | ||
:vals = kstest(x,distname) | :vals = kstest(x,distname) | ||
INPUTS | ====INPUTS==== | ||
* x = matrix (column vector) in which the sample data is stored. | * '''x''' = matrix (column vector) in which the sample data is stored. | ||
* distname = string, optional distribution name to assume as the parent distribution for the sample. Default value is 'normal'. | * '''distname''' = string, optional distribution name to assume as the parent distribution for the sample. Default value is 'normal'. | ||
OUTPUTS | ====OUTPUTS==== | ||
The return value is a structure with fields (larger values indicate rejecting the named distribution as a candidate parent distribution for the sample). The ks is the value of the Kolmogorov-Smirnov statistic and is times the maximum difference of the distributions. The maximum difference in the distributions is returned as Dn. | The return value is a structure with fields (larger values indicate rejecting the named distribution as a candidate parent distribution for the sample). The ks is the value of the Kolmogorov-Smirnov statistic and is times the maximum difference of the distributions. The maximum difference in the distributions is returned as Dn. | ||
* Ks = value of the adjusted test statistic. | * '''Ks''' = value of the adjusted test statistic. | ||
* Dn = unadjusted test statistic. | * '''Dn''' = unadjusted test statistic. | ||
* parameters = maximum likelihood estimates. | * '''parameters''' = maximum likelihood estimates. | ||
===Examples=== | ===Examples=== | ||
kstest(x) | kstest(x) |
Revision as of 19:56, 2 September 2008
Purpose
Kolmogorov-Smirnov test that a sample has a specified distribution.
Synopsis
- vals = kstest(x,distname)
INPUTS
- x = matrix (column vector) in which the sample data is stored.
- distname = string, optional distribution name to assume as the parent distribution for the sample. Default value is 'normal'.
OUTPUTS
The return value is a structure with fields (larger values indicate rejecting the named distribution as a candidate parent distribution for the sample). The ks is the value of the Kolmogorov-Smirnov statistic and is times the maximum difference of the distributions. The maximum difference in the distributions is returned as Dn.
- Ks = value of the adjusted test statistic.
- Dn = unadjusted test statistic.
- parameters = maximum likelihood estimates.
Examples
kstest(x) kstest(x,'exp')