Professional Documents
Culture Documents
Descriptive Statistics
Descriptive Statistics
Descriptive Statistics
#Simple T test
str(Basics)
Basics$Gender=as.factor(Basics$Gender)
var(Basics$Spent[Basics$Gender=="1"])
var(Basics$Spent[Basics$Gender=="2"])
Myresult=t.test(Basics$Spent~Basics$Gender, mu=0,conf=0.95,
var.eq=F,Paired=F)
Myresult
Myresult
Myresult
Myresult
ANOVA
str(Basics)
Basics$Type=as.factor(Basics$Type)
Amit=aov(Rate~Type, data = Basics)
summary(Amit)
Two-way ANOVA
Basics$Flavour=as.factor(Basics$Flavour)
Basics$Price=as.factor(Basics$Price)
Basics$Sales=as.numeric(Basics$Sales)
Amit1=aov(Sales~Flavour+Price, data = Basics)
summary(Amit1)
Amit2=aov(Sales~Flavour+Price+Flavour*Price,data = Basics)
summary(Amit2)
Descriptive Statistics