-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path2 proportion test.R
More file actions
21 lines (18 loc) · 888 Bytes
/
2 proportion test.R
File metadata and controls
21 lines (18 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
###################Proportional T Test(JohnyTalkers data)############
library(readxl)
Johnytalkers<-read_excel("C:/Users/HP/Desktop/datasets/JohnyTalkers.xlsx")
View(Johnytalkers)
attach(Johnytalkers)
table1 <- table(Icecream,Person)
table1
?prop.test
prop.test(x=c(58,152),n=c(480,740),conf.level = 0.95,correct = FALSE,alternative = "less")
# two. sided -> means checking for equal proportions of Adults and children under purchased
# p-value = 6.261e-05 < 0.05 accept alternate hypothesis i.e.
# Unequal proportions
prop.test(x=c(58,152),n=c(480,740),conf.level = 0.95,correct = FALSE,alternative = "greater")
# Ha -> Proportions of Adults > Proportions of Children
# Ho -> Proportions of Children > Proportions of Adults
# p-value = 0.999 >0.05 accept null hypothesis
# so proportion of Children > proportion of Adult
# Do not launch the incentive program