Quantile-Quantile Plots and Normal Distributions, Study notes of Mathematical Statistics

A lecture note from stat 312, focusing on quantile-quantile plots and finding quantile points for normal distributions. It explains how to compute confidence intervals using z-scores and quantiles, and demonstrates the use of r code for finding quantiles and creating q-q plots. The document also discusses the difference between normal and non-normal distributions in q-q plots.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-xm4
koofers-user-xm4 🇺🇸

8 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Stat 312: Lecture 06
Quantile-quantile plots
Moo K. Chung
September 23, 2004
1. In order to compute 100(1 α)% confidence
interval, it is required to find zα/2that satisfies
P(Z > zα/2) = α/2for given α. We will study
how to find zα/2and more. This lecture is based
on Chapter 4.6.
2. The p-th quantile point qfor random variable X
is the point such that
F(q) = P(Xq) = p.
The textbook represent it in terms of percentile.
Note that p-th quantile = 100 ×p-th percentile.
So given p,
q=F1(p).
For XN(0,1), it is easy to find the p-th qun-
tile using
> qnorm(1)
[1] Inf
> qnorm(0.5)
[1] 0
> qnorm(0)
[1] -Inf
> qnorm(0.5)
[1] 0
> qnorm(0.95)
[1] 1.644854
> qnorm(0.05)
[1] -1.644854
In order to find zα, we use command
qnorm(1α).
3. Given nobservations x1,· · · , xn, we order them
from the smallest to the largest and we have
x(1),· · · , x(n). The i-th smallest observation is
defined as the (i0.5)/n-th sample quantile
point or 100(i0.5)/n sample percentile point.
> library(Devore6)
> data(xmp01.05)
20 40 60 80
10 20 30 40 50 60 70
q
sq
Figure 1: Plot of ordered data bingePct showing
sample sq-th quantile.
> attach(xmp01.05)
> sq <- sort(bingPct)
4. If bingePct really follows N(42,142), then
the sample quantiles should be resonably close
to the corresponding quantiles of the normal dis-
tribution. The corresponding quantile points for
bingePct can be computed using
> q=qnorm((1:140-0.5)/140,42,14)
We can check how closely the sample quantiles
corresponds to the normal distribution by plotting
the quantile-quantile plot (QQ-plot) of the sam-
ple quantiles vs. the corresponding quantiles of a
normal distribution (Figure 1).
> plot(q,sq)
5. If XN(µ, σ2), then
Z=Xµ
σN(0,1).
pf2

Partial preview of the text

Download Quantile-Quantile Plots and Normal Distributions and more Study notes Mathematical Statistics in PDF only on Docsity!

Stat 312: Lecture 06

Quantile-quantile plots

Moo K. Chung

[email protected]

September 23, 2004

  1. In order to compute 100(1 − α)% confidence interval, it is required to find zα/ 2 that satisfies P (Z > zα/ 2 ) = α/ 2 for given α. We will study how to find zα/ 2 and more. This lecture is based on Chapter 4.6.
  2. The p-th quantile point q for random variable X is the point such that

F (q) = P (X ≤ q) = p.

The textbook represent it in terms of percentile. Note that p-th quantile = 100 × p-th percentile. So given p, q = F −^1 (p). For X ∼ N (0, 1), it is easy to find the p-th qun- tile using

qnorm(1) [1] Inf qnorm(0.5) [1] 0 qnorm(0) [1] -Inf qnorm(0.5) [1] 0 qnorm(0.95) [1] 1. qnorm(0.05) [1] -1.

In order to find zα, we use command qnorm( 1 − α).

  1. Given n observations x 1 , · · · , xn, we order them from the smallest to the largest and we have x(1), · · · , x(n). The i-th smallest observation is defined as the (i − 0 .5)/n-th sample quantile point or 100(i − 0 .5)/n sample percentile point.

library(Devore6) data(xmp01.05)

20 40 60 80

10

20

30

40

50

60

70

q

sq

Figure 1: Plot of ordered data bingePct showing sample sq-th quantile.

attach(xmp01.05) sq <- sort(bingPct)

  1. If bingePct really follows N (42, 142 ), then the sample quantiles should be resonably close to the corresponding quantiles of the normal dis- tribution. The corresponding quantile points for bingePct can be computed using

q=qnorm((1:140-0.5)/140,42,14)

We can check how closely the sample quantiles corresponds to the normal distribution by plotting the quantile-quantile plot (QQ-plot) of the sam- ple quantiles vs. the corresponding quantiles of a normal distribution (Figure 1).

plot(q,sq)

  1. If X ∼ N (μ, σ^2 ), then

Z = X − μ σ

∼ N (0, 1).

−2 −1 0 1 2

10

20

30

40

50

60

70

Normal Q−Q Plot

Theoretical Quantiles

Sample Quantiles

Figure 2: Normal probability plot of bingePct

−2 −1 0 1 2

0

1

2

3

4

Normal Q−Q Plot

Theoretical Quantiles

Sample Quantiles

Figure 3: Normal probability plot of data that follows an exponential disribution

The p-th quantile of X is given by

p = P (X ≤ q) = P

( (^) X − μ σ

q − μ σ

= P

Z ≤

q − μ σ

The quantile point q of N (μ, σ^2 ) corresponds to the quantile point (q −μ)/σ of N (0, 1). So we do not need to find the quantile points of N (μ, σ^2 ). All we need is the quantile points of N (0, 1) for checking normality. It can be easily done using command

qqnorm(bingePct)

This plot (Figure 2) is usually referred as the nor- mal probability plot.

  1. What would happen if we plot data that do not follow a normal distribution?

x<-rexp(100,1) qqnorm(x)

Review Problems. Example 4.28. 4.29.