160 likes | 321 Views
ENGR 224/STAT 224 Probability and Statistics Lecture 12. Probability Plots. Before we move into the field of inferential statistics, we need a few more tools to test our assumptions. An effective way to check the assumption on the distribution is to construct a probability plot.
E N D
Probability Plots Before we move into the field of inferential statistics, we need a few more tools to test our assumptions. An effective way to check the assumption on the distribution is to construct a probability plot. In essence, one plots the assumed percentile of the distribution against the observed percentile of the sample.
Percentiles of the Population • Recall that the (100p)th percentile of a continuous probability distribution having cdf F(x) is the number h(p) that satisfies F(h(p))=p • If our assumption was that the distribution was normal, then the table A.3 can be used to determine various percentiles. • E.g., the • 2.5th percentile is -1.96 • 7.5th percentile is -1.44 • 12.5th percentile is -1.15 • Etc.
Percentiles of the Sample • Order the n sample observations from smallest to largest. The ith smallest observation in the list is taken to be the [100(i-.5)/n]th sample percentile. • For example. If n=20, then the first number in the sample is the 2.5th percentile, the second number is the 7.5th percentile, the third is the 12.5th percentile, the 20th number (the last one) is the 97.5th percentile.
Probability Plot • If the sample was drawn from a population whose distribution we are investigating, then the sample percentiles should be close to the population percentiles • If one graphs the ordered pair • It should be a straight line
Example Here is some data. We shall assume a normal distribution. Since n is 20, the corresponding percentiles are 2.5th , 7.5th , 12.5th , etc., The percentiles scores are We shall now plot the assumed distributional percentiles against the sample data to construct a probability plot.
Lets try a different assumption • Assume Distribution is Exponential. Need to solve • Similarly for the remainders
Example Same data as before: Assume distribution is exponential. Since n is 20, the corresponding percentiles are 2.5th , 7.5th , 12.5th , etc., The percentiles scores assuming an exponential distribution are
Example Different data. Assume distribution is exponential. Since n is 20, the corresponding percentiles are 2.5th , 7.5th , 12.5th , etc., The percentiles scores assuming an exponential distribution are
Using R: Probability Plots • > A <- scan() • ENTER THE DATA AND PRESS DOUBLE RETURN TO END • > qqnorm(A); # a normal probability plot • > qqline(A); # adds a line if desired • > qqplot(dist,A) # plots a probability plot of the dist vs data • Dist could be • qnorm(ppoints(250)) • qexp(ppoints(250),rate) • qt(ppoints(250),df) • qgamma(ppoints(250),alpha,beta)
Overview • Probability Plots • Using R
Homework • Reread 4.6, • Read 5.1 and 5.2