diff --git a/Solutions.ipynb b/Solutions.ipynb index b3e2431..be62ae4 100644 --- a/Solutions.ipynb +++ b/Solutions.ipynb @@ -33,12 +33,14 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "39c6f717", + "cell_type": "markdown", + "id": "0ac74075", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "H0: μ = 120\n", + "\n", + "H1: μ != 120" + ] }, { "cell_type": "markdown", @@ -49,12 +51,16 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "b09ce149", + "cell_type": "markdown", + "id": "1b493c62", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "Level of significance = 0.05\n", + "\n", + "Calculate the test statistic based on the given information:\n", + "- If the test statistic falls in the critical region, then we reject the Null Hypothesis\n", + "- If the test statistic falls in the region between the critical region, we accept the Null Hypothesis ie our assumption about the population to be true." + ] }, { "cell_type": "markdown", @@ -66,18 +72,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "97f73e20", "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "id": "4a7564e5", - "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Statistic is: 4.761904761904759\n" + ] + } + ], "source": [ - "## 2. If you finished the previous question, please go through the code for principal_component_analysis_example provided in the files_for_lab folder ." + "from statistics import math\n", + "\n", + "sample_mean = 130.1\n", + "pop_mean = 120\n", + "pop_std = 21.21\n", + "n = 100\n", + "statistic = (sample_mean - pop_mean)/(pop_std/math.sqrt(n))\n", + "print(\"Statistic is: \", statistic)" ] } ], @@ -97,7 +112,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.8.8" } }, "nbformat": 4,