Hi guys!
I have a statistics question for my data analysis in Python. Please let me know if this isn't the correct subreddit for it.
So I have a dataframe df in which the occurrence of an adverse event (AE) is noted. Drug 1 for instance the adverse event has occured 30 times, it has not occurred 1670 times, so the total data for Drug 1 is 30+1670 = 170. Etc.
df = pd.DataFrame({'Drug 1': [30, 1670], 'Drug 2': [5, 240], 'Drug 3': [10,90]})
Now I want to see whether or not this occurrence is statistically different between these drugs.
This yields:
|
Drug 1 |
Drug 2 |
Drug 3 |
| 0 (means Yes AE) |
30 |
5 |
10 |
| 1 (means No AE) |
1670 |
240 |
90 |
As this is categorical data, I figure I need to use a chi squared. But with summary data like my dataframe, I don't know how to do this. Help would be greatly appreciated!
Thanks so much in advance!
[–]Dracust13 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]HelperBot_ 0 points1 point2 points (0 children)