This is based on a collection of videos provided by Openintro.org. They are available on youtube at
https://www.youtube.com/playlist?list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919.
Each video demonstrates the use of a TI calculator in performing a typical task for an introductory statistics course.
After each video, I have placed a link to one of my videos demonstrating how to do the task in R. The R work is always done on a freely avalaible cloud-based resource, which could be used by anyone with a chromebook. No installation on a student’s computer is required.
I have used https://rdrr.io/ but there are similar resources avalable.
For convenience, I have also provided a final version of the R code I used. Feel free to copy, modify, and use this code.
Entering Data and 1 Variable Statistics
Here are the TI instructions.
https://www.youtube.com/playlist?list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919
Here is the corresponding R code.
# Enter the data using the c() function
L1 = c(2,4,6,8,40)
sum(L1)
## [1] 60
sum(L1^2)
## [1] 1720
mean(L1)
## [1] 12
sd(L1)
## [1] 15.81139
n = length(L1)
sd(L1) * sqrt((n-1)/n)
## [1] 14.14214
sqrt(mean((L1 - mean(L1))^2))
## [1] 14.14214
Boxplot and five number summary
Here are the TI instructions.
https://www.youtube.com/watch?v=VvCw5MRo1P4&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=2
Here is the corresponding R code.
v = c(2,3,4,5,8,12)
boxplot(v,horizontal = TRUE)
summary(v)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.000 3.250 4.500 5.667 7.250 12.000
Computing the Binomial Coefficient and Factorial
Here are the TI instructions.
https://www.youtube.com/watch?v=MgSitJ7Aqxg&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=3
Here is the corresponding R code.
n = 8
r = 2
factorial(n)
## [1] 40320
factorial(r)
## [1] 2
factorial(n)/(factorial(n-r)* factorial(r))
## [1] 28
choose(n,r)
## [1] 28
Binomial Formula
Here are the TI instructions
https://www.youtube.com/watch?v=F6JBimUE43U&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=4
Here is the corresponding R code.
p = 6/10
n = 5
k = 3
dbinom(k,n,p)
## [1] 0.3456
Binomial Cumulative Distribution
Here are the TI instructions.
https://www.youtube.com/watch?v=bGxo7wqKyFY&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=5
Here is the corresponding R code.
pbinom(2,5,.6)
## [1] 0.31744
dbinom(0,5,.6) + dbinom(1,5,.6) + dbinom(2,5,.6)
## [1] 0.31744
Areas under the normal curve
Here are the TI instructions.
https://www.youtube.com/watch?v=o4bQYtsq6Ig&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=6
Here is the corresponding R code.
pnorm(1)
## [1] 0.8413447
pnorm(-1)
## [1] 0.1586553
pnorm(1) - pnorm(-1)
## [1] 0.6826895
1 - pnorm(1)
## [1] 0.1586553
pnorm(110,mean = 100, sd = 10)
## [1] 0.8413447
pnorm(90,mean = 100, sd = 10)
## [1] 0.1586553
Here are the TI instructions
https://www.youtube.com/watch?v=7mkfGJO8ehM&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=7
Here is the corresponding R code.
qnorm(.84)
## [1] 0.9944579
qnorm(pnorm(1))
## [1] 1
1-Proportion Z-Test
Here are the TI Instructions.
https://www.youtube.com/watch?v=-OjbnQGIA3Y&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=8
Here is the corresponding R code.
prop.test(260, 500, p =.5,
alternative = "greater",
conf.level = 0.95,
correct = FALSE)
##
## 1-sample proportions test without continuity correction
##
## data: 260 out of 500, null probability 0.5
## X-squared = 0.8, df = 1, p-value = 0.1855
## alternative hypothesis: true p is greater than 0.5
## 95 percent confidence interval:
## 0.4832406 1.0000000
## sample estimates:
## p
## 0.52
p0 = .5
n = 500
se = sqrt(p0*(1-p0)/n)
z = .02/se
z
## [1] 0.8944272
1 - pnorm(z)
## [1] 0.1855467
Here are the TI instructions.
https://www.youtube.com/watch?v=ZQu-EFcJ0R4&list=PLkIselvEzpM7N8zVRRUl7V8aTdoTsJ919&index=9
Here is the corresponding R code.
# Follow the formulas
x1 = 899
n1 = 1000
x2 = 958
n2 = 1000
phat = (x1 + x2)/(n1 + n2)
p1 = x1/n1
p2 = x2/n2
dp = p1 - p2
null = 0
se = sqrt(phat*(1-phat)) * sqrt(1/n1 + 1/n2)
z = (dp - null)/se
z
## [1] -5.120272
pnorm(z)
## [1] 1.525476e-07
# Use the built-in convenience function.
phat = (899 + 958)/(1000 + 1000)
prop.test(c(899,958),
c(1000,1000),
c(phat,phat),
alternative = "less",
correct = FALSE)
##
## 2-sample test for given proportions without continuity correction
##
## data: c(899, 958) out of c(1000, 1000), null probabilities c(phat, phat)
## X-squared = 26.217, df = 2, p-value = 2.028e-06
## alternative hypothesis: two.sided
## null values:
## prop 1 prop 2
## 0.9285 0.9285
## sample estimates:
## prop 1 prop 2
## 0.899 0.958