Summary
Compute the probability that given probability distributions are (not) the same.
Unit
SignalUtils
Declaration
Function DistinctCDF(x, Mean, StdDev: TSample): TSample;
Description
Returns a measure for the probability that x belongs to the normal distribution with Mean and StdDev. The function returns the 1- (integral of PDF on the intervals [-Inf,mean-abs(mean-x)],[mean+abs(mean-x),+Inf]). The function returns near 100, if x is further then 4*StdDev away from mean and returns 0, if x = mean.
Categories
Signal statistics
Declaration
Function DistinctCDF(const Means, StdDevs: array of TSample; Precision: integer = 100; MaxSteps: integer = 10000): TSample;
Description
The function integrates the envelope of a set of gaussian PDF functions defined with Means (holding mean values) and StdDevs (holding standard deviations) arrays. The start of the integration interval is determined by the PDF with smallest value of expression: Mean-3*StdDev. The end of the integration interval is determined by the PDF with largest value of expression: Mean+3*StdDev. If all PDF functions are distinctly a part, the value of the integral will be equal to the number of PDF functions. If all PDF functions exactly overlapp each other, the value of the integral will be 1. This function is therefore a measure of overlapping of a set of gaussian probability density functions. The result will return this measure in percent. 0% for full overlapping and 100% for no overlapping. Precision defines integration precision by defining the step: h = (Smallest StdDev)*3/Precision. The drawback of this approach is that CPU usage grows with precision, distance between the mean values and smaller standard deviations. If the precision is too small, the function will degenerate in to histogram calculation. If you are integrating only over two distributions, that is not a serious problem and the result will remain meaningfull, but not very accurate.
| Copyright 2008 Dew Research |
http://www.dewresearch.com