-
Notifications
You must be signed in to change notification settings - Fork 10
Odds ratio
Maurice HT Ling edited this page Aug 14, 2021
·
1 revision
Purpose: Measures odds ratio of an outcome as result of exposure.
Code:
>>> from scipy import stats
>>> exposed_positive = 27
>>> exposed_total = 122
>>> unexposed_positive = 44
>>> control_total = 487
>>> odds = (exposed_positive / (exposed_total - exposed_positive)) / \
(unexposed_positive / (unexposed_total - unexposed_positive))
>>> print("odds ratio = %.3f" % odds)
odds ratio = 2.861
Copyright (c) 2008-2024, Maurice HT Ling
Refereed Publications and Technical Reports
Abstracts and Other Un-Refereed Works
Autobiographic Verses (Poems that I wrote) and My Sayings