3.25 FAQ-253 How do I perform curve fitting on my histogram plot?

Last Update: 1/7/2016

When you have a histogram plot, if you perform a nonlinear curve fit on the data, what you end up fitting is the raw data and not the binned data.

To display a fitted curve on histogram, you can choose one of the following two methods:

Method 1: Perform distribution fit on raw data

1. Activate source worksheet. Select Statistics:Descriptive Statistics: Distribution Fit from menu.
2. Specify the distribution(s) you want to fit the data on Distributions tab. Make sure Histogram is selected on the Plots tab.
3. Specify other settings if needed. Click OK to perform distribution fit.
4. In the result sheet Dist1 that generates, you will find the histogram plot with distribution curve overlaid in the Histogram branch.

Method 2: Turn on distribution curve on histogram

1. Double click on the histogram to open the Plot Details dialog.
2. In the Distribution Curve group of Data tab, select one distribution type from the Type drop-down list.
3. Click OK button to show the distribution curve overlaying the histogram plot.

If you still want to fit the binned data, you can perform a frequency count on the raw data and then fit the bin counts with Nonlinear Curve Fit tool. But do keep in mind that performing a nonlinear curve fit on a histogram is not appropriate because of the following two concerns:

1. The bin counts are non-negative and thus measurement errors are asymmetric.
2. The bin counts are not independent.

To fit the binned data:

1. With the raw data active, select Statistics: Descriptive Statistics: Frequency Counts to perform the frequency count. A new worksheet will be created from which you can plot the Counts column as a column plot.
2. With that plot active, you can open the NLFit dialog and fit the data.

Alternatively,

1. Right-click on your histogram plot and choose Go to Bin Worksheet from the context menu. A new worksheet will be created containing the bin data. Since version 8.5.1 you can also click the Go to Bin Worksheet button on the Data tab of the Plot Details dialog to go to the bin worksheet.
2. Create your column plot from this bin worksheet.
3. With that new column plot active, you can fit the data with NLFit dialog.

Keywords:Histogram, Nonlinear Curve Fit, Frequency Count, Data Mode