{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

This preview shows pages 1–6. Sign up to view the full content.

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: t.test(x,y) ###############################################################################

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

View Full Document

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

View Full Document

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

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

{[ snackBarMessage ]}

### Page1 / 6

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

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

View Full Document
Ask a homework question - tutors are online