diff --git a/bootstrap-t.ipynb b/bootstrap-t.ipynb index 7535ea9..338ab8f 100644 --- a/bootstrap-t.ipynb +++ b/bootstrap-t.ipynb @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 120, + "execution_count": 142, "metadata": { "pycharm": { "name": "#%%\n" @@ -48,7 +48,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 143, "metadata": { "pycharm": { "name": "#%%\n" @@ -65,28 +65,7 @@ }, { "cell_type": "code", - "execution_count": 122, - "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" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } - }, - { - "cell_type": "code", - "execution_count": 123, + "execution_count": 144, "outputs": [], "source": [ "def t_stat_single(sample, population_mean):\n", @@ -103,13 +82,13 @@ }, { "cell_type": "code", - "execution_count": 124, + "execution_count": 145, "outputs": [], "source": [ - "def t_stat_indept(sample_1, sample_2):\n", + "def t_stat_ind(sample_1, sample_2):\n", " \"\"\"Funkcja oblicza wartość statystyki testowej dla dwóch próbek niezależnych\"\"\"\n", - " # get_t_stat() jest ok już chyba dla równolicznych sampli o tej samej wariancji\n", - " return" + " sed = sqrt(sem(sample_1)**2 + sem(sample_2)**2)\n", + " return (mean(sample_1) - mean(sample_2)) / sed" ], "metadata": { "collapsed": false, @@ -120,7 +99,7 @@ }, { "cell_type": "code", - "execution_count": 125, + "execution_count": 146, "outputs": [], "source": [ "def t_stat_dep(sample_1, sample_2):\n", @@ -139,7 +118,7 @@ }, { "cell_type": "code", - "execution_count": 126, + "execution_count": 147, "metadata": { "pycharm": { "name": "#%%\n" @@ -150,7 +129,7 @@ "def independent_t_test(data, columns, alpha=0.05):\n", " t_stat_sum = 0\n", " for sample in generate_bootstraps(data):\n", - " t_stat_sum += get_t_stat(sample[columns[0]], sample[columns[1]])\n", + " t_stat_sum += t_stat_ind(sample[columns[0]], sample[columns[1]])\n", "\n", " data_size = data.shape[0]\n", " t_stat = t_stat_sum / data_size\n", @@ -162,7 +141,7 @@ }, { "cell_type": "code", - "execution_count": 127, + "execution_count": 148, "outputs": [], "source": [ "def make_decision(data, columns, alpha=0.05):\n", @@ -186,12 +165,12 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 149, "outputs": [ { "data": { "text/plain": "
", - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAP2UlEQVR4nO3df4xlZX3H8fdHVrBqK+COW7pLOpuKbaipilNK48+CqQjGpa0lEFO3SrLRqsUfrS7aiEljsqjVatLabIW6tgShSMu21FbcYkmTsjog8htZEWTXhR3jz9ZERb/9454tt8PM7s49M3tnHt6vZHLPeZ5z5nyfPTOfOfe5595NVSFJasvjxl2AJGnxGe6S1CDDXZIaZLhLUoMMd0lq0KpxFwCwevXqmpycHHcZkrSi3Hjjjd+oqom5+pZFuE9OTjI9PT3uMiRpRUly/3x9TstIUoMMd0lqkOEuSQ0y3CWpQYa7JDXIcJekBhnuktQgw12SGmS4S1KDlsU7VKXlbHLzNWM57n1bzhzLcdUGr9wlqUGGuyQ1yHCXpAYZ7pLUIMNdkhpkuEtSgwx3SWqQ4S5JDTLcJalBhrskNchwl6QGGe6S1CDDXZIaZLhLUoMOGu5JLkmyL8ltQ23vT3JXkluS/EOSo4f6LkiyK8ndSV66RHVLkg7gUK7cPw6cPqvtWuCZVfUrwJeBCwCSnAicA/xyt89fJjli0aqVJB2Sg4Z7VV0PfHNW22eq6uFu9QZgXbe8AfhkVf2gqr4K7AJOXsR6JUmHY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8OeMvw+L3Ab3V9z9f0CryqPg3824iHbwFurqpvVNUXgf3M3k6gnQXm/T5gR1V9Yzjm2WH/ap83MLvqBC4Dbhp2rZp5w4JzL+Dw6vM1wJeHx1uAP6lZnwFOTnLGyox0eS0w73OATw+P7wZ+anjc7j1f0wF/Ce8fvnW8Mckpw775bh2wfuWHNjbnAG9KsifJPyT5gWH/ap/3YW8Cnqmqx4bttTDvDwK/k+RJ4KPANcP+1T73fRy5b9NPc+QDie3mbcBf7OPAdwPnAYeY/bZ6LVgHnMrst8y/Ctw6rErXindzZPW9VrwPuLqqzgKuBnZNeDwr5b3ALybZC3w78NyEx3PMxn4vlG6q6pnDj5P8MfCpYXO13zrgIHB7zV4M/GySbzJ7o5/VPm+SrAN+Evj+ObtX/byBrcBVw+M/BW4YHq/quVfVI8CPACQ5B9g8PNVu3q7Aj3LUtb6fAA7/9PpO4PIkJyXZCJwNfHalxzdGf87sDzIP/099IrN3aVvt8wZ4G/BIVR2cs28tzPvLwFuGxxcDhy8f3Qn83PDbKBcCX6+qQ5MY4Dgked3w9RXAbwB/NDzV7j1f0yvwJDcBbwVOS3IQuBZ4a5LzmP0BzwHgFwCqal+SW4GHgOeBK6vq/yYw7CVbYN43AjcOv271HLB1WI2v6nlX1S5m7+Pzgssnq+n9hgXf858Hrh++A/kfjtz2+S+Z/U2U/cB/A+9Z8QEvkwXm/eokVw6H3A58Anq+536UXpKa8hKKJDVlwCWpKQMuSU0ZcElqyoBLUlMGXJKaMuCS1NT/A059g8y1NrEyAAAAAElFTkSuQmCC\n" }, "metadata": { "needs_background": "light" @@ -217,7 +196,7 @@ }, { "cell_type": "code", - "execution_count": 129, + "execution_count": 150, "outputs": [ { "name": "stdout", @@ -248,7 +227,7 @@ "print(t_stat_selfmade, '- z naszej funkcji')\n", "print(t_stat_lib, '- z gotowej biblioteki')\n", "print()\n", - "t_stat_selfmade = get_t_stat(dummy, dummy2)\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", @@ -269,13 +248,13 @@ }, { "cell_type": "code", - "execution_count": 130, + "execution_count": 151, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "t: 6.89001510574949, df: 998, cv: 1.6463818766348755, p: 9.867218153658541e-12\n", + "t: 6.914346193374633, df: 998, cv: 1.6463818766348755, p: 8.378631122241131e-12\n", "\n", "Reject the null hypothesis that the means are equal.\n", "Reject the null hypothesis that the means are equal.\n"