Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Experimental Design in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Pivot to view the mean anxiety reduction for each therapy
pivot_table = therapy_outcomes.____(
    values='____', 
    index='____', 
    aggfunc=____)
print(pivot_table)
Code bewerken en uitvoeren