question 1a

se <- 24/sqrt(100)
se
## [1] 2.4

95% interval

upper1 <- 114 + 1.96*(2.4)
lower1 <- 114 - 1.96*(2.4)
upper1
## [1] 118.704
lower1
## [1] 109.296

question 2

chance <- 3/126
chance
## [1] 0.02380952

question 3

n <- (40^2)/(3^2)
n
## [1] 177.7778

question 4a

library(BSDA)
## Loading required package: lattice
## 
## Attaching package: 'BSDA'
## The following object is masked from 'package:datasets':
## 
##     Orange
tsum.test(107.7,9.5,195,115.3,14.9,96)
## 
##  Welch Modified Two-Sample t-Test
## 
## data:  Summarized x and y
## t = -4.5619, df = 134.2, p-value = 1.131e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -10.894936  -4.305064
## sample estimates:
## mean of x mean of y 
##     107.7     115.3

question 6b 95% interval

upper <- 0.591 + 1.96 * 0.105
lower <- 0.591 - 1.96*0.105
upper
## [1] 0.7968
lower
## [1] 0.3852