environmentaltools.graphics.test_normality
- environmentaltools.graphics.test_normality(data, params, ax=None, fname=None)[source]
Test and visualize data normality with QQ-plot.
Performs normality test on transformed data and displays a probability plot to assess Gaussian distribution fit.
- Parameters:
data (array-like) – Raw data values to test.
params (dict) – Transformation parameters for data normalization.
ax (matplotlib.axes.Axes, optional) – Axis for the plot. Creates new if None. Defaults to None.
fname (str, optional) – File path to save the plot. If None, displays interactively. Defaults to None.
- Returns:
The axis with the plot.
- Return type:
matplotlib.axes.Axes
Note
Prints chi-squared statistic and p-value from D’Agostino-Pearson test. Null hypothesis: data comes from a normal distribution (α=0.05).