Skip to content

Instantly share code, notes, and snippets.

@paul-english
Created April 16, 2017 21:34
Show Gist options
  • Save paul-english/9224e7541f0722937716bd48cacfbcc0 to your computer and use it in GitHub Desktop.
Save paul-english/9224e7541f0722937716bd48cacfbcc0 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(0.67507896203629159, 0.013981209053770939)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import scipy.stats as stats\n",
"\n",
"# https://www.reddit.com/r/SampleSize/comments/65qn3m/resultswho_is_hotter_ryan_reynolds_or_ryan_gosling/\n",
"ryans = [\n",
" [129, 241],\n",
" [134, 169]\n",
"]\n",
"\n",
"oddsratio, pvalue = stats.fisher_exact(ryans)\n",
"\n",
"oddsratio, pvalue"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment