Open In App

4-Plot

A  4-plot is a collection of 4 different graphical Exploratory Data Analysis (EDA) tools, whose main motive is to test the assumptions that underlie most measurement processes. 

The 4-plot consists of the following:



4-plot can answer the following questions:

Some assumption that can be verified with 4-plot are:



There are some underlying assumptions that follow the necessity for 4-plot:

If all the above assumptions hold, then the process is in control.

Implementation:




# code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
%matplotlib inline
 
heat_flow = pd.read_csv('heat_flow.txt', header = None)
  
heat_flow.head()
sns.set_style('darkgrid')
 
# plot different components of 4 plot
fig, ax  = plt.subplots(2,2)
sns.lineplot(x = pd.Series(heat_flow.index),y = heat_flow[0],ax = ax[0,0])
 
ax[0,0].set_title('Run Sequence Plot')
pd.plotting.lag_plot(heat_flow[0],ax = ax[0,1])
 
ax[0,1].set_title('Lag Plot with k=1')
sns.histplot(heat_flow[0],kde = True,ax = ax[1,0])
 
ax[1,0].set_title('Histogram')
sm.ProbPlot(heat_flow[0]).qqplot(line ='s', ax = ax[1,1],color = 'blue');
 
ax[1,1].set_title('Normal Probability Plot')
plt.show()

        0
0    9.206343
1    9.299992
2    9.277895
3    9.305795
4    9.275351

4-plot

References:


Article Tags :