Last active
March 13, 2021 13:43
-
-
Save konosp/e4c7efb4c0fc56a148efbd453e2a82b0 to your computer and use it in GitHub Desktop.
Calculating p-value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "id": "involved-breast", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "p-value: 0.007969\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "import scipy.stats as st\n", | |
| "\n", | |
| "p_value_1_tail = 1-st.norm.cdf(2.6534)\n", | |
| "p_value_2_tail = p_value_1_tail * 2\n", | |
| "\n", | |
| "print('p-value: {:0.6f}'.format(p_value_2_tail))" | |
| ] | |
| } | |
| ], | |
| "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.7.4" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment