Exploring Stress Levels, Drug Effects, and Reaction Time with ANOVA in R




For this study, I wanted to see whether stress level affects how a drug influences reaction time. I used three groups: high stress, moderate stress, and low stress. Each group’s reaction times were recorded, and I ran a one-way ANOVA in R to check for differences between them.

The results from the ANOVA showed something pretty interesting. There was a clear difference between the stress levels, the F-value was about 18.92 and the p-value was less than 0.05. That means we can reject the null hypothesis and say that stress levels have a significant effect on reaction time after taking the drug. In simpler terms, the drug didn’t affect everyone the same way, how stressed a person was made a noticeable difference.

Next, I explored the zelazo dataset from the ISwR package, which includes four groups labeled active, passive, none, and ctr.8w. I converted the data into a format R could read easily and ran another one-way ANOVA to compare the groups. This time, the F-value came out around 1.21 with a p-value above 0.05, meaning there wasn’t a significant difference among the four groups. So in this case, we fail to reject the null hypothesis, the average scores for the groups were pretty similar overall.

Running both tests gave me a good understanding of how ANOVA helps compare group means. In the first dataset, the results clearly showed a difference between stress levels, while in the second dataset, there wasn’t enough evidence to say any one group stood out. It was a great hands-on way to see how R handles statistical testing and how results can change depending on the data.

Comments

Popular posts from this blog

Descriptive Statistics: Comparing Two Data Sets in R

The Art of Programming Assignment

Understanding Regression Models: Predicting, Analyzing, and Interpreting Data in R