Anxiety treatments ANOVA
Psychologists conducted a study to compare the effectiveness of three types of therapy on reducing anxiety levels: Cognitive Behavioral Therapy (CBT), Dialectical Behavior Therapy (DBT), and Acceptance and Commitment Therapy (ACT). Participants were randomly assigned to one of the three therapy groups, and their anxiety levels were measured before and after the therapy sessions. The psychologists have asked you to determine if there are any significant differences in the effectiveness of these therapies.
The therapy_outcomes
DataFrame containing this experiment data has been loaded along with pandas as pd
and from scipy.stats import f_oneway
.
This exercise is part of the course
Experimental Design in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Pivot to view the mean anxiety reduction for each therapy
pivot_table = therapy_outcomes.____(
values='____',
index='____',
aggfunc=____)
print(pivot_table)