<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OJS</journal-id><journal-title-group><journal-title>Open Journal of Statistics</journal-title></journal-title-group><issn pub-type="epub">2161-718X</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ojs.2021.116054</article-id><article-id pub-id-type="publisher-id">OJS-113526</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  Influence of the Fitted Straight Line for Confidence Bands Algorithm in Q-Q Plots
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Sonia</surname><given-names>Castillo-Gutiérrez</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>María</surname><given-names>Dolores Estudillo-Martínez</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Emilio</surname><given-names>Damián Lozano-Aguilera</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Statistics and Operations Research, University of Jaén, Jaén, Spain</addr-line></aff><pub-date pub-type="epub"><day>29</day><month>11</month><year>2021</year></pub-date><volume>11</volume><issue>06</issue><fpage>925</fpage><lpage>930</lpage><history><date date-type="received"><day>8,</day>	<month>October</month>	<year>2021</year></date><date date-type="rev-recd"><day>27,</day>	<month>November</month>	<year>2021</year>	</date><date date-type="accepted"><day>30,</day>	<month>November</month>	<year>2021</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Confidence bands in a Normal Q-Q Plot allow us to detect non-normality of a data set rigorously, and in such a way that the conclusion does not depend on the subjectivity of the observer of the graph. In the construction of the graph, it is usual to fit a straight line to the plotted points, which serves both to check the hypothesis of normality (linear configuration of the plotted points) and to produce estimates of the parameters of the distribution. We can opt for dif-ferent types of lines. In this paper, we study the influence of five types of fitted straight lines in a Normal Q-Q Plot used for construction the confidence bands based on the exact distribution of the order statistics.
 
