newcomb <- read.table("C:/Rexamples/newcombdata.txt", header=T) View(newcomb) attach(newcomb) summary(time) boxplot(time) stem(time) qqnorm(time) qqline(time) shapiro.test(time) t.test(time, mu = 33.02) --------------------- NOTE ------------------------ The first line above which reads the data from the file "newcombdata.txt" assumes that this file is in the directory "C:/Rexamples". Obey this convention or modify the command. -------------------------- results ---------------------------------- The boxplot and normal probability plot (qqplot) requested in this program will appear in the plot window of RStudio. They can be saved as pdfs or images. I have not posted them here. These plots are somewhat crude since I did not specify titles, labels, or such. The remainder of this file is copied and pasted from the RStudio command window. -------------------------------------------------------- > newcomb <- read.table("C:/Rexamples/newcombdata.txt", header=T) > View(newcomb) > attach(newcomb) > summary(time) Min. 1st Qu. Median Mean 3rd Qu. Max. 16.00 24.75 27.50 27.75 31.00 40.00 > boxplot(time) > stem(time) The decimal point is at the | 16 | 00 18 | 0 20 | 000 22 | 00000 24 | 0000000000 26 | 00000000000 28 | 000000000000 30 | 00000 32 | 0000000 34 | 0 36 | 00000 38 | 0 40 | 0 > qqnorm(time) > qqline(time) > shapiro.test(time) Shapiro-Wilk normality test data: time W = 0.9846, p-value = 0.6082 > t.test(time, mu = 33.02) One Sample t-test data: time t = -8.2936, df = 63, p-value = 1.095e-11 alternative hypothesis: true mean is not equal to 33.02 95 percent confidence interval: 26.4802 29.0198 sample estimates: mean of x 27.75 > >