To showcase how JASP can be used for statistical quality control we initiate a series of blog posts in which JASP is used to execute key statistical tasks. In this series’ inaugural post, I will go over an example data set from the JASP Data Library that comes bundled with the program. In JASP, go to “Open” -> “Data Library” -> “Quality Control”, as shown below:

Within the Quality Control section of the Data Library, there are several (annotated) examples. For the purposes of this post we focus on the first dataset, “Type I Instrument Capability”. We open the file without the annotated analyses — by clicking the spreadsheet icon without the JASP logo on top:

The description of the data set informs us that we have 50 observations from a single instrument for the same part. If the measurement instrument works perfectly, and is tested without human error, there should be no variability at all. Real-world imperfections should induce a normal distribution of errors that is hopefully tightly clustered around the true value. The tables and plots below seek to understand the nature of the variability in the outcomes.
As soon as the data set is available in JASP we can proceed to carry out a series of statistical analyses to confirm that….No! The first fundamental rule of data analysis is “always plot your data”. Without a proper understanding of the data, it is easy to draw conclusions that are utterly misleading. We therefore start by exploring the data. In the JASP menu on the ribbon, we select “Descriptives”. This provides a wealth of possibilities to plot and otherwise examine the data. Under the tab “Statistics” we can tick and untick options to customize a descriptives table. Of particular concern here is the fact that the Shapiro-Wilk test for normality indicates that p<.001, suggesting that the data may not be normally distributed:

Distribution Plots
Under the tab “Basic Plots”, we can display the distribution, with tick marks for the individual observations. Note that there are 50 observations but only 14 tick marks, suggesting that the measurement precision is in terms of 0.1 of the units indicated. More importantly, there is a little lump of values that cluster on -5.1, and a sudden drop at the value -3.4. This confirms the Shapiro-Wilk-induced suspicion that the data may not follow a normal distribution.

Next, under the tab “Customizable Plots”, we select “Boxplots”. The individual observations can be viewed by ticking “Jitter element” (but be aware that they are jittered). Outlying observations are labeled 44, 26, 38, and 43. A follow-up analysis can filter out these values and inspect normality of the remainder. Of course this is not particularly helpful for the assessment of the instrument capability, unless a common cause for these outlying observations can be found (e.g., the object to be measured was handled differently just before the measurement):

Maybe the best way to assess whether a variable is normally distributed is to inspect the QQ plot. We obtain a QQ plot in JASP with a single mouse click. The resulting QQ plot does not follow a straight line, which again confirms that the data are not normally distributed.

We will follow this up with a test from the “Distribution” module. Modules can be activated by clicking on the blue “+” sign on the top-right of the JASP screen, and then selecting the module of interest. The selected module will then immediately become active on the ribbon. I encourage you to activate the Distributions module yourself and marvel at all of the distributions that JASP presents. For now, we have simply selected the normal distribution and fit it to the data. This produces, first of all, a table of results:

In addition, the Distribution module also offers a QQ plot:

An even better impression of the data can be obtained by plotting it as a time series, that is, in the order in which the observations came about. This is most easily done using the “Time Series Descriptives” option under Descriptives. This yields the following plot:

The time series further strengthens the impression that the data are subject to occasional glitches or outliers. Observations 26, 38, 43, and 44 are definitely suspect, but numbers 19 and 41 are also in limbo. From a statistical perspective, something about the measurement instrument seems off. From a practical perspective, this level of unwanted variability may be acceptable when the measurement does not need to be highly accurate. The autocorrelation function does not suggests that the data show a marked temporal dependence:

In a follow-up post, we will analyze the data in more detail. What do you think we’ll end up concluding?
Authors
Eric-Jan Wagenmakers (CEO) and the JASP Services BV Team



