Posts

Showing posts from October, 2025

Module 8 assignment

  ANOVA test   stress <- factor(rep(c(" High","Moderate","Low "), each=6))   reaction <- c( 10,9,8,9,10,8, 8,10,6,7,8,8, 4,6,6,4,2,2)   anova <- aov (reaction ~ stress)   summary( anova )   The results showed an F value of approximately 9.71 and a p value of 0.0023. Since the p value was less than 0.05, it could be taken to mean that there was a statistically significant difference in reaction times for the groups of stress. This does not, mean that it could be interpreted that stress was influencing how people reacted to this drug. The greater the stress, the slower the reaction was.   Zelazo   library( ISwR )   data(" zelazo ")   zelazo_df <- stack( zelazo )   anova2 <- aov (values ~ ind , data= zelazo_df )   summary(anova2)   The ANOVA with values given by the Zelazo material show an F value of about 1.78 and a p-value of .175. This is greater than .05 so that there is no real difference between the f...

Module 7

1.1   Y = a + bX + e   x <- c(16, 17, 13, 18, 12, 14, 19, 11, 11, 10)   y <- c(63, 81, 56, 91, 47, 57, 76, 72, 62, 48)   model1 <- lm (y ~ x)   summary(model1)   1.2   coef(model1)   Intercept (a) = 14.82lope (b) = 3.74   Regression Equation: Y = 14.82 + 3.74X   For every unit increment in the independent variable x, y increases about 3.74 unit compare this with unit regression in the earlier case.   2.   The model for predicting eruption duration (discharge) based on waiting time (waiting) is:   discharge = a + b(waiting) + e   data(faithful)   model2 <-  lm (eruptions ~ waiting, data = faithful)   summary(model2)   2.2   coef (model2)   Results:       Intercept (a) = –1.874       Slope (b) = 0.0756       Estimated Regression Equation:   discharge = –1.874 + 0.0756(waiting)     2.3...