diff --git a/your-code/main.ipynb b/your-code/main.ipynb index 332f496..269d460 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -1,6 +1,7 @@ { "cells": [ { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -9,14 +10,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "# Libraries" + "# Libraries\n", + "import pandas as pd\n", + "import numpy as np\n", + "import scipy.stats as st" ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -32,14 +37,29 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(172.14308590115726, 174.79024743217607)" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "# your code here" + "# your code here\n", + "heights = [167, 167, 168, 168, 168, 169, 171, 172, 173, 175, 175, 175, 177, 182, 195]\n", + "np.mean(heights)\n", + "st.norm.interval(0.80, loc=np.mean(heights), scale=4/np.sqrt(15))" ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -51,14 +71,87 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 37, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "105" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "# your code here" + "lista = [ 1 for item in range(27)] + [ 0 for item in range(105-27)]" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.43705881545081005" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.std(lista)" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.2571428571428571" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.mean(lista)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(0.38239734376337375, 0.49172028713824634)\n", + "(0.36690157607248103, 0.507216054829139)\n" + ] + } + ], + "source": [ + "# your code here\n", + "\n", + "print(st.norm.interval(0.80, loc=27/105, scale=np.std(lista)/np.sqrt(105)))\n", + "print(st.norm.interval(0.90, loc=27/105, scale=np.std(lista)/np.sqrt(105)))" ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -84,6 +177,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -102,6 +196,7 @@ ] }, { + "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ @@ -145,7 +240,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.11.2" } }, "nbformat": 4,