Documente Academic
Documente Profesional
Documente Cultură
S.Sampath
University of Madras
Data Input
Input via assignment
Descriptive Statistics
Arithmetic Mean
Variance/Standard deviation
Quartiles (Q1,Q2,Q3)
Skewness/Kurtosis based on moments (moments
package)
Kurtosis (Pearson’s measure)
Syntax:
cor(x, y = NULL, method = c("pearson", "kendall", "spearman"))
QQ plot
Shapiro test
Kolmogrov-Smirnov Test
Shapiro test
Shapiro test is a non parametric test meant for
testing the normality of a given set of data.
data: whitney
W = 0.9784, p-value = 0.3986
extra group ID
1 0.7 1 1
Sleep Data 2 -1.6 1 2
3 -0.2 1 3
4 -1.2 1 4
5 -0.1 1 5
6 3.4 1 6
7 3.7 1 7
8 0.8 1 8
9 0.0 1 9
10 2.0 1 10
11 1.9 2 1
12 0.8 2 2
13 1.1 2 3
14 0.1 2 4
15 -0.1 2 5
16 4.4 2 6
17 5.5 2 7
18 1.6 2 8
19 4.6 2 9
20 3.4 2 10
t.test(sleep$extra[sleep$group==1],sleep$extra[sleep$group==2],
paired=T)
t.test(mw$Hgt_of_men,mu=68)
t.test(mw$Hgt_of_men,mw$Hgt_of_women, mu=3)
t.test(mw$Hgt_of_men,mw$Hgt_of_women,conf.level=0.90)
t.test(mw$Hgt_of_men,mw$Hgt_of_women,alternative="grea
ter")
12/7/2019 sampath1959@yahoo.com 9840200275 12
Statistical Computing using R
x<-rnorm(15,10,2)
y<-rnorm(16,10,4)
var.test(x,y)
12/7/2019 sampath1959@yahoo.com 9840200275 13
Statistical Computing using R
x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8)
One-way ANOVA
InsectSprays
plot(count ~ spray, data = InsectSprays)
anova(lm(count~spray)
Aliter :
a2<aov(write~sex+ses)
summary(a2)
TukeyHSD(a2,”ses”) ## Tukey Honest Significant
Difference
12/7/2019 sampath1959@yahoo.com 9840200275 19