ttestR - # recall that we use t-tests to make inferences...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 ## recall that we use t-tests to make inferences about mean parameters ## for roughly normal data with estimated standard deviations ## the R function t.test is performs t-tests ## for one sample, two samples, or matched pairs ## ## it also computes t confidence intervals ## ## let's analyze treatment versus control data on a new ## method of teaching reading ## simple one-sample example with hypothetical data: x = c(3.1, -2.5, 8.6, 11.9, 5.2) # Suppose these are paired differences and we wish to perform the t-test # of of H0: the mean difference is zero # The following function gets the p-value and also gives us a confidence interval: t.test(x) # Suppose instead we wish to test H0: mean =1 versus Ha: mean > 1 t.test(x, mu=1, alternative="greater") # suppose we want a 90% confidence inteval instead of 95% t.test(x, conf.level=.90) ## two-sample example with hypothetical data compare x data with new y data y = c(6.2, 5.0, 8.8, 4.3, -3.6) # test for mean difference = 0 using a two-sample t-test:
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 09/11/2011 for the course STAT 200 taught by Professor Agniel during the Spring '09 term at University of Illinois at Urbana–Champaign.

Page1 / 6

ttestR - # recall that we use t-tests to make inferences...

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