title: Calculating confidence intervall for quantiles first by hand (than in R)
body: <p>It would be great if someone can check whether my approach is correct or not. 
  Question in short will be, if the error calculation is the correct way.
  lets assume i have the following data.</p>
  
  <pre><code>data = c(23.7,25.47,25.16,23.08,24.86,27.89,25.9,25.08,25.08,24.16,20.89)
  </code></pre>
  
  <p>Furthermore i want to check if my data follows a normal distribution. </p>
  
  <p><strong>Edit</strong>:  I know that there are tests etc. but i will concentrate on constructing the qqplot with confidence lines. I know that there is a method in the car package, but i want to understand the building of these lines.</p>
  
  <p>So i calculate the percentiles for my sample data as well as for my theoretical distribution (with estimated <code>mu = 24.6609</code>and <code>sigma = 1.6828</code>. So i end up with these two vectors containing the percentiles. </p>
  
  <pre><code>percentileReal =  c(23.08,23.7,24.16,24.86,25.08,25.08,25.16,25.47,25.90)
  percentileTheo =  c(22.50,23.24,23.78,24.23,24.66,25.09,25.54,26.08,26.82)
  </code></pre>
  
  <p>Now i want to calculate the confidence intervall for <code>alpha=0.05</code> for the theoretical percentiles. If i rembember myself correct, the formula is given by</p>
  
  <pre><code>error = z*sigma/sqrt(n),
  value = +- error
  </code></pre>
  
  <p>with <code>n=length(data)</code> and <code>z=quantil of the normal distribution for the given p</code>. </p>
  
  <p>So in order to get the confidence intervall for the 2nd percentile i'll do the following:</p>
  
  <pre><code>error = (qnorm(20+alpha/2,mu,sigma)-qnorm(20-alpha/2,mu,sigma))*sigma/sqrt(n) 
  </code></pre>
  
  <p>Insert the values: </p>
  
  <pre><code>error = (qnorm(0.225,24.6609,1.6828)-qnorm(0.175,24.6609,1.6828)) * 1.6828/sqrt(11)
  error = 0.152985
  confidenceInterval(for 2nd percentil) = [23.24+0.152985,23.24-0.152985]
  confidenceInterval(for 2nd percentil) = [23.0870,23.3929]
  </code></pre>
  
  <p>Finally i have</p>
  
  <pre><code>percentileTheoLower = c(...,23.0870,.....)
  percentileTheoUpper = c(...,23.3929,.....)
  </code></pre>
  
  <p>same for the rest....</p>
  
  <p>So what do you think, can i go with it?</p>