diff --git a/Solutions.ipynb b/Solutions.ipynb index b3e2431..f2089a2 100644 --- a/Solutions.ipynb +++ b/Solutions.ipynb @@ -33,12 +33,13 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "39c6f717", + "cell_type": "markdown", + "id": "eac7b071", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "H₀: the mean systolic blood pressure of the Honolulu sample is significantly different from the population mean\\\n", + "H₁: the mean systolic blood pressure of the Honolulu sample is not significantly different from the population mean" + ] }, { "cell_type": "markdown", @@ -49,12 +50,12 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "b09ce149", + "cell_type": "markdown", + "id": "2abffa55", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "Not clear what to do here." + ] }, { "cell_type": "markdown", @@ -66,11 +67,47 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "97f73e20", "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Statistic is: 4.761904761904759\n" + ] + } + ], + "source": [ + "sample_mean = 130.1\n", + "pop_mean = 120\n", + "sample_std = 21.21\n", + "n = 100\n", + "statistic = (130.1 - 120)/(21.21/(n**0.5))\n", + "print(\"Statistic is: \", statistic)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "9f287f12", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Statistic is: 4.761904761904759\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "statistic = (sample_mean - pop_mean)/(sample_std/math.sqrt(n))\n", + "print(\"Statistic is: \", statistic)" + ] }, { "cell_type": "markdown", @@ -97,7 +134,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.8.8" } }, "nbformat": 4,