diff --git a/bootstrap-t.ipynb b/bootstrap-t.ipynb index cd93786..8c2b43d 100644 --- a/bootstrap-t.ipynb +++ b/bootstrap-t.ipynb @@ -1,8 +1,34 @@ { "cells": [ + { + "cell_type": "markdown", + "source": [ + "Bootstrapowa wersja testu t.\n", + "Implementacja powinna obejmować test dla jednej próby, dla dwóch prób niezależnych oraz dla dwóch prób zależnych.\n", + "W każdej sytuacji oczekiwanym wejście jest zbiór danych w odpowiednim formacie, a wyjściem p-wartość oraz ostateczna decyzja.\n", + "Dodatkowo powinien być rysowany odpowiedni rozkład statystyki testowej." + ], + "metadata": { + "collapsed": false + } + }, + { + "cell_type": "markdown", + "source": [ + "Zbiór danych - ???\n", + "Hipoteza zerowa - ???\n", + "Hipoteza alternatywna - ???\n", + "\n", + "Dla każdego z 3 testów inne\n", + "https://www.jmp.com/en_ch/statistics-knowledge-portal/t-test.html" + ], + "metadata": { + "collapsed": false + } + }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 239, "metadata": { "pycharm": { "name": "#%%\n" @@ -14,12 +40,15 @@ "import pandas as pd\n", "from math import sqrt\n", "from scipy.stats import sem\n", - "from scipy.stats import t" + "from scipy.stats import t\n", + "import matplotlib.pyplot as plt\n", + "from statistics import mean, stdev\n", + "from scipy.stats import ttest_ind, ttest_1samp, ttest_rel" ] }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 240, "metadata": { "pycharm": { "name": "#%%\n" @@ -29,24 +58,20 @@ "source": [ "def generate_bootstraps(data, n_bootstraps=100):\n", " data_size = data.shape[0]\n", - " for b in range(n_bootstraps):\n", - " indicies = np.random.choice(len(data), size=data_size)\n", - " yield data.iloc[indicies, :]" + " for _ in range(n_bootstraps):\n", + " indices = np.random.choice(len(data), size=data_size)\n", + " yield data.iloc[indices, :]" ] }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 241, "outputs": [], "source": [ - "def get_t_stat(data1, data2):\n", - " mean1 = np.mean(data1)\n", - " mean2 = np.mean(data2)\n", - " sem1 = sem(data1)\n", - " sem2 = sem(data2)\n", - "\n", - " sed = sqrt(sem1**2.0 + sem2**2.0)\n", - " return (mean1 - mean2) / sed" + "def t_stat_single(sample, population_mean):\n", + " \"\"\"Funkcja oblicza wartość statystyki testowej dla jednej próbki\"\"\"\n", + " sample_size = len(sample)\n", + " return (mean(sample) - population_mean) / (stdev(sample) / sqrt(sample_size))" ], "metadata": { "collapsed": false, @@ -57,7 +82,88 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 242, + "outputs": [], + "source": [ + "def t_stat_ind(sample_1, sample_2):\n", + " \"\"\"Funkcja oblicza wartość statystyki testowej dla dwóch próbek niezależnych\"\"\"\n", + " sed = sqrt(sem(sample_1)**2 + sem(sample_2)**2)\n", + " return (mean(sample_1) - mean(sample_2)) / sed" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 243, + "outputs": [], + "source": [ + "def t_stat_dep(sample_1, sample_2):\n", + " \"\"\"Funkcja oblicza wartość statystyki testowej dla dwóch próbek zależnych\"\"\"\n", + " differences = [x_1 - x_2 for x_1, x_2 in zip(sample_1, sample_2)]\n", + " sample_size = len(sample_1)\n", + " mu = 0 # The constant is zero if we want to test whether the average of the difference is significantly different.\n", + " return (mean(differences) - mu) / (stdev(differences) / sqrt(sample_size))" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 244, + "outputs": [], + "source": [ + "def bootstrap_one_sample():\n", + " return" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 245, + "outputs": [], + "source": [ + "def bootstrap_independent():\n", + " return" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 246, + "outputs": [], + "source": [ + "def bootstrap_dependent():\n", + " return" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 247, "metadata": { "pycharm": { "name": "#%%\n" @@ -67,25 +173,28 @@ "source": [ "def independent_t_test(data, columns, alpha=0.05):\n", " t_stat_sum = 0\n", + " t_stat_list = []\n", " for sample in generate_bootstraps(data):\n", - " t_stat_sum += get_t_stat(sample[columns[0]], sample[columns[1]])\n", - "\n", + " stat = t_stat_ind(sample[columns[0]], sample[columns[1]])\n", + " t_stat_list.append(stat)\n", + " t_stat_sum += stat\n", " data_size = data.shape[0]\n", " t_stat = t_stat_sum / data_size\n", " df = 2 * data_size - 2\n", " cv = t.ppf(1.0 - alpha, df)\n", " p = (1.0 - t.cdf(abs(t_stat), df)) * 2.0\n", - " return t_stat, df, cv, p" + " return t_stat, df, cv, p, t_stat_list" ] }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 248, "outputs": [], "source": [ "def make_decision(data, columns, alpha=0.05):\n", - " t_stat, df, cv, p = independent_t_test(data, columns, alpha)\n", + " t_stat, df, cv, p, stats = independent_t_test(data, columns, alpha)\n", " print(f't: {t_stat}, df: {df}, cv: {cv}, p: {p}\\n')\n", + " draw_distribution(stats)\n", " if abs(t_stat) <= cv:\n", "\t print('Accept null hypothesis that the means are equal.')\n", " else:\n", @@ -104,14 +213,104 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 249, + "outputs": [], + "source": [ + "def draw_distribution(stats): # To powinno być zdefiniowane przed make decision w sumie\n", + " \"\"\"\n", + " Funkcja rysuje rozkład statystyki testowej\n", + " stats: lista statystyk testowych\n", + " \"\"\"\n", + " plt.hist(stats)\n", + " plt.xlabel('Test statistic value')\n", + " plt.ylabel('Frequency')\n", + " plt.show()" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 250, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "t: 6.903407918031469, df: 998, cv: 1.6463818766348755, p: 9.018563673635072e-12\n", + "Statystyka testowa dla jednej próby:\n", + "1.414213562373095 - z naszej funkcji\n", + "1.414213562373095 - z gotowej biblioteki\n", "\n", + "Statystyka testowa dla dwóch prób niezależnych:\n", + "-3.0 - z naszej funkcji\n", + "-3.0 - z gotowej biblioteki\n", + "\n", + "Statystyka testowa dla dwóch prób zależnych:\n", + "-1.6329931618554525 - z naszej funkcji\n", + "-1.632993161855452 - z gotowej biblioteki\n" + ] + } + ], + "source": [ + "# Testy\n", + "dummy = [1, 2, 3, 4, 5]\n", + "dummy2 = [4, 5, 6, 7, 8]\n", + "dummy3 = [1, 3 , 3, 4, 6]\n", + "t_stat_selfmade = t_stat_single(dummy, 2)\n", + "t_stat_lib, _ = ttest_1samp(dummy, 2)\n", + "print('Statystyka testowa dla jednej próby:')\n", + "print(t_stat_selfmade, '- z naszej funkcji')\n", + "print(t_stat_lib, '- z gotowej biblioteki')\n", + "print()\n", + "t_stat_selfmade = t_stat_ind(dummy, dummy2)\n", + "t_stat_lib, _ = ttest_ind(dummy, dummy2)\n", + "print('Statystyka testowa dla dwóch prób niezależnych:')\n", + "print(t_stat_selfmade, '- z naszej funkcji')\n", + "print(t_stat_lib, '- z gotowej biblioteki')\n", + "print()\n", + "t_stat_selfmade = t_stat_dep(dummy, dummy3)\n", + "t_stat_lib, _ = ttest_rel(dummy, dummy3)\n", + "print('Statystyka testowa dla dwóch prób zależnych:')\n", + "print(t_stat_selfmade, '- z naszej funkcji')\n", + "print(t_stat_lib, '- z gotowej biblioteki')" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 251, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "t: 6.929903381575467, df: 998, cv: 1.6463818766348755, p: 7.544853630747639e-12\n", + "\n" + ] + }, + { + "data": { + "text/plain": "
", + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEJCAYAAACT/UyFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliI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ZPAv5447vop26sRBr/Wqofp+qnfmuR6uhEtn0UXyH+U5EbgK8DbqxvL/GPAaQt9uQu8IclNSW4A/h74OF03yUPpHnR9Jt3DdM7oj/VUuqBlgfWWut9J/xE4rN/meh4Z7vi7qns+wmV04X5Z33Z9/996K11//RenvGeb+m3+jEe6xQBeD2zov1C+hbU3MqhWmaNzSlJjPOOXpMYY/JLUGINfkhpj8EtSYwx+SWqMwS9JjTH4JakxBr8kNeb/A8xCTZ43e5wtAAAAAElFTkSuQmCC\n" + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Reject the null hypothesis that the means are equal.\n", "Reject the null hypothesis that the means are equal.\n" ]