KStest¶

class
reliability.Reliability_testing.
KStest
(distribution, data, significance=0.05, print_results=True, show_plot=True)¶ Performs the KolmogorovSmirnov goodness of fit test to determine whether we can accept or reject the hypothesis that the data is from the specified distribution at the specified level of significance. This method is not a means of comparing distributions (which can be done with AICc, BIC, and AD), but instead allows us to accept or reject a hypothesis that data come from a distribution.
Inputs: distribution  a distribution object created using the reliability.Distributions module data  an array or list of data that are hypothesised to come from the distribution significance  This is the complement of confidence. 0.05 significance is the same as 95% confidence. Must be between 0 and 0.5. Default is 0.05. print_results  if True the results will be printed. Default is True show_plot  if True a plot of the distribution CDF and empirical CDF will be shown. Default is True.
Outputs: KS_statistic  the KolmogorovSmirnov statistic KS_critical_value  the KolmogorovSmirnov critical value hypothesis  ‘ACCEPT’ or ‘REJECT’. If KS_statistic < KS_critical_value then we can accept the hypothesis that the data is from the specified distribution