Advertisement
fagylalt

Untitled

Oct 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. options(scipen=999)
  2. task4 <- function(sampleSize, difference, variance, alpha) {
  3. firstSet <- rnorm(sampleSize,difference, variance)
  4. difference <- 1.25 + difference
  5. secondSet<- rnorm(sampleSize,difference, variance)
  6. pVal <- t.test(firstSet, secondSet)$p.value
  7. if(pVal > 0.05)
  8. {
  9. print("Means are same")
  10. }else{
  11. print ("Means are smaller")
  12. }
  13. }
  14. task4(10, 2, 0.25)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement