#μ_diff -> mean of all population
#x_mean_diff -> mean of sampled population
x_mean_diff=-0.545
σ_diff=8.887
n=200
#Ho: μ_diff = 0
#Ha: μ_diff != 0
μ_diff=0#null hypothesis says that there is no difference between two means
SE_x_mean_diff=(σ_diff/sqrt(n))
Z=( (x_mean_diff-μ_diff)/SE_x_mean_diff)
pvalue<-pnorm(Z)*2
print(pvalue)
## [1] 0.3857919
CI=.95
estimate<-x_mean_diff+c(-1,1)* round(qnorm(CI+(1-CI)/2),2) *SE_x_mean_diff
print(estimate)
## [1] -1.7766754 0.6866754