# Ticket #60 (closed defect: moved)

## Quality of exponential curve fit is questionable

Reported by: | curtis | Owned by: | nor |
---|---|---|---|

Priority: | critical | Milestone: | |

Component: | slim-plotter | Severity: | serious |

Keywords: | Cc: | ||

Blocked By: | Blocking: |

### Description (last modified by curtis) (diff)

The single exponential curve fits look good, but the raw chi-squared error values seem strange. Slim Plotter currently employs some tactics to normalize the value, but I do not know enough about chi-square tests to be sure these operations are the proper way to correct the issue.

- The chi-square magnitudes seem roughly proportional to the bin count total for a given channel. That is, the larger the peak of the decay curve, the larger the chi-square value. Because of this fact, Slim Plotter currently divides the chi-square value for a given channel by that channel's peak value.
- I believe the chi-square values returned by Slim Plotter's LM algorithm are raw values, not divided by degrees of freedom. So Slim Plotter also divides chi-square by degrees of freedom (
`num - params.length`, which I am not entirely certain is correct).

My knowledge of statistics is insufficient to judge whether this approach is correct. Further research is warranted to figure out the best way to report useful chi-square values, or other values indicative of the fit's relative "goodness."

## Change History

**Note:**See TracTickets for help on using tickets.