Introduction to Statistics (MAT/SST 115.03 2008S)

R notes for Activity 22-3


Since we ended up with very different sample sizes (I'm not sure why), I've put the data into two files, Convenient.csv and Inconvenient.csv.

Convenient = read.csv("/home/rebelsky/Stats115/Data/ConvenientSequence.csv")
Inconvenient = read.csv("/home/rebelsky/Stats115/Data/InconvenientSequence.csv")

22-3 e. Visual displays

Here are the commands you might use to build four windows with the four separate displays.

library(BHH2, lib="/home/rebelsky/Stats115/Packages")
X11()
boxplot(Convenient,horizontal=T)
X11()
boxplot(Inconvenient,horizontal=T)
X11()
dotPlot(Convenient)
X11()
dotPlot(Inconvenient)

22-3 g. Test Statistics

Are we doing a two-sided test or a one-sided test? If you're using a one-sided test, which is the direction of the test? Use your answer to figure out which of the following commands to select.

t.test(Convenient,Inconvenient)
t.test(Convenient,Inconvenient, alternative="greater")
t.test(Convenient,Inconvenient, alternative="less")

22-3 h. Confidence intervals

Add conf.level=.90 to your previous answer to compute the confidence interval.

Creative Commons License

Samuel A. Rebelsky, rebelsky@grinnell.edu

Copyright (c) 2007-8 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.