0% found this document useful (0 votes)
5 views5 pages

Module 4

The document discusses the construction and interpretation of boxplots and quantile-quantile (Q-Q) plots for data analysis. It outlines the features of boxplots, including location, spread, skewness, and outliers, and explains how to compare multiple batches using these visual tools. Additionally, it covers the significance of normal probability plots in assessing data distribution and identifying deviations from normality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Module 4

The document discusses the construction and interpretation of boxplots and quantile-quantile (Q-Q) plots for data analysis. It outlines the features of boxplots, including location, spread, skewness, and outliers, and explains how to compare multiple batches using these visual tools. Additionally, it covers the significance of normal probability plots in assessing data distribution and identifying deviations from normality.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

The Boxplot for a Single Batch The display of parallel boxplots can facilitate the

comparison of several batches of data.


From a boxplot, the following features of a batch:
A Parallel display of boxplots can provide answers to
1. Location
the following questions:
2. Spread
3. Skewness  Is a factor significant?
4. Tail Length  Does the location differ between subgroups?
5. Outlying data points  Does the variation differ between subgroups?
 How much asymmetry is present in the various
Construct a boxplot for a single batch:
batches?
1. horizontal (or vertical): measurement scale.  Are there any outliers?
2. rectangular box (width = dF)
Not all outliers are erroneous.
 left (or lower) edge: lower fourth
 right (or upper) edge: upper fourth Guidelines:
3. horizontal (or vertical) line segment inside the
1. Compare the medians, to compare location.
box: location of the median.
2. Compare the F-spread to compare dispersion.
4. horizontal (or vertical) line segments from
3. Look at the overall spread as shown by the
each end of the box to the smallest and largest
adjacent values.
observations in the batch that are not outliers:
4. Look for signs of skewness.
whiskers
 If the data do not appear to be
5. Observations outside the cut-offs: x’s
symmetric, does each batch show the
6. Observations outside the outer fences are
same kind of asymmetry?
encircled: far outliers.
5. Look for potential outliers.
 (FL − 3df, FU + 3df)
When we use boxplots to compare batches, we are
Median  summarize the location of the batch
tempted to note batches that are “significantly”
Fourth-spread  length of the box that shows spread different from each other.
Some amount of skewness is exhibited  look for non-overlapping central boxes.
 the fourths which determine the extent of the
 positively skewed  if median is close to the
box, are inappropriate guides to significance.
lower fourth than to the upper fourth
 negatively skewed  if median is close to the McGill, Tukey, and Larsen: shown one way to use
upper fourth than to the lower fourth regions of overlap or non-overlap of special intervals
around each median of a boxplot.
Tail length: T lines extended to the box
 They mark the ends of these intervals by
Resistance of the Boxplot
putting a notch in the side of the central box.
The boxplot needs the median and the fourths of a data
Two groups whose notch intervals do not overlap can
set because these are resistant to the impact of a few
be said to be significantly different at roughly the 5%
wild data values, the boxplot is also resistant to gross
level.
influence by these values.
Notches
More specifically, up to 25% of the data values can be
made arbitrarily large (“wild”) without greatly  placed symmetrically around the median,
disturbing the median, the fourths, or the rectangular falling at median ± (1.58df / √n)
box in the boxplot.
The multiplying factor, 1.58, combines contributions
The tails of the boxplot are determined primarily by from three different sources:
the most extreme data values that are within the outlier
 relationship between df and the (population)
cutoffs, thus, are relatively undisturbed by gross
standard deviation
changes in the values of any outliers. Thus, they are
 variability of the sample median
relatively undisturbed by gross changes in the values
 factor used in setting confidence limits
of any outliers, and they ca be only modestly affected
by gross changes of values originally within the outlier
cutoffs.
Quantile Plots and Empirical Quantile-Quantile Plots
Comparing Batches Using Boxplots
Quantiles Quantile-Quantile Plots (Q-Q plots)
 The concept of quantile is similar to  allow us to compare the quantiles of two sets
percentiles. The p-th quantile qp of a random of numbers.
variable X is defined as any number qp such  can be constructed by plotting the quantiles of
that, one distribution against the corresponding
o P (X ≤ qp) ≥ p and P (X ≥ qp) ≥ (1−p) quantiles of the other.
 Sample quantiles are based on order statistics.  The two types of Q-Q Plots are
1. Empirical Q-Q plot
Starting with a set of raw data xi, for i=1,…, n, order 2. Theoretical Q-Q plot.
the data from smallest to highest obtaining the data x (i),
i=1,2,…,n. Empirical Quantile-Quantile Plots

 Let p = fraction between 0 and 1  A graphical technique for determining if two


data sets come from populations with a
quantile Q (pi) as follows: common distribution.
 Q (pi) = x(i) whenever pi = ((i−0.5)/n), i=1,…,n  A 45-degree reference line is also plotted.
 If the two sets come from a population with
To construct the quantile plot: the same distribution, the points should fall
approximately along this reference line.
 plot the points (pi, x(i)), i=1,…,n.
o The greater the departure from this
Remarks: reference line, the greater the evidence
for the conclusion that the two data
1. No models for the data are fitted or assumed.
sets have come from populations with
That is, any arbitrary choices of parameter
different distributions.
values are not made.
 These plots can be constructed by plotting the
