ch2problem4-rcode

ch2problem4-rcode - # Chapter 2 - Confidence Interval...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 # Chapter 2 -- Confidence Interval Problems #BACKGROUND # In order to compute confidence intervals, we can either do the # computations manually (using using the qt() function), or we can use # the confint function. # The qt() function is the quantile function for the t distribution # with a specified degrees of freedom parameter. # Using qt(): qt(.025,21) #[1] -2.079614 # This tells us that P(T <= -2.079614) = 0.025 when T has a t # distribution with 21 degrees of freedom. qt(.95,13) #[1] 1.770933 # Similarly, P(T <= 1.77) = .95 for T with t dist w/ 13df. #To see this on a plot: a=seq(-3,3,length=100) plot(a,dt(a,13),type="l",xlab="y",ylab="f(y)") lines(c(1.77,1.77),c(0,dt(1.770933,13))) text(0,.01,"area of this region = 0.95") text(2.3,.01,"area = 0.05") title("Shows a t dist with 13 df, vertical line at y=1.770933") #_________________________________________________________________ # Using the data from Chapter 1, problem 19, construct a 99% CI for # beta1 and interpret it. See earlier chp1pr19 file to read in the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/16/2009 for the course STAT 540 taught by Professor Staff during the Spring '08 term at Colorado State.

Page1 / 2

ch2problem4-rcode - # Chapter 2 - Confidence Interval...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online