MATLAB Answers


Determining optimal number of bins for chi squared distribution

Asked by John
on 8 Feb 2012


I am applying a chi squared distribution to histogram. Is there any way in matlab to determine the optimal number of bins to get the lowest chi squared (X2) statistic?

The Chi-square goodness-of-fit test function does not necessarily tell you the optimal number of bins to use, or does it?

Many thanks





No products are associated with this question.

0 Answers

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!