* This routine computes the degrees of freedom that should * be used in a chi-squared test with the specified number of * histogram buckets. The result is always rounded up to * the next even number so that the value of chi-squared can be * computed more easily. This will cause the value of * chi-squared to be higher than the optimum value, resulting * in the chi-square test being more len
| 2209 | * @note History: Thu Aug 3 14:04:18 1989, DSJ, Created. |
| 2210 | */ |
| 2211 | uinT16 DegreesOfFreedom(DISTRIBUTION Distribution, uinT16 HistogramBuckets) { |
| 2212 | static uinT8 DegreeOffsets[] = { 3, 3, 1 }; |
| 2213 | |
| 2214 | uinT16 AdjustedNumBuckets; |
| 2215 | |
| 2216 | AdjustedNumBuckets = HistogramBuckets - DegreeOffsets[(int) Distribution]; |
| 2217 | if (Odd (AdjustedNumBuckets)) |
| 2218 | AdjustedNumBuckets++; |
| 2219 | return (AdjustedNumBuckets); |
| 2220 | |
| 2221 | } // DegreesOfFreedom |
| 2222 | |
| 2223 | /** |
| 2224 | * This routine is used to search a list of histogram data |
no outgoing calls
no test coverage detected