ConfidenceIntervals

ConfidenceIntervals - > x = c(2.5 3.1 2.2 1.5 2.9>>...

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: > x = c(2.5, 3.1, 2.2, 1.5, 2.9) > > # quick way (use built in function) > 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 > # Long Way (step by step) > xbar = mean(x) > s=sd(x) > n=length(x) > se=s/sqrt(n) > tcrit=qt(0.025,n-1,lower.tail=F) > > me=tcrit*se > lowerbound=xbar-me > upperbound=xbar+me > > print(tcrit) [1] 2.776445 > print(lowerbound) [1] 1.656668 > print(upperbound) [1] 3.223332 > Note that the command “qt” provides for a way to get the critical values without using a table...
View Full Document

This note was uploaded on 03/27/2012 for the course ECON 2280 taught by Professor Daniel during the Spring '12 term at Dalhousie.

Page1 / 5

ConfidenceIntervals - > x = c(2.5 3.1 2.2 1.5 2.9>>...

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