Skip to content

Commit d63ac09

Browse files
committed
Created using Colaboratory
1 parent 1aacbeb commit d63ac09

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"nbformat": 4,
3+
"nbformat_minor": 0,
4+
"metadata": {
5+
"colab": {
6+
"name": "05_monte_carlo_bday.ipynb",
7+
"provenance": [],
8+
"include_colab_link": true
9+
},
10+
"kernelspec": {
11+
"name": "python3",
12+
"display_name": "Python 3"
13+
}
14+
},
15+
"cells": [
16+
{
17+
"cell_type": "markdown",
18+
"metadata": {
19+
"id": "view-in-github",
20+
"colab_type": "text"
21+
},
22+
"source": [
23+
"<a href=\"https://colab.research.google.com/github/gumdropsteve/intro_to_python/blob/day_05/day_05/04_monte_carlo_bday_assignment.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
24+
]
25+
},
26+
{
27+
"cell_type": "markdown",
28+
"metadata": {
29+
"id": "rnj0wuNtHt8E"
30+
},
31+
"source": [
32+
"##Project P5\n",
33+
"\n",
34+
"**There is a famous problem in statistics that concerns a room full of people: Same Birthday!**\n",
35+
"\n",
36+
"An instructor offers a prize of $20.00 to anyone who thinks that two people in the room have the same birthday.\n",
37+
"\n",
38+
"Your assignment is to build a Monte Carlo simulation to tell the instructor how many people need to be in the room to give him/her a better than 50% chance of winning the $20.\n",
39+
"\n",
40+
"That is to say how many people need to be in a room in order for the probability of two of them having the same birthday is greater than 50%. Do the same for 95% and 99%."
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"metadata": {
46+
"id": "yrzJvKsEHhda"
47+
},
48+
"source": [
49+
"import numpy as np"
50+
],
51+
"execution_count": null,
52+
"outputs": []
53+
},
54+
{
55+
"cell_type": "code",
56+
"metadata": {
57+
"id": "Og5IlcBIH-J0"
58+
},
59+
"source": [
60+
"# Create funtion to run simulations"
61+
],
62+
"execution_count": null,
63+
"outputs": []
64+
},
65+
{
66+
"cell_type": "code",
67+
"metadata": {
68+
"id": "sfvmgj26IA6o"
69+
},
70+
"source": [
71+
"# Run simulations"
72+
],
73+
"execution_count": null,
74+
"outputs": []
75+
},
76+
{
77+
"cell_type": "code",
78+
"metadata": {
79+
"id": "lzPJHmdaICpW"
80+
},
81+
"source": [
82+
"# Communicate results"
83+
],
84+
"execution_count": null,
85+
"outputs": []
86+
}
87+
]
88+
}

0 commit comments

Comments
 (0)