2. The plot is not a summary since all
quantiles of one empirical distribution (Q X)
observations are on the plot.
against the corresponding quantiles of the
3. Every point is plotted at a distinct location
other (QY), that is, (QX(p), QY(p)).
even if there are exact duplicates in the data.
4. The plot helps determine the density at various Advantages of Q-Q Plot
points. The steeper the slope, the less dense the
area will be. 1. The sample sizes do not need to be equal.
5. The median and other letter values can be 2. It can test many distributional aspects
inferred. simultaneously, i.e.
o shifts in location
We can only define n quantiles so that there will be no o shifts in scale
quantiles in between the p i’s. However, if p is a o changes in symmetry, and
fraction f between pi and pi+1, we can still find its o presence of outliers.
corresponding quantile by interpolating. Here,
Questions Q-Q plot can answer
F = (p− pi) / (pi+1− pi)
 Do two data sets come from populations with a
What if p is a fraction f of the way from pi and pi+1? common distribution?
Solution: Interpolate.  Do two data sets have common location and
scale?
a. Q (p) = (1−f) Q(pi) + f Q(pi+1,)  Do two data sets have similar distributional
b. If p < 0.5/n or p >1 − (0.5/n), then shapes?
 Q(p) = x(1) and Q(p) = x(n)  Do two data sets have similar tail behavior?
respectively, since there are no more
observations below x(1) and above x(n)
Note: We can also characterize symmetry in terms of
the quantile function. We say that the data is
symmetric if Q (0.5) − Q(p)= Q(1−p) − Q(0.5),
0<p<0.5.
Steps in Constructing Q-Q Plot  What is the nature of the departure from
normality (data skewed, shorter than expected
Case 1: Equal number of observations for X & Y
tails, longer than expected tails)?
1. Sort the data values in ascending order.
Normal Probability Plot: Normally Distributed
2. Since QX(pi) = x(i) and QY(pi) = y(i), i=1, 2, …, n,
Data
plot the points (x(i) , y(i),), i=1, 2,…,n.
3. Plot the line y=x.
Therefore, for as long as the two sets have the same
number of observations, the Q-Q plot is the plot of one
sorted data against the other.
Case 2: Unequal number of observations for X & Y
1. Let y(i), i=1,2,…,r and x(j), j=1,2,…,c; r < c.
2. Define y(i) as the (pi = (i−0.5)/r) quantile for Y.
That is, QY(pi) = y(i); i=1,2,…,n.
3. To find the ((j−0.5)/c) quantile of X,
we need a value v ϶
 (v − 0.5)/c = (i−0.5)/r
 v = (c/r)(i−0.5) + 0.5
 If v is an integer, plot y(i) and x(v).
The Normal Q-Q plot shows a strongly linear
 If v is not an integer,
pattern.
o let j: integer part and
o θ: fractional part (v = j + θ). There are only minor deviations from the fit to the
points on the probability plot.
The interpolated QX((i−0.5)/r) = (1−θ)x(j) + θx(j+1)
The normal distribution appears to be a good model
 Plot the corresponding quantiles and line y=x. for these data.
Theoretical Quantile-Quantile Plots Discussion: Visually, the probability plot shows a
 probability plot for a data set Qx and a strongly linear pattern. This is verified by the
theoretical distribution with respective quantile correlation coefficient of 0.999 of the line fit to the
functions Qx and QY is a plot of ordered pairs probability plot. The fact that the points in lower and
(Qx(p),QY(p)) for appropriate values of p. upper extremes of the plot do not deviate significantly
 a graphical technique for determining if a data from the straight-line pattern indicates that there are
set comes from a population with a known not any significant outliers (relative to a normal
distribution. distribution.)
o An example is the Normal Q-Q plot or In this case, we can quite reasonably conclude that the
Normal Probability Plot. normal distribution provides an excellent model for
Normal Probability Plot the data. The intercept and slope of the fitted line give
estimates 9.26 and 0.023 for the location and scale
 A graphical technique for assessing whether or parameters of the fitted normal distribution.
not a data set is approximately normally
distributed.
 The data are plotted against a theoretical
normal distribution in such a way that the
points should form an approximate straight
line.
o Departures from this straight line
indicate departures from normality.
normal probability plot used to answer the ff.
questions:
 Are the data normally distributed?
short tails, the first few points show increasing
departure from the fitted line above the line and last
few points show increasing departure from the fitted
line below the line. For long tails, this pattern is
reversed. In this case, we can reasonably conclude
Normal Probability Plot: Data Have Short Tails that the normal distribution does not provide an
adequate fit for this data set.
Normal Probability Plot: Data are Skewed to the
Right/Left

The normal probability plots show a strongly


The Normal Q-Q plot shows a non-linear pattern.
nonlinear pattern. Specifically, the left plot shows a
The normal distribution is not a good model for these
quadratic pattern in which all the points are below a
data.
reference line drawn between the first and last points.
Discussion: For data with short tails relative to the This quadratic pattern in the normal probability plot is
normal distribution, the non-linearity of the normal the signature of a significantly right-skewed data set.
probability plot shows up in two ways. First, the Similarly, if all the points on the normal probability
middle of the data shows an S-like pattern. This is plot fell above the reference line connecting the first
common for both short and long tails. Second, the first and last points, that would be the signature pattern for
few and the last few points show a marked departure a significantly left-skewed data set.
from the reference fitted line. In comparing this plot to
Normal Q-Q Plot: Bimodal data
the long in the succeeding example, the important
difference is the direction of the departure from the
fitted line for the first few and last few points. For

You might also like