diff --git a/Z_Test.ipynb b/Z_Test.ipynb new file mode 100644 index 000000000..cad105b81 --- /dev/null +++ b/Z_Test.ipynb @@ -0,0 +1,478 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "yZy_qCyYBHXK", + "outputId": "dc0875b1-660c-48e4-c894-9c0a262203be" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "The Z-value and the corresponding p-value is: (1.5976240527147705, 0.1101266701438426)\n" + ] + } + ], + "source": [ + "from statsmodels.stats.weightstats import ztest as ztest\n", + "\n", + "#enter IQ levels for 20 patients\n", + "data = [88, 92, 94, 94, 96, 97, 97, 97, 99, 99,\n", + " 105, 109, 109, 109, 110, 112, 112, 113, 114, 115]\n", + "\n", + "#perform one sample z-test\n", + "p=ztest(data, value=100)\n", + "print(\"The Z-value and the corresponding p-value is:\",p)\n" + ] + }, + { + "cell_type": "code", + "source": [ + "if p[1]<0.05:\n", + " print(\"Reject Null hypothesis\")\n", + "else:\n", + " print(\"Fail to Reject Null hypothesis \")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "H3OB7f2BC-lx", + "outputId": "697cfec7-a597-4947-9814-8f6430fd1e6d" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Fail to Reject Null hypothesis \n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "#enter IQ levels for 20 individuals from each city\n", + "cityA = [82, 84, 85, 89, 91, 91, 92, 94, 99, 99,\n", + " 105, 109, 109, 109, 110, 112, 112, 113, 114, 114]\n", + "\n", + "cityB = [90, 91, 91, 91, 95, 95, 99, 99, 108, 109,\n", + " 109, 114, 115, 116, 117, 117, 128, 129, 130, 133]\n", + "\n", + "#perform two sample z-test\n", + "p=ztest(cityA, cityB, value=0) \n", + "print(\"The Z-value and the corresponding p-value is:\",p)\n" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ESOEjC4ECfoP", + "outputId": "f21da747-c1dc-42f1-c5ab-0c7a890da2ac" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "The Z-value and the corresponding p-value is: (-1.9953236073282115, 0.046007596761332065)\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "if p[1]<0.05:\n", + " print(\"Reject Null hypothesis\")\n", + "else:\n", + " print(\"Fail to Reject Null hypothesis \")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "7JPudJ_2Btdp", + "outputId": "c6342bce-5308-40dc-9a54-8b6ab5229f23" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Reject Null hypothesis\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "!pip install bioinfokit" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "FKMFH7k1ncQk", + "outputId": "b0d17034-b670-4323-a293-21e1acc4d739" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", + "Collecting bioinfokit\n", + " Downloading bioinfokit-2.1.0.tar.gz (86 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m87.0/87.0 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Requirement already satisfied: pandas in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (1.5.3)\n", + "Requirement already satisfied: numpy in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (1.22.4)\n", + "Requirement already satisfied: matplotlib in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (3.7.1)\n", + "Requirement already satisfied: scipy in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (1.10.1)\n", + "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (1.2.2)\n", + "Requirement already satisfied: seaborn in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (0.12.2)\n", + "Requirement already satisfied: matplotlib-venn in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (0.11.9)\n", + "Requirement already satisfied: tabulate in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (0.8.10)\n", + "Requirement already satisfied: statsmodels in /usr/local/lib/python3.9/dist-packages (from bioinfokit) (0.13.5)\n", + "Collecting textwrap3\n", + " Downloading textwrap3-0.9.2-py2.py3-none-any.whl (12 kB)\n", + "Collecting adjustText\n", + " Downloading adjustText-0.8-py3-none-any.whl (9.1 kB)\n", + "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (2.8.2)\n", + "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (8.4.0)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (1.4.4)\n", + "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (23.0)\n", + "Requirement already satisfied: importlib-resources>=3.2.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (5.12.0)\n", + "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (4.39.3)\n", + "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (3.0.9)\n", + "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (1.0.7)\n", + "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.9/dist-packages (from matplotlib->bioinfokit) (0.11.0)\n", + "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.9/dist-packages (from pandas->bioinfokit) (2022.7.1)\n", + "Requirement already satisfied: joblib>=1.1.1 in /usr/local/lib/python3.9/dist-packages (from scikit-learn->bioinfokit) (1.2.0)\n", + "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.9/dist-packages (from scikit-learn->bioinfokit) (3.1.0)\n", + "Requirement already satisfied: patsy>=0.5.2 in /usr/local/lib/python3.9/dist-packages (from statsmodels->bioinfokit) (0.5.3)\n", + "Requirement already satisfied: zipp>=3.1.0 in /usr/local/lib/python3.9/dist-packages (from importlib-resources>=3.2.0->matplotlib->bioinfokit) (3.15.0)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.9/dist-packages (from patsy>=0.5.2->statsmodels->bioinfokit) (1.16.0)\n", + "Building wheels for collected packages: bioinfokit\n", + " Building wheel for bioinfokit (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for bioinfokit: filename=bioinfokit-2.1.0-py3-none-any.whl size=58662 sha256=27b2c57b2f679b745beb8000ff17b13e9c7a10dd8b162dedcec37d72e8fe6915\n", + " Stored in directory: /root/.cache/pip/wheels/c9/ab/ed/8a7fde0a63653b75ac029d67598265d185e5915dfb594ddc59\n", + "Successfully built bioinfokit\n", + "Installing collected packages: textwrap3, adjustText, bioinfokit\n", + "Successfully installed adjustText-0.8 bioinfokit-2.1.0 textwrap3-0.9.2\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "from bioinfokit.analys import get_data\n", + "\n", + "df = get_data('z_one_samp').data\n", + "df.head(2)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 112 + }, + "id": "ZqowhFEZD77k", + "outputId": "eb47979f-a1b7-44b0-b19c-e46e75ff9bf0" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + " sizes\n", + "0 4.819289\n", + "1 3.569358" + ], + "text/html": [ + "\n", + "
\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
sizes
04.819289
13.569358
\n", + "
\n", + " \n", + " \n", + " \n", + "\n", + " \n", + "
\n", + "
\n", + " " + ] + }, + "metadata": {}, + "execution_count": 3 + } + ] + }, + { + "cell_type": "code", + "source": [ + "df.shape" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LTq4HVUfEsPi", + "outputId": "ea735536-c9bf-418d-d223-f6be046a8a27" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "(50, 1)" + ] + }, + "metadata": {}, + "execution_count": 4 + } + ] + }, + { + "cell_type": "code", + "source": [ + "from bioinfokit.analys import stat\n", + "\n", + "res = stat()\n", + "res.ztest(df=df, x='sizes', mu=5, x_std=0.4, test_type=1)\n", + "print(res.summary)" + ], + "metadata": { + "id": "WjfcTeQ9E07N", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "8d7620f1-3ba9-455f-d226-8741cfd76462" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "One Sample Z-test \n", + "\n", + "------------------ ---------\n", + "Sample size 50\n", + "Mean 5.01796\n", + "Z value 0.317465\n", + "p value (one-tail) 0.375446\n", + "p value (two-tail) 0.750891\n", + "Lower 95.0% 4.90709\n", + "Upper 95.0% 5.12883\n", + "------------------ ---------\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "z, p = res.result[1], res.result[3]\n", + "z, p" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "0zY46jLkpVeD", + "outputId": "1d18bb1f-e0d1-458d-e067-e03c0b8c2fec" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "(0.317464581858033, 0.7508911101410283)" + ] + }, + "metadata": {}, + "execution_count": 6 + } + ] + }, + { + "cell_type": "code", + "source": [ + "if p<0.05:\n", + " print(\"Reject Null hypothesis\")\n", + "else:\n", + " print(\"Fail to Reject Null hypothesis \")" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "F-vYx18zpY08", + "outputId": "fd5ab0d0-9f7d-4849-9856-71997d64c3a0" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Fail to Reject Null hypothesis \n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "id": "S_KwPZncpgXY" + }, + "execution_count": null, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/public/Buttons/Saanthosh _21AIB22/index.html b/public/Buttons/Saanthosh _21AIB22/index.html new file mode 100644 index 000000000..10efd558a --- /dev/null +++ b/public/Buttons/Saanthosh _21AIB22/index.html @@ -0,0 +1,18 @@ + + + + + + + + Document + + +
+ Hover Me! +
+ + +
+ Hover Me! +
\ No newline at end of file diff --git a/public/Buttons/Saanthosh _21AIB22/style.css b/public/Buttons/Saanthosh _21AIB22/style.css new file mode 100644 index 000000000..de437be46 --- /dev/null +++ b/public/Buttons/Saanthosh _21AIB22/style.css @@ -0,0 +1,23 @@ +.wrapper{ + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +a{ + display: block; + font-size: 24px; + font-family: sans-serif; + text-decoration: none; + color: #333; + border-top: 2px solid #333; + border-bottom: 2px solid #333; + padding: 10px; + letter-spacing: 2px; + transition: all .25s; +} + +a:hover{ + letter-spacing: 15px; +}