FDPM6

You might also like

You are on page 1of 1

Session 7- Hypothesis Testing

Import the file- MBAdata.csv, give it a name mbaper

# Descriptive statistics

# frequency distribution table

# t.test(y,mu=50) # Ho: mu=50

t.test(data1$Percentage_in_10_Class, mu=80)

t.test(data1$Percentage_in_10_Class, mu=80, alternative = "less")

t.test(data1$Percentage_in_10_Class, mu=80, alternative = "greater")

t.test(data1$Percentage_in_10_Class, mu=80, alternative = "two.sided")

t.test(data1$Percentage_in_10_Class, mu=80, alternative = "two.sided", conf.level = 0.9)

# independent 2-group t-test

# t.test(y~x) # where y is numeric and x is a binary factor

t.test(data1$Percentage_in_10_Class~data1$Gender)

t.test(data1$Percentage_in_10_Class~data1$Gender,alternative = "less")

t.test(data1$Percentage_in_10_Class~data1$Gender,alternative = "greater")

# independent 2-group t-test

# t.test(y1,y2) # where y1 and y2 are numeric

t.test(data1$Percentage_in_10_Class,data1$Percentage_in_12_Class)

t.test(data1$Percentage_in_10_Class,data1$Percentage_in_12_Class, var.equal = TRUE)

t.test(data1$Percentage_in_10_Class,data1$Percentage_in_12_Class, var.equal = FALSE)

t.test(data1$Percentage_in_10_Class,data1$Percentage_in_12_Class, conf.level = 0.95)

Analysis of Variance (ANOVA)

anova1<-aov(Percentage_in_10_Class~Previous_Degree, data=data1)

anova1

print(anova1)

summary(anova1)

# post hoc test

TukeyHSD(anova1)

http://learnrmanoharkapse.blogspot.com

You might also like