{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "kN1mvIl02ZMT"
      },
      "source": [
        "EE 4521/5521, Fall 2026\n",
        "\n",
        "Topic 5\n",
        "\n",
        "Professor Jarvis Haupt"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "m3ZDVxFJKAMb"
      },
      "source": [
        "# One Sample t-Test"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "0mUPY2hYritV"
      },
      "source": [
        "The following example illustrates a one-sample t-test, where we compare the sample mean of a collection of data with a hypothesized value.\n",
        "\n",
        "Our example is based on [this documentation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_1samp.html#scipy.stats.ttest_1samp).\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "PbKxVDyW2Uos",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "d18d7ecc-d4aa-4869-d67f-8b7196f83a22"
      },
      "source": [
        "from scipy import stats\n",
        "import numpy as np\n",
        "\n",
        "np.random.seed(7654567)  # fix seed to get the same result\n",
        "\n",
        "# Generate some Gaussian(5,10) data (an array of size 50)\n",
        "# Here, \"loc\" is the mean and \"scale\" is the standard deviation\n",
        "rvs = stats.norm.rvs(loc=5, scale=10, size=50)\n",
        "\n",
        "# Test whether the mean of the data is 5\n",
        "tst, pv = stats.ttest_1samp(rvs,5)\n",
        "print(f'The t-statistic of the 1st test (mu=5) is {tst} and the p-value is {pv}')\n",
        "\n",
        "\n",
        "# Test whether the mean of the data is 0\n",
        "tst, pv = stats.ttest_1samp(rvs,0)\n",
        "print(f'The t-statistic of the 2nd test (mu=0) is {tst} and the p-value is {pv}')"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "The t-statistic of the 1st test (mu=5) is -1.641262407436716 and the p-value is 0.10714702733404805\n",
            "The t-statistic of the 2nd test (mu=0) is 2.4508135069079167 and the p-value is 0.017868970167555336\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "-5rWdWwMwaCw"
      },
      "source": [
        "Great - we did the test!  So what do the numbers mean??\n",
        "\n",
        "First, the t-statistic is calculated according to $$t = \\frac{\\bar{x}-\\mu_{\\rm guessed}}{s/\\sqrt{n}},$$\n",
        "where $\\bar{x}$ is the sample mean and $s$ is the sample standard deviation (computed using the formulas given in the slides). Here, $\\mu_{\\rm guessed}$ is the (guessed) value of the mean that we're testing against.  This is why the t-statistic is not the same in the two cases, as our guesses for the mean are different in the two cases.\n",
        "\n",
        "Generally speaking, the closer the data are to the hypothesized mean, the *smaller* (in magnitude) the t-statistic is.  As the data become more dissimilar (from the hypothesized mean), the t-statistic grows in absolute value.\n",
        "\n",
        "The p-value is a probability, which will benefit from some explanation.  For a Student's t-distribution with $d=n-1$ degrees of freedom, the p-value (in the routine above) is calculated as twice the probability that a Student's t random variable with the same number of degrees of freedom will take a value at least as large as $|t|$.\n",
        "\n",
        "Stated another way, let $T_d$ denote a Student's t-distributed random variable with $d$ degrees of freedom.  The p-value here is given by $$\\mbox{p-value} = 2\\mbox{Pr}\\left(T_d>|t|\\right).$$  \n",
        "\n",
        "The idea here is this - if the guessed mean is correct (or nearly so), then the test statistic $t$ will essentially be a sample drawn from $T_d$'s probability model. In that case, the probability that $T_d$ exceeds $|t|$ won't be too small, since values of $t$ are (most often) going to be \"typical.\" If the guessed mean was quite different than the true mean, though, then the value of $|t|$ won't be typical for $T_d$'s model.  In this case, the p-value will be *small* (since it will be unlikely to see a sample that large).\n",
        "\n",
        "The way you make a decision based on the test is by comparing the p-value with a *threshold*. Note that in general, it's *possible* for you to see a large value of $T_d$, but it's not likely.  The p-value tells you how likely it is, in a sense, in terms of the probability of that large of a value happening.  If you want to be, say, 95% confident in the outcome of your test, should reject the null hypothesis (i.e., decide that the mean of the data is different from your guess) if the p-value is less than 0.05.  This is called the significance level (the probability of rejecting the null hypothesis given that it's true).\n",
        "\n",
        "Going back to the example, we would ACCEPT the null hypothesis in the first case (i.e., we decide that we don't have evidence to reject the null hypothesis that the data came from a distribution with mean 5).  We would REJECT the null hypothesis in the second case (i.e., decide that we have evidence to suggest that the mean of the data was NOT 0).\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "VE1sV8ZFrMfs"
      },
      "source": [
        "# Two Sample t-Test\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1hDYEpTWrR2Q"
      },
      "source": [
        "Let's modify the example above to explore using the two sample t-Test."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "10xI7iOsr-bV",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "666be533-8532-486e-fbfe-27544a90e437"
      },
      "source": [
        "from scipy import stats\n",
        "import numpy as np\n",
        "\n",
        "np.random.seed(7654567)  # fix seed to get the same result\n",
        "\n",
        "# Generate some Gaussian data (an array of size 50)\n",
        "# Here, \"loc\" is the mean and \"scale\" is the standard deviation\n",
        "num_points = 50\n",
        "rvs1 = stats.norm.rvs(loc=5, scale=1, size=num_points)\n",
        "rvs2 = stats.norm.rvs(loc=5, scale=1, size=num_points)\n",
        "rvs3 = stats.norm.rvs(loc=6, scale=1, size=num_points)\n",
        "\n",
        "# Test whether the first two data sets have the same mean\n",
        "tst, pv = stats.ttest_ind(rvs1,rvs2)\n",
        "print(f'The t-statistic of the 1st pair is {tst} and the p-value is {pv}')\n",
        "\n",
        "# Test whether the second two data sets have the same mean\n",
        "tst, pv = stats.ttest_ind(rvs2,rvs3)\n",
        "print(f'The t-statistic of the 2nd pair is {tst} and the p-value is {pv}')\n",
        "\n",
        "# Test whether the first and third data sets have the same mean\n",
        "tst, pv = stats.ttest_ind(rvs1,rvs3)\n",
        "print(f'The t-statistic of the remaining pair is {tst} and the p-value is {pv}')\n"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "The t-statistic of the 1st pair is -1.596625681881531 and the p-value is 0.11356890250743924\n",
            "The t-statistic of the 2nd pair is -4.325465579005863 and the p-value is 3.666103148200048e-05\n",
            "The t-statistic of the remaining pair is -6.123906260200802 and the p-value is 1.8974259017407836e-08\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "kSI8yNCrL8CY"
      },
      "source": [
        "Using similar rationale as above (without yet knowing what's going on \"under the hood\" here), we might conclude that, at a significance level of 0.05, we should REJECT the null hypotheses for the second and third tests (i.e., decide that the means of the 2nd and 3rd data sets are different, and that the means of the 1st and 3rd data sets are different).  This is, of course, correct (as we can see from how the data are generated).\n",
        "\n",
        "Here's what's going on \"under the hood\" here. First, the test statistic is slightly different, given by $$t = \\frac{\\bar{x}_1-\\bar{x}_2}{s_p \\sqrt{\\frac{2}{n}}},$$ where the $\\bar{x}_k$ denote the sample means of the $k$th data set, and $s_p$ is the square root of the average of the sample variances (each computed using the denominator $n-1$): $$s_p = \\sqrt{\\frac{s_1^2 + s_2^2}{2}}.$$\n",
        "\n",
        "If each data set has $n$ points, then the number of degrees of freedom of this test is $2n-2$.  Stated another way, the test statistic $t$ is (when the null hypothesis is true, that the data sets have the same mean) distributed according to a Student's t-distribution with $2n-2$ degrees of freedom.\n",
        "\n",
        "The test mentioned above assumes that the data sets are *independent* of each other, that their underlying models have the same variances, and that the number of points in each data set is the same.  If the data are not independent, there are [other methods](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_rel.html) one can use. Likewise, if the data sets are of different sizes or have different variances, the definitions above [change slightly](https://en.wikipedia.org/wiki/Student%27s_t-test#Independent_two-sample_t-test).\n",
        "\n",
        "One final caveat is worth mentioning here. In the example above, we essentially described three different tests.  It's crucial to know that the significance level we specified holds for ONE TEST only.  If you want to make SIMULTANEOUS decisions on a number of tests, you have to modify the significance level accordingly, in order to not arrive at some [erroneous conclusions](https://stats.stackexchange.com/questions/88065/explain-the-xkcd-jelly-bean-comic-what-makes-it-funny)!  This is beyond the scope of this lecture, but it is [important](https://en.wikipedia.org/wiki/Multiple_comparisons_problem#Assessing_whether_any_alternative_hypotheses_are_true)!"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "zYCOVYM2TvBt"
      },
      "source": [
        "# Analysis of Variance (ANOVA)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "2mYFOAbsTyJL"
      },
      "source": [
        "As we discussed above, making multiple inferences simultaneously can be a little tricky (with regard to how the significance level is specified and reported).  This complicates the picture if, say, you had multiple data sets that you wanted to compare (e.g., to determine whether each had the same mean).\n",
        "\n",
        "Suppose, for example, that you have $K$ different data sets $\\{x_{1,1},\\dots,x_{n_1,1}\\}, \\dots \\{x_{1,K},\\dots,x_{n_K,K}\\}$, each having $n_k$ points for $k=1,2,\\dots,K$. If you wanted to determine whether each had the same mean, you might try to test each against each other (e.g., 1 vs 2, 1 vs 3,...,$K$-1 vs $K$).  This is a bit \"wasteful\" if you only aim to assess whether the data may have come from the same underlying process or model.  This is precisely the kind of problem that ANOVA addresses.\n",
        "\n",
        "Let's look at an example (modified from our running examples above)."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "gs6PaPFYUrVc",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "ac9cb2f2-2f50-4436-bc1b-17ac8dcec09e"
      },
      "source": [
        "from scipy import stats\n",
        "import numpy as np\n",
        "\n",
        "np.random.seed(7654567)  # fix seed to get the same result\n",
        "data_set_size = 50\n",
        "# Generate some Gaussian(5,10) data (an array of size 50)\n",
        "# Here, \"loc\" is the mean and \"scale\" is the standard deviation\n",
        "rvs1 = stats.norm.rvs(loc=5, scale=1, size=data_set_size)\n",
        "rvs2 = stats.norm.rvs(loc=5, scale=1, size=data_set_size)\n",
        "rvs3 = stats.norm.rvs(loc=6, scale=1, size=data_set_size)\n",
        "rvs4 = stats.norm.rvs(loc=5, scale=1, size=data_set_size)\n",
        "\n",
        "# Test whether the data sets all have the same mean\n",
        "fst, pv = stats.f_oneway(rvs1,rvs2,rvs3,rvs4)\n",
        "print(f'The F-statistic is {fst} and the p-value is {pv}')\n"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "The F-statistic is 4.1663328185376765 and the p-value is 0.023288377729023223\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "HqL93zJiVES4"
      },
      "source": [
        "Before we go into detail about this test, let's revisit our visualization methods for this data..."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "lDGWBbpIVMKj",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 472
        },
        "outputId": "90d0c939-e305-4ad9-e4b9-09cc34ece1f5"
      },
      "source": [
        "import matplotlib.pyplot as plt\n",
        "\n",
        "# assuming the snippet above has been executed so the variables are resident...\n",
        "plt.figure()\n",
        "\n",
        "plt.boxplot([rvs1,rvs2,rvs3,rvs4])\n",
        "plt.title('Boxplots for the datasets')\n",
        "plt.xlabel('Data set index')\n",
        "plt.show()"
      ],
      "execution_count": null,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<Figure size 640x480 with 1 Axes>"
            ],
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAHHCAYAAABtF1i4AAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlHJYcgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAOzdJREFUeJzt3XtY1GX+//HXgIqDgJqiQCGQJzDPVp4yNTE0raiv1pp+1VI72aamtYvtlYdKOpn6zQ5am7a65qql7no+opZairlpgaCF50O1iqCICffvj37MNinkAHJzeD6uay6de+77c79nUOflPffnMw5jjBEAAIAlXrYLAAAAFRthBAAAWEUYAQAAVhFGAACAVYQRAABgFWEEAABYRRgBAABWEUYAAIBVhBEAAGAVYQQoRRwOh8aPH2+7DJfXX39dN954o7y9vdWyZUsrNSQkJMjhcGjRokVW509ISLAyP1AREEZQIcyePVsOh8PtVqdOHXXt2lUrV660XV6Rffvttxo/frzS0tKK7Zhr1qzRc889p44dO2rWrFmaNGlSsR37SubNm6epU6de0zlK2ooVK0pVuJw0aZKWLFliuwzgMoQRVCgTJ07UnDlz9Le//U3PPfecfvjhB911111atmyZ7dKK5Ntvv9WECROKNYxs2LBBXl5e+utf/6qBAwfqrrvuKrZjX0l5DSMTJkywXYYLYQSlVSXbBQAlqWfPnrr55ptd94cMGaK6devq448/Vu/evS1WVvqcOnVKTqdTVapUKZbjGWN04cIFOZ3OYjkegPKDlRFUaDVq1JDT6VSlSu65/Ny5cxo9erRCQ0Pl4+Ojxo0b64033lDel1xnZWUpMjJSkZGRysrKco37z3/+o+DgYHXo0EE5OTmSpMGDB8vPz0/fffedYmJiVK1aNYWEhGjixIm6mi/N/uqrr9SzZ08FBATIz89P3bp10/bt212Pz549W3379pUkde3a1fUxVN4eh507dyomJka1a9eW0+lURESEHnnkkQLndDgcmjVrls6dO+c63uzZsyVJly5d0osvvqj69evLx8dH4eHhGjt2rLKzs92OER4ert69e2v16tW6+eab5XQ6NWPGjCvO16VLFy1fvlwHDx50zRceHu7WJzc3Vy+//LJuuOEGVa1aVd26ddP+/fsvO9YXX3yhHj16qHr16vL19VXnzp31+eefF/h88xw5ckSxsbGqVq2a6tSpo1GjRl32vCRpy5Yt6tu3r+rVqycfHx+FhoZq1KhRbn8WBg8erLffftv1eubd8rzxxhvq0KGDatWqJafTqTZt2lxxX8zatWt12223qUaNGvLz81Pjxo01duxYtz7Z2dkaN26cGjRo4Krnueeec6vd4XDo3Llz+uijj1y1DB48WJKUkZGhkSNHKjw8XD4+PqpTp466d++uXbt2XdXrBhQVKyOoUNLT0/Xjjz/KGKNTp07prbfeUmZmpgYMGODqY4zRPffco40bN2rIkCFq2bKlVq9erWeffVZHjx7VlClT5HQ69dFHH6ljx456/vnn9eabb0qShg8frvT0dM2ePVve3t6uY+bk5KhHjx5q166dXnvtNa1atUrjxo3TpUuXNHHixHzr/eabb9SpUycFBAToueeeU+XKlTVjxgx16dJFmzZtUtu2bXX77bfr6aef1v/93/9p7NixioqKkiRFRUXp1KlTuvPOOxUYGKg///nPqlGjhtLS0vTpp58W+DrNmTNHM2fO1JdffqkPPvhAktShQwdJ0tChQ/XRRx+pT58+Gj16tL744gvFx8crKSlJixcvdjvOvn371K9fPz322GMaNmyYGjdufMX5nn/+eaWnp+vIkSOaMmWKJMnPz8+tzyuvvCIvLy+NGTNG6enpeu2119S/f3998cUXrj4bNmxQz5491aZNG40bN05eXl6aNWuW7rjjDm3ZskW33nprvs85KytL3bp106FDh/T0008rJCREc+bM0YYNGy7ru3DhQp0/f15PPPGEatWqpS+//FJvvfWWjhw5ooULF0qSHnvsMR07dkxr167VnDlzLjvGtGnTdM8996h///66ePGi5s+fr759+2rZsmXq1auXpF9+/r1791bz5s01ceJE+fj4aP/+/W7hKjc3V/fcc48+++wzPfroo4qKitKePXs0ZcoUpaSkuD6WmTNnjoYOHapbb71Vjz76qCSpfv36kqTHH39cixYt0lNPPaUmTZrop59+0meffaakpCS1bt0639cMKDYGqABmzZplJF128/HxMbNnz3bru2TJEiPJvPTSS27tffr0MQ6Hw+zfv9/VFhcXZ7y8vMzmzZvNwoULjSQzdepUt3GDBg0ykswf//hHV1tubq7p1auXqVKlivnhhx9c7ZLMuHHjXPdjY2NNlSpVzIEDB1xtx44dM/7+/ub22293teXNvXHjRre5Fy9ebCSZHTt2XP2L9au6q1Wr5ta2e/duI8kMHTrUrX3MmDFGktmwYYOrLSwszEgyq1atuqr5evXqZcLCwi5r37hxo5FkoqKiTHZ2tqt92rRpRpLZs2ePMeaX17Rhw4YmJibG5ObmuvqdP3/eREREmO7duxc4/9SpU40ks2DBAlfbuXPnTIMGDS57bc+fP3/Z+Pj4eONwOMzBgwddbcOHDz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tXzzz+vtLQ0tWjRQmvWrNHSpUs1cuRI1//AX3rpJe3evVvr16+Xv7+/mjdvrhdeeEF/+ctf1KdPH7crllatWlWrVq3SoEGD1LZtW61cuVLLly/X2LFjFRgYmG+9L730kus6E08++aQqVaqkGTNmKDs7W6+99pqrX8uWLeXt7a1XX31V6enp8vHx0R133KF58+bpnXfe0X333af69esrIyND77//vgICAgp1RdUWLVpo0KBBmjlzps6cOaPOnTvryy+/1EcffaTY2Fh17drV42PmadOmjf7xj3/omWee0S233CI/Pz/dfffdVz3ey8tLH3zwgXr27KmbbrpJDz/8sK6//nodPXpUGzduVEBAgP71r3/lO37YsGGaPn26Bg4cqMTERAUHB2vOnDny9fV16xcZGan69etrzJgxOnr0qAICAvTJJ5+49q789jlJ0tNPP62YmBh5e3vrD3/4g3r16qU333xTPXr00EMPPaRTp07p7bffVoMGDfT111+7xk+cOFGbN29Wr169FBYWplOnTumdd97RDTfcoNtuu02S9L//+79asGCBHn/8cW3cuFEdO3ZUTk6OkpOTtWDBAtd1XvLqWbdund58802FhIQoIiJCjRs31g033KA+ffqoRYsW8vPz07p167Rjxw5Nnjz5ql9/oEjsncgDlJwrndpbtWpV07JlS/Puu++6nQpqjDEZGRlm1KhRJiQkxFSuXNk0bNjQvP76665+iYmJplKlSm6n6xpjzKVLl8wtt9xiQkJCzOnTp40x/z1F9sCBA+bOO+80vr6+pm7dumbcuHEmJyfHbbx+c2qvMcbs2rXLxMTEGD8/P+Pr62u6du1qtm7detlzfP/9982NN95ovL29Xaei7tq1y/Tr18/Uq1fP+Pj4mDp16pjevXubnTt3/u5rdqVTe40x5ueffzYTJkwwERERpnLlyiY0NNTExcWZCxcuuPULCwszvXr1+t158mRmZpqHHnrI1KhRw0hyneabd2rvwoUL3fp///33RpKZNWuWW/tXX31l7r//flOrVi3j4+NjwsLCzAMPPGDWr1//uzUcPHjQ3HPPPcbX19fUrl3bjBgxwqxateqyU3u//fZbEx0dbfz8/Ezt2rXNsGHDzL///e/L6rl06Z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qwggAALCKMAIAAKwijAAAAKsIIwAAwCrCCAAAsIowAgAArCKMAAAAqwgjAADAKsIIAACwijACAACsIowAAACrCCMAAMAqwggAALCKMAIAAKwijAAAAKsIIwAAwCrCCAAAsIowAgAArCKMAAAAqwgjAADAKsIIAACwyuMwcvToUQ0YMEC1atWS0+lUs2bNtHPnzgLHJCQkqHXr1vLx8VGDBg00e/bswtYLAADKGY/CyOnTp9WxY0dVrlxZK1eu1LfffqvJkyerZs2a+Y75/vvv1atXL3Xt2lW7d+/WyJEjNXToUK1evbrIxQMAgLKvkiedX331VYWGhmrWrFmutoiIiALHvPfee4qIiNDkyZMlSVFRUfrss880ZcoUxcTEFKJkAABQnni0MvLPf/5TN998s/r27as6deqoVatWev/99wscs23bNkVHR7u1xcTEaNu2bfmOyc7O1tmzZ91uAACgfPIojHz33Xd699131bBhQ61evVpPPPGEnn76aX300Uf5jjlx4oTq1q3r1la3bl2dPXtWWVlZVxwTHx+v6tWru26hoaGelAkAAMoQj8JIbm6uWrdurUmTJqlVq1Z69NFHNWzYML333nvFWlRcXJzS09Ndt8OHDxfr8QEAQOnhURgJDg5WkyZN3NqioqJ06NChfMcEBQXp5MmTbm0nT55UQECAnE7nFcf4+PgoICDA7QYAAMonjzawduzYUfv27XNrS0lJUVhYWL5j2rdvrxUrVri1rV27Vu3bt/dkagC45oL8HHKeSZGOlb9LMDnPpCjIz2G7DOCKPAojo0aNUocOHTRp0iQ98MAD+vLLLzVz5kzNnDnT1ScuLk5Hjx7V3/72N0nS448/runTp+u5557TI488og0bNmjBggVavnx58T4TACiix9pUUdTmx6TNtispflH65fkBpZFHYeSWW27R4sWLFRcXp4kTJyoiIkJTp05V//79XX2OHz/u9rFNRESEli9frlGjRmnatGm64YYb9MEHH3BaL4BSZ0biRT34wmxFRUbaLqXYJSUna8bkh3SP7UKAK/AojEhS79691bt373wfv9LVVbt06aKvvvrK06kAoESdyDTKqtFICmlpu5Ril3UiVycyje0ygCsqfx+MAgCAMoUwAgAArCKM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HMcbYLuL3nD17VtWrV1d6eroCAgJslwMAAK7C1b5/s4EVAABYRRgBAABWEUYAAIBVhBEAAGAVYQQAAFhFGAEAAFYRRgAAgFWEEQAAYBVhBAAAWEUYAQAAVhFGAACAVYQRAABgFWEEAABYVcl2AVcj74uFz549a7kSAABwtfLet/Pex/NTJsJIRkaGJCk0NNRyJQAAwFMZGRmqXr16vo87zO/FlVIgNzdXx44dk7+/vxwOh+1ySszZs2cVGhqqw4cPKyAgwHY5uMb4eVcs/Lwrlor68zbGKCMjQyEhIfLyyn9nSJlYGfHy8tINN9xguwxrAgICKtQf3oqOn3fFws+7YqmIP++CVkTysIEVAABYRRgBAABWEUZKMR8fH40bN04+Pj62S0EJ4OddsfDzrlj4eResTGxgBQAA5RcrIwAAwCrCCAAAsIowAgAArCKMAAAAqwgjpdDmzZt19913KyQkRA6HQ0uWLLFdEq6R+Ph43XLLLfL391edOnUUGxurffv22S4L18i7776r5s2buy581b59e61cudJ2WSghr7zyihwOh0aOHGm7lFKHMFIKnTt3Ti1atNDbb79tuxRcY5s2bdLw4cO1fft2rV27Vj///LPuvPNOnTt3znZpuAZuuOEGvfLKK0pMTNTOnTt1xx136N5779U333xjuzRcYzt27NCMGTPUvHlz26WUSpzaW8o5HA4tXrxYsbGxtktBCfjhhx9Up04dbdq0SbfffrvtclACrrvuOr3++usaMmSI7VJwjWRmZqp169Z655139NJLL6lly5aaOnWq7bJKFVZGgFIkPT1d0i9vUCjfcnJyNH/+fJ07d07t27e3XQ6uoeHDh6tXr16Kjo62XUqpVSa+KA+oCHJzczVy5Eh17NhRTZs2tV0OrpE9e/aoffv2unDhgvz8/LR48WI1adLEdlm4RubPn69du3Zpx44dtksp1QgjQCkxfPhw7d27V5999pntUnANNW7cWLt371Z6eroWLVqkQYMGadOmTQSScujw4cMaMWKE1q5dq6pVq9oup1Rjz0gpx56RiuGpp57S0qVLtXnzZkVERNguByUoOjpa9evX14wZM2yXgmK2ZMkS3XffffL29na15eTkyOFwyMvLS9n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Nig7t27y8fHR4cOHVLnzp2vOLZKlSqSdFktRVW/fn1VrlxZX3zxherVqydJOn36tFJSUly1tGrVSjk5OTp16pQ6deqU77EeeeQRNWvWTEOGDNGwYcMUHR2tqKioYq0XqEgII0AZl52drRMnTignJ0cnT57UqlWrFB8fr969e2vgwIGSpAYNGujnn3/WW2+9pbvvvluff/653nvvPbfjhIeHKzMzU+vXr1eLFi3k6+urevXqqUqVKnrrrbf0+OOPa+/evXrxxRcLrGfZsmX67rvvdPvtt6tmzZpasWKFcnNz1bhxY/n7+2vMmDEaNWqUcnNzddtttyk9PV2ff/65AgICNGjQIIWFhcnhcGjZsmW666675HQ63VYlCsvPz09DhgzRs88+q1q1aqlOnTp6/vnnXeFMkho1aqT+/ftr4MCBmjx5slq1aqUffvhB69evV/PmzdWrVy+9/fbb2rZtm77++muFhoZq+fLl6t+/v7Zv3+4KUgA8ZHvTCoDCGzRokJFkJJlKlSqZwMBAEx0dbT788EOTk5Pj1vfNN980wcHBxul0mpiYGPO3v/3tso2ijz/+uKlVq5aRZMaNG2eMMWbevHkmPDzc+Pj4mPbt25t//vOfRpL56quvrljTli1bTOfOnU3NmjWN0+k0zZs3N//4xz9cj+fm5pqpU6eaxo0bm8qVK5vAwEATExNjNm3a5OozceJEExQUZBwOhxk0aNAV57nSBtYWLVq49ZkyZYoJCwtz3c/IyDADBgwwvr6+pm7duua1114znTt3djub5uLFi+aFF14w4eHhpnLlyiY4ONjcd9995uuvvzZJSUnG6XSaefPmufqfPn3ahIaGmueee+6KdQL4fQ5jjLGahgAAQIXGRc8AAIBVhBEAAGAVYQQAAFhFGAEAAFYRRgAAgFWEEQAAYBVhBAAAWEUYAQAAVhFGAACAVYQRAABgFWEEAABYRRgBAABW/T9uxt9MVfDBmQAAAABJRU5ErkJggg==\n"
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "zMWvQWcXVwwK"
      },
      "source": [
        "From this, one might *guess* that the third data set is an anomaly here...ANOVA makes this more formal.\n",
        "\n",
        "First, we note that ANOVA also has some assumptions associated with it.  Namely, we assume that\n",
        "\n",
        "1.   Variances of the individual data points in each of the datasets are equal\n",
        "2.   Each data set consists of iid Gaussian samples\n",
        "\n",
        "\n",
        "The ANOVA test statistic is not Student's t-distributed (as with the t-test).  Instead, it follows the so-called [F distribution](https://en.wikipedia.org/wiki/F-distribution).\n",
        "\n",
        "The F-statistic is computed as $$f = \\frac{\\mbox{explained variance}}{\\mbox{unexplained variance}},$$ hence the name \"analysis of variance.\" The \"explained variance\" or \"between group variability\" is computed as $$\\mbox{explained variance} = \\frac{\\sum_{k=1}^K n_k(\\bar{x}_k - \\bar{x})^2}{K-1},$$\n",
        "where $\\bar{x}$ is the mean of the entire collection of data, and the \"unexplained variance\" or \"within group variability\" is given by $$\\mbox{unexplained variance} = \\frac{\\sum_{k=1}^K \\sum_{j=1}^{n_k}(x_{j,k}-\\bar{x}_k)^2}{\\underbrace{\\sum_{k=1}^K n_k}_N - K}.$$  Under the assumptions above, under the null hypotheses (that all groups of data arise from the same model), the test statistic is F-distributed with parameters $d_1=K-1$ and $d_2 = N - K$.\n",
        "\n",
        "Given this, we can see from the example above that at a 0.05 significance level we can reject the null hypothesis for this data (i.e., declare that the models that generated the data were different - they had different means).\n",
        "\n",
        "For you: Change the parameters of the models so that they are all the same, and observe what happens to the p-value (and the test statistic)."
      ]
    }
  ]
}