-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsample_T_test.R
More file actions
25 lines (18 loc) · 789 Bytes
/
sample_T_test.R
File metadata and controls
25 lines (18 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#######################2 sample T test(Cutlets)####################
library(readr)
cutlets=read.csv("C:/Users/HP/Desktop/assignments submission/Hypothesis testing/Cutlets.csv")
View(cutlets)
attach(cutlets)
###########Normality test#############
shapiro.test(Unit.A)
#p-val=0.32>0.05, accept H0 =>Normal
shapiro.test(Unit.B)
#p-val=0.52>0.05, accept H0 =>Normal
##############variance test ##################
var.test(Unit.A,Unit.B,data=cutlets)
#p-value = 0.3136>0.05, accept H0 =>Equal Variance
################2 sample T test###########
t.test(Unit.A,Unit.B,data=cutlets,alternative="two.sided",conf.level=0.95)
#p-value = 0.4723>0.05, accept H0
#H0= difference in diameter of cutlet of unit A & B=0
#Ha= difference in diameter of cutlet of unit A & B!=0