dat95 <- c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
dat100 <- c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
dat<-data.frame(dat95,dat100)
a <- sd(dat95)
b <- sd(dat100)
c <- mean(a,b)
boxplot(dat95,dat100,col=c("light blue","red"),names=c("thickness1","thickness2"))
#### the box plot clearly shows that the variance are difference.
cor(dat95,dat100)
## [1] 0.2878289
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
qqnorm(dat95, main = "thickness1")
qqline(dat95)
qqnorm(dat100, main= "thickness2")
qqline(dat100)
#### if the mean of the two samples is the same, then the difference in the two means is zero. Null hypothesis.meanA-meanB=0. The alternate hypothesis is that the difference in means is not zero. meanA-meanB!=0 #### When we check the graph its normally distributed.
library(pwr)
power.t.test(n=8,delta = 2.5,sd=1.64,sig.level = 0.05,alternative = "two.sided")
##
## Two-sample t test power calculation
##
## n = 8
## delta = 2.5
## sd = 1.64
## sig.level = 0.05
## power = 0.8090705
## alternative = two.sided
##
## NOTE: n is number in *each* group
dat95 <- c(5.263,6.748,7.461,7.015,8.133,7.418,3.772,8.963)
dat100 <- c(11.176,7.089,8.097,11.739,11.291,10.759,6.467,8.315)
dat<-data.frame(dat95,dat100)
a <- sd(dat95)
b <- sd(dat100)
c <- mean(a,b)
boxplot(dat95,dat100,col=c("light blue","red"),names=c("thickness1","thickness2"))
cor(dat95,dat100)
library(dplyr)
qqnorm(dat95, main = "thickness1")
qqline(dat95)
qqnorm(dat100, main= "thickness2")
qqline(dat100)
power.t.test(n=8,delta = 2.5,sd=1.64,sig.level = 0.05,alternative = "two.sided")