{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lab 2-2: Type II Error and Power\n", "---\n", "\n", "**What is the Type II error and Power for your test on the mean from Lab 2-1?**\n", "\n", "In this case, we will assume that true mean has increased by 30% (true mean is 1.3 times the early mean), and that the pooled standard deviation has increased by 10% (true pooled standard deviation is 1.1 times $\\sigma'$, where $\\sigma'$ is our test estimate of pooled estimator for the two observed data sets)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# import libraries we'll need\n", "import pandas as pd\n", "import numpy as np\n", "import scipy.stats as stats\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/opt/conda/lib/python3.10/site-packages/openpyxl/worksheet/_read_only.py:81: UserWarning: Unknown extension is not supported and will be removed\n", " for idx, row in parser.parse():\n" ] }, { "data": { "text/html": [ "
\n", " | date of peak | \n", "water year | \n", "peak value (cfs) | \n", "gage_ht (feet) | \n", "
---|---|---|---|---|
0 | \n", "1928-10-09 | \n", "1929 | \n", "18800 | \n", "10.55 | \n", "
1 | \n", "1930-02-05 | \n", "1930 | \n", "15800 | \n", "10.44 | \n", "
2 | \n", "1931-01-28 | \n", "1931 | \n", "35100 | \n", "14.08 | \n", "