# PP_plot_semiparametric¶

class reliability.Probability_plotting.PP_plot_semiparametric

A PP_Plot is a probability-probability plot that consists of plotting the CDF of one distribution against the CDF of another distribution. If we have both distributions we can use PP_plot_parametric. This function is for when we want to compare a fitted distribution to an empirical distribution for a given set of data. If the fitted distribution is a good fit the PP_Plot will lie on the diagonal line. Assessing goodness of fit in a graphical way is the main purpose of this type of plot. To create a semi-parametric PP_plot, we must provide the failure data and the method (‘KM’ for Kaplan-Meier, ‘NA’ for Nelson-Aalen, ‘RA’ for Rank Adjustment) to estimate the empirical CDF, and we must also provide the parametric distribution for the parametric CDF. The failure times are the limiting values here so the parametric CDF is only calculated at the failure times since that is the result from the empirical CDF. Note that the empirical CDF also accepts X_data_right_censored just as Kaplan-Meier, Nelson-Aalen, and Rank Adjustment will also accept right censored data.

Inputs: X_data_failures - the failure times in an array or list X_data_right_censored - the right censored failure times in an array or list. Optional input. Y_dist - a probability distribution. The CDF of this distribution will be plotted along the Y-axis. method - must be ‘KM’,’NA’,or ‘RA’ for Kaplan-Meier, Nelson-Aalen, and Rank Adjustment respectively. Default is ‘KM’ show_diagonal_line - True/False. Default is True. If True the diagonal line will be shown on the plot.

Outputs: The PP_plot is the only output. Use plt.show() to show it.