ConfidenceIntervals

ConfidenceIntervals - > x = c(2.5, 3.1, 2.2,...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
ONE SAMPLE T-INTERVAL (95% CI) USING MINITAB MTB > set c1 DATA> 2.5 3.1 2.2 1.5 2.9 DATA> end MTB > Onet C1. One-Sample T: C1 Variable N Mean StDev SE Mean 95% CI C1 5 2.440 0.631 0.282 (1.657, 3.223) How to look up the critical t-value in Minitab (instead of using t-tables) MTB > InvCDF 0.025; SUBC> T 4. Inverse Cumulative Distribution Function Student's t distribution with 4 DF P( X <= x ) x 0.025 -2.77645 This yields the t-value with lower tail area of 0.025. Use its absolute value (2.776) for scale factor in confidence interval
Background image of page 4
ONE SAMPLE T-INTERVAL (95% CI) USING R (# are comments, not commands) > # Clear the workspace > rm(list=ls()) > > # enter the data
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &gt; x = c(2.5, 3.1, 2.2, 1.5, 2.9) &gt; &gt; # quick way (use built in function) &gt; t.test(x, conf.int=0.95) One Sample t-test data: x t = 8.6484, df = 4, p-value = 0.0009833 alternative hypothesis: true mean is not equal to 0 95 percent confidence interval: 1.656668 3.223332 sample estimates: mean of x 2.44 The long-way uses the same formulae as in class &gt; # Long Way (step by step) &gt; xbar = mean(x) &gt; s=sd(x) &gt; n=length(x) &gt; se=s/sqrt(n) &gt; tcrit=qt(0.025,n-1,lower.tail=F) &gt; &gt; me=tcrit*se &gt; lowerbound=xbar-me &gt; upperbound=xbar+me &gt; &gt; print(tcrit) [1] 2.776445 &gt; print(lowerbound) [1] 1.656668 &gt; print(upperbound) [1] 3.223332 &gt; Note that the command qt provides for a way to get the critical values without using a table...
View Full Document

Page1 / 5

ConfidenceIntervals - &amp;amp;gt; x = c(2.5, 3.1, 2.2,...

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

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