Challenge: Comparing Experimental Groups
Task
Swipe to start coding
Implement a function that takes a DataFrame with columns 'group' and 'outcome', and performs an independent t-test comparing the 'outcome' between groups 'A' and 'B'.
- Extract the
'outcome'values for group'A'and group'B'from the DataFrame. - Use
scipy.stats.ttest_indto perform an independent t-test between the two groups. - Return the t-statistic and p-value as a tuple.
- Print an interpretation stating whether the difference is statistically significant at p < 0.05.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 3
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 5
Challenge: Comparing Experimental Groups
Swipe to show menu
Task
Swipe to start coding
Implement a function that takes a DataFrame with columns 'group' and 'outcome', and performs an independent t-test comparing the 'outcome' between groups 'A' and 'B'.
- Extract the
'outcome'values for group'A'and group'B'from the DataFrame. - Use
scipy.stats.ttest_indto perform an independent t-test between the two groups. - Return the t-statistic and p-value as a tuple.
- Print an interpretation stating whether the difference is statistically significant at p < 0.05.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 3
single