The average mark scored by 32 boys is 72 with a standard deviation of 8, while that for 36 girls is 70 with a standard deviation of 6. Write down the R programming code to test whether the boys are performing better than girls on the basis of average mark at 5 % level of significance.
x=rnorm(32, mean = 72, sd = 8) \\ variable for boys scores
y=rnorm(36, mean = 70, sd = 6) \\ variable for girls scores
t.test(x,y,var.equal = FALSE,alternative = "greater",conf.level = 0.95)
Comments
Leave a comment