Darwin Help

Back to Index

OutsideBounds

Function OutsideBounds - test whether Stats could be the same

Calling Sequence  OutsideBounds(a,b,Confidence = 0.9750)
Parameters
NameTypeDescription

a StatStat data structure to be compared
b Statsecond Stat to be compared or
b numericvalue to be compared
Confidence positiveconfidence level (defaults to 0.975)
Return Type  boolean
Synopsis OutsideBounds checks whether two univariate statistics (Stat objects) or one univariate statistics and a value represent different values with a certain confidence level. The confidence level is set to 0.975 by default, which gives the usual 2.5% error on one side, or the 1.96 standard deviations away the mean for a normal variable. If the second argument is a single value the test is equivalent to determining whether the first distribution could have average b at the given confidence level. The Confidence level can be changed to any value between 0.5 <= c < 1.
Examples
> st := Stat('Near 7'):

> to 10 do st+Rand(6.5..7.5) od:

> print(st);
 Near 7: number of sample points=10
 mean = 6.96 +- 0.16
 variance = 0.064 +- 0.033
 skewness=0.382249,   excess=-1.48249
 minimum=6.65052,     maximum=7.37845
> OutsideBounds(st,7);
false
> OutsideBounds(st,6.5);
true
> OutsideBounds(st,6.5,Confidence=0.999999);
true
See also ExpFit,   LinearRegression,   Stat,   StatTest,   UpdateStat