You are on page 1of 3

Name : SURIYA G

Reg No : 20MIY0002

Course Code : MAT3011

Faculty : MOKESH RAYALU

Assignment : DA6
Objective:
To perform Kolmogorov Smirnov test using R programming

Null Hypothesis: There is no significance difference between


distribution of samples
Alternate Hypothesis: There is significance difference between
distribution of samples
Level of Significance: 5%
Code:
a = c(85,90,88,92,89,91,87,93,86,90)
b = c(78,82,80,85,79,83,81,84,77,80)
ks.test(a,b)

Output:
Exact two-sample Kolmogorov-Smirnov test

data: a and b
D = 0.9, p-value = 0.0002165
alternative hypothesis: two-sided

Conclusion:
Do not Reject H0. There is no significance difference
between the distribution of the samples
Objective:

To perform Kruskal Wallis H test using R programming

Null Hypothesis: There is no significance difference between


samples
Alternate Hypothesis: There is significance difference between
samples
Level of Significance: 5%
Code:
grps = rep(c("fb","insta","twitter"),each=5)
eng = c(25,30,35,40,45,20,22,25,28,30,
15,18,20,22,25)
kruskal.test(eng~grps)

Output:
Kruskal-Wallis rank sum test

data: eng by grps


Kruskal-Wallis chi-squared = 8.7544, df = 2, p-value = 0.01256

Conclusion:
Do not reject H0. There is no significance difference
between samples.

You might also like