Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update problems.es.ipynb #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion notebook/problems.es.ipynb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cells":[{"cell_type":"markdown","id":"a41f3622","metadata":{},"source":["# Ejercicios de probabilidad"]},{"cell_type":"markdown","id":"a6bdbd89","metadata":{},"source":["## Ejercicio 1 \n","\n","Dos dados se lanzan una vez y se observa el total obtenido. Usa una simulación para encontrar la probabilidad estimada de que la puntuación sea mayor a 7 o un número par. Una simulación es una repetición del mismo experimento multiples veces para observar su comportamiento:\n","\n","- Ejecuta el experimento 1000 veces (lanza 2 dados 1000 veces, y suma el número de ambos dados).\n","- Lleva ua cuenta de los números y las veces que la suma fue mayor a 7 o un número par.\n","- Divide el número del paso 2 entre el número de iteraciones(1000)."]},{"cell_type":"code","execution_count":1,"id":"8939d892","metadata":{},"outputs":[],"source":["# TODO"]},{"cell_type":"markdown","id":"55732bca","metadata":{},"source":["## Ejercicio 2\n","\n","Una caja contiene 10 bolas blancas, 20 bolas rojas y 30 bolas verdes. Si tomamos 5 bolas de la caja reemplazándolas (tomando una bola, anotando el color y luego regresandola a la caja). Queremos saber la probabilidad de:\n","\n","1. Tomar 3 blancas y 2 rojas.\n","2. Toas todas del mismo color.\n","\n","Ejecuta el experimento 1000 veces y calcula las probabilidades que mencionadas."]},{"cell_type":"code","execution_count":null,"id":"23244d20","metadata":{},"outputs":[{"ename":"","evalue":"","output_type":"error","traceback":["\u001b[1;31mRunning cells with 'c:\\Program Files\\Python312\\python.exe' requires the ipykernel package.\n","\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n","\u001b[1;31mCommand: '\"c:/Program Files/Python312/python.exe\" -m pip install ipykernel -U --user --force-reinstall'"]}],"source":["ball_box = {}\n","\n","# Crea la cajas con las bolas\n","for i in range(60):\n"," if i < 10:\n"," ball_box[i] = \"White\"\n"," elif (i > 9) and (i < 30):\n"," ball_box[i] = \"Red\"\n"," else:\n"," ball_box[i] = \"Green\"\n","\n","print(ball_box)\n"," \n","# TODO"]}],"metadata":{"interpreter":{"hash":"9248718ffe6ce6938b217e69dbcc175ea21f4c6b28a317e96c05334edae734bb"},"kernelspec":{"display_name":"Python 3.9.12 ('ML-BOOTCAMP')","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.12.1"}},"nbformat":4,"nbformat_minor":5}
{"cells":[{"cell_type":"markdown","id":"a41f3622","metadata":{},"source":["# Ejercicios de probabilidad"]},{"cell_type":"markdown","id":"a6bdbd89","metadata":{},"source":["## Ejercicio 1 \n","\n","Dos dados se lanzan una vez y se observa el total obtenido. Usa una simulación para encontrar la probabilidad estimada de que la puntuación sea mayor a 7 o un número par. Una simulación es una repetición del mismo experimento multiples veces para observar su comportamiento:\n","\n","- Ejecuta el experimento 1000 veces (lanza 2 dados 1000 veces, y suma el número de ambos dados).\n","- Lleva ua cuenta de los números y las veces que la suma fue mayor a 7 o un número par.\n","- Divide el número del paso 2 entre el número de iteraciones(1000)."]},{"cell_type":"code","execution_count":1,"id":"8939d892","metadata":{},"outputs":[],"source":["# TODO"]},{"cell_type":"markdown","id":"55732bca","metadata":{},"source":["## Ejercicio 2\n","\n","Una caja contiene 10 bolas blancas, 20 bolas rojas y 30 bolas verdes. Si tomamos 5 bolas de la caja reemplazándolas (tomando una bola, anotando el color y luego regresandola a la caja). Queremos saber la probabilidad de:\n","\n","1. Tomar 3 blancas y 2 rojas.\n","2. Todas todas del mismo color.\n","\n","Ejecuta el experimento 1000 veces y calcula las probabilidades que mencionadas."]},{"cell_type":"code","execution_count":null,"id":"23244d20","metadata":{},"outputs":[{"ename":"","evalue":"","output_type":"error","traceback":["\u001b[1;31mRunning cells with 'c:\\Program Files\\Python312\\python.exe' requires the ipykernel package.\n","\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n","\u001b[1;31mCommand: '\"c:/Program Files/Python312/python.exe\" -m pip install ipykernel -U --user --force-reinstall'"]}],"source":["ball_box = {}\n","\n","# Crea la cajas con las bolas\n","for i in range(60):\n"," if i < 10:\n"," ball_box[i] = \"White\"\n"," elif (i > 9) and (i < 30):\n"," ball_box[i] = \"Red\"\n"," else:\n"," ball_box[i] = \"Green\"\n","\n","print(ball_box)\n"," \n","# TODO"]}],"metadata":{"interpreter":{"hash":"9248718ffe6ce6938b217e69dbcc175ea21f4c6b28a317e96c05334edae734bb"},"kernelspec":{"display_name":"Python 3.9.12 ('ML-BOOTCAMP')","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.12.1"}},"nbformat":4,"nbformat_minor":5}