According to the Question 1:
Type of Test : Paired
Significant Level , \(\alpha\) :
0.05
Standard deviation, \(S_{d}\)=
0.03
Delta, $$ = 0.015
Power : .75
power.t.test(n=NULL, delta = .015, sd= .03, sig.level= .05, power= .75, type = c("paired"), alternative= c("one.sided"))
##
## Paired t test power calculation
##
## n = 22.92961
## delta = 0.015
## sd = 0.03
## sig.level = 0.05
## power = 0.75
## alternative = one.sided
##
## NOTE: n is number of *pairs*, sd is std.dev. of *differences* within pairs
We used power.t.test to determine the sample size for question 1, The sample size should be 23 pairs.
According to the Question: Type of test= Two-sample
Level of sig , \(\alpha\)=.10
power=.85
if sd=1, then u1-u2=0.5,
so Cohen’s d = u1-u2/sd = 0.5
library(pwr)
pwr.t.test(n=NULL,d=.5, sig.level = .1,power = .85,type = c("two.sample"),alternative = c("greater"))
##
## Two-sample t test power calculation
##
## n = 43.40568
## d = 0.5
## sig.level = 0.1
## power = 0.85
## alternative = greater
##
## NOTE: n is number in *each* group
In Question 2, We do not know the value of sd, so we used pwr.t.test to find out the sample size. The sample size for this two sample t-test should be 44 for both samples. So, the total sample should be 88.
#According to the Question 1:\
#Type of Test : Paired \
#Significant Level , $\alpha$ : 0.05\
#Standard deviation, $S_{d}$= 0.03\
#Delta, $\Delta $ = 0.015\
#Power : .75\
?power.t.test
power.t.test(n=NULL, delta = .015, sd= .03, sig.level= .05, power= .75, type = c("paired"), alternative= c("one.sided"))
#According to the Question 1:\
#Type of Test : Paired \
#Significant Level , $\alpha$ : 0.05\
#Standard deviation, $S_{d}$= 0.03\
#Delta, $\Delta $ = 0.015\
#Power : .75\
library(pwr)
?pwr.t.test
pwr.t.test(n=NULL,d=.5, sig.level = .1,power = .85,type = c("two.sample"),alternative = c("greater"))
#In Question 2, We do not know the value of sd, so we used pwr.t.test to find out the sample size.
#The sample size for this two sample t-test should be 44 for both samples.
#So, the total sample should be 88.