Skip to content

Commit

Permalink
Merge branch 'data-8:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
pitmonticone committed Jun 9, 2022
2 parents 2100741 + dd92daa commit ca0ed10
Show file tree
Hide file tree
Showing 26 changed files with 47,713 additions and 2,958 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#######################################################################################
# Book settings
title: Computational and Inferential Thinking
author: Ani Adhikari and John DeNero
author: Ani Adhikari and John DeNero and David Wagner
email: ''
logo : "favicon.png" # A path to the book logo
exclude_patterns : ["README.md"] # Patterns to skip when building the book. Can be glob-style (e.g. "*skip.ipynb")
Expand Down
12 changes: 7 additions & 5 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ sections:
title: Sampling from a Population
- file: chapters/10/3/Empirical_Distribution_of_a_Statistic
title: Empirical Distibution of a Statistic
- file: chapters/10/4/Random_Sampling_in_Python
title: Random Sampling in Python
- file: chapters/11/Testing_Hypotheses
title: Testing Hypotheses
sections:
- file: chapters/11/1/Assessing_Models
title: Assessing Models
- file: chapters/11/1/Assessing_a_Model
title: Assessing a Model
- file: chapters/11/2/Multiple_Categories
title: Multiple Categories
- file: chapters/11/3/Decisions_and_Uncertainty
Expand All @@ -142,10 +144,10 @@ sections:
sections:
- file: chapters/12/1/AB_Testing
title: A/B Testing
- file: chapters/12/2/Deflategate
title: Deflategate
- file: chapters/12/3/Causality
- file: chapters/12/2/Causality
title: Causality
- file: chapters/12/3/Deflategate
title: Deflategate
- file: chapters/13/Estimation
title: Estimation
sections:
Expand Down
2 changes: 1 addition & 1 deletion assets/data/family_heights.csv

Large diffs are not rendered by default.

44,526 changes: 44,526 additions & 0 deletions assets/data/san_francisco_2019.csv

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions chapters/08/1/Applying_a_Function_to_a_Column.ipynb

Large diffs are not rendered by default.

215 changes: 88 additions & 127 deletions chapters/09/3/Simulation.ipynb

Large diffs are not rendered by default.

168 changes: 109 additions & 59 deletions chapters/09/4/Monty_Hall_Problem.ipynb

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletions chapters/09/5/Finding_Probabilities.ipynb

Large diffs are not rendered by default.

65 changes: 37 additions & 28 deletions chapters/10/1/Empirical_Distributions.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions chapters/10/2/Sampling_from_a_Population.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"\n",
"As an example, we will study a population of flight delay times. The table `united` contains data for United Airlines domestic flights departing from San Francisco in the summer of 2015. The data are made publicly available by the [Bureau of Transportation Statistics](http://www.transtats.bts.gov/Fields.asp?Table_ID=293) in the United States Department of Transportation.\n",
"\n",
"There are 13,825 rows, each corresponding to a flight. The columns are the date of the flight, the flight number, the destination airport code, and the departure delay time in minutes. Some delay times are negative; those flights left early."
"There are 13,825 rows, each corresponding to a flight. The columns are the date of the flight, the flight number, the destination airport code, and the departure delay time in minutes. Some delay times are negative: those flights left early."
]
},
{
Expand Down Expand Up @@ -373,7 +373,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.8"
"version": "3.8.3"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions chapters/10/3/Empirical_Distribution_of_a_Statistic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"\n",
"**Step 1: Decide which statistic to simulate.** We have already decided that: we are going to simulate the median of a random sample of size 1000 drawn from the population of flight delays.\n",
"\n",
"**Step 2: Write the code to generate one value of the statistic.** Draw a random sample of size 1000 and compute the median of the sample. We did this in the code cell above. Here it is again, encapsulated in a function."
"**Step 2: Define a function that returns one simulated value of the statistic.** Draw a random sample of size 1000 and compute the median of the sample. We did this in the code cell above. Here it is again, encapsulated in a function."
]
},
{
Expand All @@ -285,7 +285,7 @@
"source": [
"**Step 3: Decide how many simulated values to generate.** Let's do 5,000 repetitions.\n",
"\n",
"**Step 4: Write the code to generate an array of simulated values.** As in all simulations, we start by creating an empty array in which we will collect our results. We will then set up a `for` loop for generating all the simulated values. The body of the loop will consist of generating one simulated value of the sample median, and appending it to our collection array.\n",
"**Step 4: Use a `for` loop to generate an array of simulated values.** As usual, we will start by creating an empty array in which to collect our results. We will then set up a `for` loop for generating all the simulated values. The body of the loop will consist of generating one simulated value of the sample median, and appending it to our collection array.\n",
"\n",
"The simulation takes a noticeable amount of time to run. That is because it is performing 5000 repetitions of the process of drawing a sample of size 1000 and computing its median. That's a lot of sampling and repeating!"
]
Expand Down Expand Up @@ -463,7 +463,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.8"
"version": "3.8.3"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit ca0ed10

Please sign in to comment.