</p></abstract><kwd-group><kwd>Normal Q-Q Plot</kwd><kwd> Confidence Bands</kwd><kwd> Fitted Straight Line</kwd><kwd> Goodness of Fit</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Normal probability plots and, in particular, Normal Q-Q Plots, are used to determine if a set of observations derives from a normal distribution. For this, it is necessary that the plotted points on the graph have a rectilinear configuration.</p><p>Normal Q-Q Plot compares the empirical quantiles of sample data, i.e., the ordered sample data, Q x ( p i ) = x ( i ) , with the corresponding quantiles of a theoretical distribution, i.e., the normal distribution, Q t ( p i ) = Φ − 1 ( p i ) . Therefore,</p><p>the plotted points on the graph are the pairs ( Φ − 1 ( p i ) , x ( i ) ) where Φ is the</p><p>standard normal cumulative distribution function and p i , i = 1 , ⋯ , n are the plotting positions. In the literature, several definitions of plotting positions are available [<xref ref-type="bibr" rid="scirp.113526-ref1">1</xref>] [<xref ref-type="bibr" rid="scirp.113526-ref2">2</xref>].</p><p>In the development of this paper, we will use the definition proposed by Yu and Huang [<xref ref-type="bibr" rid="scirp.113526-ref3">3</xref>]:</p><p>p i = i − 0.326 n + 0.348 ,     i = 1 , ⋯ , n . (1)</p><p>On a Normal Q-Q Plot, we can represent a straight line enabling us to take a decision about the straight form of the points on the graph and determine if the hypothesis of normality is verified. There are also different lines that we can represent on the graph [<xref ref-type="bibr" rid="scirp.113526-ref4">4</xref>].</p><p>The main problem of this graphical technique is that the observer of the graph may affect the conclusion. That is why this technique is often called “informal technique”. To avoid this problem, the confidence bands or acceptance region [<xref ref-type="bibr" rid="scirp.113526-ref5">5</xref>] are used to determine whether or not a data set has a normal distribution, so that the conclusion is the same regardless of the observer of the graph. Some of the confidence bands depend on the straight line represented on the Normal Q-Q Plot to be able to be constructed.</p><p>Therefore, the plotting positions, the fitted straight line and the confidence bands are key elements in a Normal Q-Q Plot. Due to the high number of combinations of these three elements that exist, it is necessary to analyze the influence that the use of different combinations can have on the final conclusion. In this study, we will focus on the analysis of five types of straight lines and on the confidence bands based on the exact distribution of the order statistics [<xref ref-type="bibr" rid="scirp.113526-ref5">5</xref>].</p><p>Here, we focus on the normal distribution. However, the study can be extended to any distribution of interest.</p><p>This paper is organized as follows: in Section 2, we explain the five straight lines that we have used in this study. Section 3 presents the confidence bands based on the exact distribution of the order statistics. In Section 4, two examples illustrate the performance provided. Finally, in the last section, the conclusions of this study are presented.</p></sec><sec id="s2"><title>2. Fitted Straight Lines in a Q-Q Plot</title><p>In this section, we carry out a review of some of the straight lines which can be fitted in a Q-Q Plot [<xref ref-type="bibr" rid="scirp.113526-ref4">4</xref>] and that we will use in our study to verify the influence they have on the confidence bands.</p><p>1) Straight line that passes through the first and third quartiles. This procedure consists of locating a point on the graph corresponding to the first quartile and another corresponding to the third quartile and joining these two points.</p><p>2) The least-squares line. The straight line, in our case, will take the form:</p><p>x = μ + σ z (2)</p><p>and the estimation of &#181; and σ will be obtained by using the unweighted least squares method. The solution in the case of normal distribution is the following:</p><p>σ ˜ = ∑ z i x ( i ) ∑ z i 2 ,     μ ˜ = x &#175; (3)</p><p>and the fitted straight line is: x = μ ˜ + σ ˜ z , where x ( i ) are the ordered observations and z i are the N (0, 1) quantiles in the plotting positions p i .</p><p>3) Straight line with slope the quasi-standard deviation s and constant the average of the data set. This method consists of fitting the straight line to the plotted points: x = x &#175; + s z where x &#175; is the average of the observations.</p><p>4) Theil-Sen’s line [<xref ref-type="bibr" rid="scirp.113526-ref6">6</xref>]. The slopes of the lines passing through all possible pairs of points are calculated. Then, the median of all previous slopes is taken as an estimate of the slope. For the calculation of the constant, n constants of the lines through each of the points and the previously estimated slope are calculated. The estimated constant of the straight line will be the median of then constants obtained.</p><p>5) Tukey’s line [<xref ref-type="bibr" rid="scirp.113526-ref7">7</xref>]. This method consists of dividing the set of observations into three equal parts and calculating the median for each of them and determining the straight line from the three medians. The steps to obtain Tukey’s line of general expression x = a + b y are the following:</p><p>a) Given the observations: ( z 1 , x ( 1 ) ) , ⋯ , ( z n , x ( n ) ) , they are divided into three groups with an approximately equal number of elements according to the variable z.</p><p>b) For each group the median is calculated by obtaining the following points:</p><p>( z ˜ L , x ˜ L ) , ( z ˜ C , x ˜ C ) , ( z ˜ R , x ˜ R ) (4)</p><p>where z ˜ L is the median of the left group, z ˜ C is the median of the central group and z ˜ R is the median of the right group of the observations of z. Similar to the observations of x.</p><p>c) The slope of Tukey’s line is calculated by the following expression:</p><p>b = x ˜ R − x ˜ L z ˜ R − z ˜ L (5)</p><p>d) The constant of Tukey’s line is calculated by the following expression:</p><p>a = ( x ˜ R + x ˜ C + x ˜ L ) − b ( z ˜ R + z ˜ C + z ˜ L ) 3 (6)</p></sec><sec id="s3"><title>3. Confidence Bands Based on the Exact Distribution of the Order Statistics</title><p>The procedure to obtain the confidence bands based on the exact distribution of the order statistics is [<xref ref-type="bibr" rid="scirp.113526-ref5">5</xref>]:</p><p>Step 1 Fix the significance level α.</p><p>Step 2 Draw a Normal Q-Q Plot and fit a straight line. The fitted straight line provides an estimate of the parameters &#181; and σ of the normal distribution.</p><p>Step 3 Determine, for each i, i = 1 , ⋯ , n , the values Φ i ( p 1 ( i ) ( α ) ) and Φ i ( p 2 ( i ) ( α ) ) as the quantiles of order α / 2 and 1 − α / 2 of a B e t a ( i , n − i + 1 ) distribution.</p><p>Step 4 Determine the values p 1 ( i ) ( α ) and p 2 ( i ) ( α ) , for each i, as the value Φ − 1 in the quantiles calculated in the previous step. Φ is the distribution function of a normal distribution with parameters &#181; and σ. The values of &#181; and σ are the values obtained in Step 2.</p><p>Step 5 Plot, for each i, vertically, an interval centered on the corresponding point of the fitted straight line with the lower end of the band as the point p 1 ( i ) ( α ) and the upper end as the point p 2 ( i ) ( α ) .</p><p>Step 6 Join the points calculated in the preceding step to obtain a band.</p><p>Step 7 Reject the hypothesis of normality if at least α% of the observations fall outside the confidence bands.</p></sec><sec id="s4"><title>4. Examples</title><p>In this section, we show two examples of how to construct Normal Q-Q Plot using confidence bands. First, considering simulated data and, secondly, with real data. The examples have been made using R [<xref ref-type="bibr" rid="scirp.113526-ref8">8</xref>].</p><sec id="s4_1"><title>4.1. Example 1</title><p><xref ref-type="table" rid="table1">Table 1</xref> shows a simulated size 30 sample of a Cauchy distribution.</p><p><xref ref-type="fig" rid="fig1">Figure 1</xref> shows a Normal Q-Q Plot constructed from the above observations. The plotting position considered, p i , is that of Yu and Huang [<xref ref-type="bibr" rid="scirp.113526-ref3">3</xref>]. However, any other plotting position could be used to construct the Normal Q-Q Plot. The plot also represents the confidence bands based on the exact distribution of the order statistics. To obtain these confidence bands, we have considered a straight</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Simulated sample of a Cauchy distributio</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >0.64526129 −0.41264397 0.38854176 0.90409775 0.34705189</th><th align="center" valign="middle" >−0.23126506 −2.00742570 2.61359225 2.40883027 −4.50703372</th><th align="center" valign="middle" >−2.89827739 −0.12076996 −0.00184472 2.06627019 0.02023511</th><th align="center" valign="middle" >0.00419841 0.44170899 2.79458447 −0.20223268 −0.29384267</th><th align="center" valign="middle" >−0.33761901 0.36764003 −1.65745029 −1.35559281 0.48452742</th><th align="center" valign="middle" >2.76499664 0.23110927 0.07538504 −1.99385347 1.40517152</th></tr></thead></tbody></table></table-wrap><p>line that passes through the first and third quartiles and the least-squares line. It can be observed that the hypothesis of normality of observations is rejected according to the confidence bands obtained by considering the straight line that passes through the first and third quartiles, but it is not rejected according to that obtained by the least-squares line, although the data comes from a Cauchy distribution.</p></sec><sec id="s4_2"><title>4.2. Example 2</title><p>The data set shown in <xref ref-type="table" rid="table2">Table 2</xref> comes from Bickel and Doksum [<xref ref-type="bibr" rid="scirp.113526-ref9">9</xref>] and lists the elapsed times spent above a certain high level for a series of 66 wave records taken at San Francisco Bay.</p><p>Following the same procedure as in the previous example, we have obtained <xref ref-type="fig" rid="fig2">Figure 2</xref>.</p><p>In <xref ref-type="fig" rid="fig2">Figure 2</xref>, we can observe that the hypothesis of normality is rejected according to the confidence bands obtained by considering the straight line that passes through the first and third quartiles (there are 5 points outside the confidence bands, more than α = 5% of the data). Instead, it is not rejected according to that obtained by the least-squares line (there are 3 points outside the proposed confidence bands, less than α = 5% of the data).</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Data set from Bickel and Doksum</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >2.968 1.958 3.391 1.182 1.071 9.665</th><th align="center" valign="middle" >2.097 4.058 2.093 4.114 4.455 5.564</th><th align="center" valign="middle" >1.611 3.918 6.053 2.075 3.676 3.599</th><th align="center" valign="middle" >3.038 2.019 4.196 2.834 2.666 2.723</th><th align="center" valign="middle" >7.921 3.689 2.788 3.968 5.457 2.870</th><th align="center" valign="middle" >5.476 3.081 4.511 6.480 1.046 5.453</th><th align="center" valign="middle" >9.858 4.229 7.300 2.360 1.908 4.091</th><th align="center" valign="middle" >1.397 4.669 5.856 5.249 3.064 3.716</th><th align="center" valign="middle" >0.155 2.274 0.860 5.100 5.392 6.156</th><th align="center" valign="middle" >1.301 1.971 2.093 4.131 8.393 2.039</th><th align="center" valign="middle" >9.054 10.379 0.703 0.020 0.916 1.582</th></tr></thead></tbody></table></table-wrap></sec></sec><sec id="s5"><title>5. Conclusions</title><p>The aim of this work has been to analyze the influence of different types of straight lines that can be represented in a Normal Q-Q Plot at the moment of detecting the non-normality of a set of observations. Confidence bands represented in Q-Q Plot depend on the fitted straight line, so if we change the straight line, the confidence bands also change, and the conclusion may be different.</p><p>There are three elements that can vary in a Normal Q-Q Plot: plotting positions, confidence bands and straight lines. We have focused on the plotting positions proposed by Yu and Huang [<xref ref-type="bibr" rid="scirp.113526-ref3">3</xref>]. In [<xref ref-type="bibr" rid="scirp.113526-ref5">5</xref>] out of the three graphic techniques compared, the best method proves to be the confidence bands based on the exact distribution of the order statistics, so in this study, we have used such confidence bands. Therefore, we have fixed these two elements and we have compared the graphics obtained with five types of straight lines. The final conclusion is that the election of straight line for construction of confidence bands in a Normal Q-Q Plot it can change the decision about whether or not the data comes from a Normal distribution. Therefore, special care must be taken about the line to choose when building a Normal Q-Q Plot.</p></sec><sec id="s6"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s7"><title>Cite this paper</title><p>Castillo-Guti&#233;rrez, S., Estudillo-Mart&#237;nez, M.D. and Lozano- Aguilera, E.D. (2021) Influence of the Fitted Straight Line for Confidence Bands Algorithm in Q-Q Plots. Open Journal of Statistics, 11, 925-930. https://doi.org/10.4236/ojs.2021.116054</p></sec></body><back><ref-list><title>References</title><ref id="scirp.113526-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Castillo-Gutiérrez, S., Lozano-Aguilera, E. and Estudillo-Martínez, M.D. (2012) Selection of a Plotting Position for a Normal Q-Q Plot. R Script. Journal of Communication and Computer, 9, 243-250.</mixed-citation></ref><ref id="scirp.113526-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Cunnane, C. (1978) Unbiased Plotting Positions. A Review. Journal of Hydrology, 37, 205-222. https://doi.org/10.1016/0022-1694(78)90017-3</mixed-citation></ref><ref id="scirp.113526-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Yu, G.-H. and Huang, C.-C. (2001) A Distribution Free Plotting Position. Stochastic Environmental Research and Risk Assessment, 15, 462-476.  
https://doi.org/10.1007/s004770100083</mixed-citation></ref><ref id="scirp.113526-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Castillo-Gutiérrez, S., Lozano-Aguilera, E. and Estudillo-Martínez, M.D. (2012) A New Proposal to Adjust a Straight Line to a Normal Q-Q Plot. Journal of Mathematics and System Science, 2, 327-333.</mixed-citation></ref><ref id="scirp.113526-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Estudillo-Martínez, M.D., Castillo-Gutiérrez, S. and Lozano-Aguilera, E. (2013) New Confidence Bands on Q-Q Plots to Detect Non-Normality. International Journal of Computer Mathematics, 90, 2137-2146.  
https://doi.org/10.1080/00207160.2013.792920</mixed-citation></ref><ref id="scirp.113526-ref6"><label>6</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Theil</surname><given-names> H. </given-names></name>,<etal>et al</etal>. (<year>1950</year>)<article-title>A Rank Invariant Method for Linear and Polynomial Regression Analysis I, II, III</article-title><source> Proceedings of Koninklijke Nederlandse Akademie van Wetenschappen Serie A</source><volume> 53</volume>,<fpage> 386</fpage>-<lpage>392</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.113526-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Tukey, J.W. (1977) Exploratory Data Analysis. Addison-Wesley.</mixed-citation></ref><ref id="scirp.113526-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">R Development Core Team (2008) R: A Language and Environment for Statistical Computing, Vienna, Austria. http://www.r-project.org/</mixed-citation></ref><ref id="scirp.113526-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Bickel, P.J. and Doksum, K.A. (1977) Mathematical Statistics: Basic Ideas and Selected Topics. Holden-Day, San Francisco.</mixed-citation></ref></ref-list></back></article>