{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Probability and Statistics for Engineering and the Sciences (with CD-ROM and InfoTrac )

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Stat 312: Lecture 24 Goodness-of-fit Test for Distributions Moo K. Chung [email protected] April 29, 2003 Concepts 1. Knowing the exact distribution of a sample is important for statistical analysis. We want to test if a sample x1 , · · · , xn follows a certain probability distribution P . We perform a χ 2 goodness-of-fit test on the null hypothesis H0 : P (X ∈ Ci ) = pi for all i = 1, · · · , k For a continuous distribution, Ci are intervals. In-class problems Example 1. Let us see if the distribution of output tuft weight (Example 14.11.) follows an exponential distribution with parameter λ. Interval 0-8 8-16 16-24 24-32 32-40 40-48 48-56 56-64 64-70 Observed # 20 8 7 1 2 1 0 1 0 1 Solution. The density of the exponential random variable X is given by f (x) = λ e−x/λ , x ≥ 0. Note . 8 1 ˆ that 0 λ e−x/λ = 0.5. Solving this, we estimate λ = 11.54. Based on this, we compute the expected number of elements in each category. For instance, the expected number of element in the interval [8, 16] 8 1 is 40 0 11.54 e−x/11.54 dx = 40(pexp(16, 1/11.54) − pexp(8, 1/11.54)). > interval<-c(8,16,24,32,40,48,56,64,70) > p<- pexp(interval,1/r) [1] 0.50 0.75 0.87 0.94 0.97 0.98 0.99 0.996 0.998 > p[2:9]-p[1:8] [1] 0.25 0.12 0.06 0.03 0.016 0.008 0.004 0.002 > 40*(p[2:9]-p[1:8]) 10 5 2.5 1.3 0.6 0.3 0.2 0.06 Expected # 20 10 5 2.5 1.3 0.6 0.3 0.2 0.06 Then we compute χ2 = 50 and the P -value is pchisq(50, 7) = 0. So we reject H 0 and conclude that the exponential distribution is not a good fit. Self-study problems Example 14.11. This is slightly different from the in-class example setting. Exercise 12.14. Assignment 8 Due May 8, 11:00am. 14.6., 14.16., 14.18., 14.26., 14.32. ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online