correlation_plot#
- normtest.ryan_joiner.correlation_plot(axes, x_data, cte_alpha='3/8', weighted=False)[source]#
This function creates an axis with the Ryan-Joiner test [1] correlation graph.
- Parameters:
- axesmatplotlib.axes.SubplotBase
The axis of the graph;
- x_datanumpy array
One dimension numpy array with at least
4observations.- cte_alphastr, optional
A str with the cte_alpha value that should be adopted. The options are:
“0”;
“3/8” (default);
“1/2”;
- weightedbool, optional
Whether to estimate the Normal order considering the repeats as its average (True) or not (False, default). Only has an effect if the dataset contains repeated values;
- Returns:
- axesmatplotlib.axes.SubplotBase
The axis of the graph;
References
[1]RYAN, T. A., JOINER, B. L. Normal Probability Plots and Tests for Normality, Technical Report, Statistics Department, The Pennsylvania State University, 1976. Available at www.additive-net.de. Access on: 22 Jul. 2023.
Examples
>>> from normtest import ryan_joiner >>> import matplotlib.pyplot as plt >>> from scipy import stats >>> data = stats.norm.rvs(loc=0, scale=1, size=30, random_state=42) >>> fig, ax = plt.subplots(figsize=(6, 4)) >>> ryan_joiner.correlation_plot(axes=ax, x_data=data) >>> #plt.savefig("correlation_plot.png") >>> plt.show()