diff --git a/interact/api/contents/all.json b/interact/api/contents/all.json index bb6c95d..8e829b0 100644 --- a/interact/api/contents/all.json +++ b/interact/api/contents/all.json @@ -2,11 +2,11 @@ "content": [ { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.023747Z", + "last_modified": "2024-08-15T18:38:17.583956Z", "mimetype": null, "name": "bill_in_rstudio.ipynb", "path": "bill_in_rstudio.ipynb", @@ -16,11 +16,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.043748Z", + "last_modified": "2024-08-15T18:38:17.603956Z", "mimetype": null, "name": "female_calves.ipynb", "path": "female_calves.ipynb", @@ -30,11 +30,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.155749Z", + "last_modified": "2024-08-15T18:38:17.719957Z", "mimetype": null, "name": "merger_ranks.ipynb", "path": "merger_ranks.ipynb", @@ -44,11 +44,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.099748Z", + "last_modified": "2024-08-15T18:38:17.663956Z", "mimetype": null, "name": "fine_win.ipynb", "path": "fine_win.ipynb", @@ -58,11 +58,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.199749Z", + "last_modified": "2024-08-15T18:38:17.763957Z", "mimetype": null, "name": "basketball_shots.ipynb", "path": "basketball_shots.ipynb", @@ -72,11 +72,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.959747Z", + "last_modified": "2024-08-15T18:38:17.519955Z", "mimetype": null, "name": "battery_lifetime_solution.ipynb", "path": "battery_lifetime_solution.ipynb", @@ -86,11 +86,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.203749Z", + "last_modified": "2024-08-15T18:38:17.767957Z", "mimetype": null, "name": "three_of_a_kind.ipynb", "path": "three_of_a_kind.ipynb", @@ -100,11 +100,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.983747Z", + "last_modified": "2024-08-15T18:38:17.543956Z", "mimetype": null, "name": "offenders.ipynb", "path": "offenders.ipynb", @@ -114,11 +114,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.059748Z", + "last_modified": "2024-08-15T18:38:17.623956Z", "mimetype": null, "name": "birthweight_bootstap.ipynb", "path": "birthweight_bootstap.ipynb", @@ -128,11 +128,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.127748Z", + "last_modified": "2024-08-15T18:38:17.691957Z", "mimetype": null, "name": "billies_bill.ipynb", "path": "billies_bill.ipynb", @@ -142,11 +142,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.011747Z", + "last_modified": "2024-08-15T18:38:17.571956Z", "mimetype": null, "name": "sampling_tools.ipynb", "path": "sampling_tools.ipynb", @@ -156,11 +156,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.071748Z", + "last_modified": "2024-08-15T18:38:17.635956Z", "mimetype": null, "name": "gold_silver_ships.ipynb", "path": "gold_silver_ships.ipynb", @@ -170,11 +170,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.087748Z", + "last_modified": "2024-08-15T18:38:17.647956Z", "mimetype": null, "name": "building_strings.ipynb", "path": "building_strings.ipynb", @@ -184,11 +184,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.199749Z", + "last_modified": "2024-08-15T18:38:17.763957Z", "mimetype": null, "name": "birthday_problem.ipynb", "path": "birthday_problem.ipynb", @@ -198,11 +198,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.231750Z", + "last_modified": "2024-08-15T18:38:17.795957Z", "mimetype": null, "name": "five_spades_four_girls.ipynb", "path": "five_spades_four_girls.ipynb", @@ -212,11 +212,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.043748Z", + "last_modified": "2024-08-15T18:38:17.607956Z", "mimetype": null, "name": "athlete_iq_rank_count.ipynb", "path": "athlete_iq_rank_count.ipynb", @@ -226,11 +226,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.027747Z", + "last_modified": "2024-08-15T18:38:17.591956Z", "mimetype": null, "name": "liquor_prices.ipynb", "path": "liquor_prices.ipynb", @@ -240,11 +240,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.963747Z", + "last_modified": "2024-08-15T18:38:17.523955Z", "mimetype": null, "name": "exchange_rates_solution.ipynb", "path": "exchange_rates_solution.ipynb", @@ -254,11 +254,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.159749Z", + "last_modified": "2024-08-15T18:38:17.723957Z", "mimetype": null, "name": "trump_clinton.ipynb", "path": "trump_clinton.ipynb", @@ -268,11 +268,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.979747Z", + "last_modified": "2024-08-15T18:38:17.539956Z", "mimetype": null, "name": "bayes_covid.ipynb", "path": "bayes_covid.ipynb", @@ -282,11 +282,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.167749Z", + "last_modified": "2024-08-15T18:38:17.731957Z", "mimetype": null, "name": "pill_placebo.ipynb", "path": "pill_placebo.ipynb", @@ -296,11 +296,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.115748Z", + "last_modified": "2024-08-15T18:38:17.679956Z", "mimetype": null, "name": "mouse_permutation.ipynb", "path": "mouse_permutation.ipynb", @@ -310,11 +310,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.059748Z", + "last_modified": "2024-08-15T18:38:17.619956Z", "mimetype": null, "name": "intro_data_frames.ipynb", "path": "intro_data_frames.ipynb", @@ -324,11 +324,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.991747Z", + "last_modified": "2024-08-15T18:38:17.551956Z", "mimetype": null, "name": "two_pairs.ipynb", "path": "two_pairs.ipynb", @@ -338,11 +338,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.967747Z", + "last_modified": "2024-08-15T18:38:17.527956Z", "mimetype": null, "name": "optical_density_exercise.ipynb", "path": "optical_density_exercise.ipynb", @@ -352,11 +352,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.235750Z", + "last_modified": "2024-08-15T18:38:17.799958Z", "mimetype": null, "name": "viewer_numbers.ipynb", "path": "viewer_numbers.ipynb", @@ -366,11 +366,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.195749Z", + "last_modified": "2024-08-15T18:38:17.759957Z", "mimetype": null, "name": "on_histograms.ipynb", "path": "on_histograms.ipynb", @@ -380,11 +380,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.111748Z", + "last_modified": "2024-08-15T18:38:17.675956Z", "mimetype": null, "name": "athlete_iq_cc.ipynb", "path": "athlete_iq_cc.ipynb", @@ -394,11 +394,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.239750Z", + "last_modified": "2024-08-15T18:38:17.803957Z", "mimetype": null, "name": "battery_lifetime_exercise.ipynb", "path": "battery_lifetime_exercise.ipynb", @@ -408,11 +408,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.019747Z", + "last_modified": "2024-08-15T18:38:17.583956Z", "mimetype": null, "name": "unemployment_percent_exercise.ipynb", "path": "unemployment_percent_exercise.ipynb", @@ -422,11 +422,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.039747Z", + "last_modified": "2024-08-15T18:38:17.603956Z", "mimetype": null, "name": "contract_poll.ipynb", "path": "contract_poll.ipynb", @@ -436,11 +436,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.015747Z", + "last_modified": "2024-08-15T18:38:17.575956Z", "mimetype": null, "name": "pennies.ipynb", "path": "pennies.ipynb", @@ -450,11 +450,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.171771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.043748Z", + "last_modified": "2024-08-15T18:38:17.607956Z", "mimetype": null, "name": "voter_participation_exercise.ipynb", "path": "voter_participation_exercise.ipynb", @@ -464,11 +464,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.035748Z", + "last_modified": "2024-08-15T18:38:17.599956Z", "mimetype": null, "name": "pig_rations.ipynb", "path": "pig_rations.ipynb", @@ -478,11 +478,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.079748Z", + "last_modified": "2024-08-15T18:38:17.639956Z", "mimetype": null, "name": "framingham_hearts.ipynb", "path": "framingham_hearts.ipynb", @@ -492,11 +492,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.239750Z", + "last_modified": "2024-08-15T18:38:17.803957Z", "mimetype": null, "name": "planet_densities.ipynb", "path": "planet_densities.ipynb", @@ -506,11 +506,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.023747Z", + "last_modified": "2024-08-15T18:38:17.587956Z", "mimetype": null, "name": "poll_sample_size.ipynb", "path": "poll_sample_size.ipynb", @@ -520,11 +520,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.235750Z", + "last_modified": "2024-08-15T18:38:17.799958Z", "mimetype": null, "name": "fruit_fly4.ipynb", "path": "fruit_fly4.ipynb", @@ -534,11 +534,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.147749Z", + "last_modified": "2024-08-15T18:38:17.711957Z", "mimetype": null, "name": "homerun_correlation_solution.ipynb", "path": "homerun_correlation_solution.ipynb", @@ -548,11 +548,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.075748Z", + "last_modified": "2024-08-15T18:38:17.639956Z", "mimetype": null, "name": "offenders_squared.ipynb", "path": "offenders_squared.ipynb", @@ -562,11 +562,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.027747Z", + "last_modified": "2024-08-15T18:38:17.587956Z", "mimetype": null, "name": "sampling_error_bootstrap.ipynb", "path": "sampling_error_bootstrap.ipynb", @@ -576,11 +576,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.063748Z", + "last_modified": "2024-08-15T18:38:17.627956Z", "mimetype": null, "name": "sample_size_rations.ipynb", "path": "sample_size_rations.ipynb", @@ -590,11 +590,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.091748Z", + "last_modified": "2024-08-15T18:38:17.651956Z", "mimetype": null, "name": "slugs_slumps.ipynb", "path": "slugs_slumps.ipynb", @@ -604,11 +604,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.111748Z", + "last_modified": "2024-08-15T18:38:17.675956Z", "mimetype": null, "name": "gold_silver_booleans.ipynb", "path": "gold_silver_booleans.ipynb", @@ -618,11 +618,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.247750Z", + "last_modified": "2024-08-15T18:38:17.811958Z", "mimetype": null, "name": "exchange_rates_exercise.ipynb", "path": "exchange_rates_exercise.ipynb", @@ -632,11 +632,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.047748Z", + "last_modified": "2024-08-15T18:38:17.611956Z", "mimetype": null, "name": "pig_pairs.ipynb", "path": "pig_pairs.ipynb", @@ -646,11 +646,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.171749Z", + "last_modified": "2024-08-15T18:38:17.735957Z", "mimetype": null, "name": "athlete_iq.ipynb", "path": "athlete_iq.ipynb", @@ -660,11 +660,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.131748Z", + "last_modified": "2024-08-15T18:38:17.695957Z", "mimetype": null, "name": "homerun_sop_solution.ipynb", "path": "homerun_sop_solution.ipynb", @@ -674,11 +674,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.135749Z", + "last_modified": "2024-08-15T18:38:17.699957Z", "mimetype": null, "name": "university_icebreaker.ipynb", "path": "university_icebreaker.ipynb", @@ -688,11 +688,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.047748Z", + "last_modified": "2024-08-15T18:38:17.611956Z", "mimetype": null, "name": "one_pair.ipynb", "path": "one_pair.ipynb", @@ -702,11 +702,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:42.147771Z", + "last_modified": "2024-08-15T18:38:19.783972Z", "mimetype": null, "name": "data", "path": "data", @@ -716,11 +716,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.171771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.975747Z", + "last_modified": "2024-08-15T18:38:17.539956Z", "mimetype": null, "name": "voter_participation_solution.ipynb", "path": "voter_participation_solution.ipynb", @@ -730,11 +730,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.987747Z", + "last_modified": "2024-08-15T18:38:17.551956Z", "mimetype": null, "name": "four_girls_one_boy.ipynb", "path": "four_girls_one_boy.ipynb", @@ -744,11 +744,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.223750Z", + "last_modified": "2024-08-15T18:38:17.787957Z", "mimetype": null, "name": "monty_hall.ipynb", "path": "monty_hall.ipynb", @@ -758,11 +758,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.203749Z", + "last_modified": "2024-08-15T18:38:17.767957Z", "mimetype": null, "name": "contract_poll_32.ipynb", "path": "contract_poll_32.ipynb", @@ -772,11 +772,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.151749Z", + "last_modified": "2024-08-15T18:38:17.715957Z", "mimetype": null, "name": "bayes_cars.ipynb", "path": "bayes_cars.ipynb", @@ -786,11 +786,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.227750Z", + "last_modified": "2024-08-15T18:38:17.791957Z", "mimetype": null, "name": "bush_clinton.ipynb", "path": "bush_clinton.ipynb", @@ -800,11 +800,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.143749Z", + "last_modified": "2024-08-15T18:38:17.707957Z", "mimetype": null, "name": "ambulances.ipynb", "path": "ambulances.ipynb", @@ -814,11 +814,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.959747Z", + "last_modified": "2024-08-15T18:38:17.519955Z", "mimetype": null, "name": "box_tao_mice.ipynb", "path": "box_tao_mice.ipynb", @@ -828,11 +828,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.055748Z", + "last_modified": "2024-08-15T18:38:17.615956Z", "mimetype": null, "name": "selecting_by_slicing.ipynb", "path": "selecting_by_slicing.ipynb", @@ -842,11 +842,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.207749Z", + "last_modified": "2024-08-15T18:38:17.771957Z", "mimetype": null, "name": "bullseye.ipynb", "path": "bullseye.ipynb", @@ -856,11 +856,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.163749Z", + "last_modified": "2024-08-15T18:38:17.727957Z", "mimetype": null, "name": "fruit_fly.ipynb", "path": "fruit_fly.ipynb", @@ -870,11 +870,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.115748Z", + "last_modified": "2024-08-15T18:38:17.679956Z", "mimetype": null, "name": "r_for_cholesterol.ipynb", "path": "r_for_cholesterol.ipynb", @@ -884,11 +884,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.195749Z", + "last_modified": "2024-08-15T18:38:17.759957Z", "mimetype": null, "name": "flies_sample_size.ipynb", "path": "flies_sample_size.ipynb", @@ -898,11 +898,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.139771Z", + "created": "2024-08-15T18:38:19.775972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.983747Z", + "last_modified": "2024-08-15T18:38:17.543956Z", "mimetype": null, "name": "bayes_accidents.ipynb", "path": "bayes_accidents.ipynb", @@ -912,11 +912,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.143771Z", + "created": "2024-08-15T18:38:19.779972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.135749Z", + "last_modified": "2024-08-15T18:38:17.699957Z", "mimetype": null, "name": "compliance_cholesterol.ipynb", "path": "compliance_cholesterol.ipynb", @@ -926,11 +926,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.183749Z", + "last_modified": "2024-08-15T18:38:17.747957Z", "mimetype": null, "name": "logical_operators.ipynb", "path": "logical_operators.ipynb", @@ -940,11 +940,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.207749Z", + "last_modified": "2024-08-15T18:38:17.771957Z", "mimetype": null, "name": "homerun_sop_exercise.ipynb", "path": "homerun_sop_exercise.ipynb", @@ -954,11 +954,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.247750Z", + "last_modified": "2024-08-15T18:38:17.811958Z", "mimetype": null, "name": "liquor_permutation.ipynb", "path": "liquor_permutation.ipynb", @@ -968,11 +968,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.243750Z", + "last_modified": "2024-08-15T18:38:17.807957Z", "mimetype": null, "name": "three_girls.ipynb", "path": "three_girls.ipynb", @@ -982,11 +982,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.987747Z", + "last_modified": "2024-08-15T18:38:17.547956Z", "mimetype": null, "name": "seatbelt_proportion_solution.ipynb", "path": "seatbelt_proportion_solution.ipynb", @@ -996,11 +996,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.799972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.231750Z", + "last_modified": "2024-08-15T18:38:17.795957Z", "mimetype": null, "name": "sampling_variability.ipynb", "path": "sampling_variability.ipynb", @@ -1010,11 +1010,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.071748Z", + "last_modified": "2024-08-15T18:38:17.631956Z", "mimetype": null, "name": "measured_rations.ipynb", "path": "measured_rations.ipynb", @@ -1024,11 +1024,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.975747Z", + "last_modified": "2024-08-15T18:38:17.535955Z", "mimetype": null, "name": "four_girls_then_one_boy_25.ipynb", "path": "four_girls_then_one_boy_25.ipynb", @@ -1038,11 +1038,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.147749Z", + "last_modified": "2024-08-15T18:38:17.711957Z", "mimetype": null, "name": "paired_differences_solution.ipynb", "path": "paired_differences_solution.ipynb", @@ -1052,11 +1052,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.163771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:39.967747Z", + "last_modified": "2024-08-15T18:38:17.527956Z", "mimetype": null, "name": "santas_hats.ipynb", "path": "santas_hats.ipynb", @@ -1066,11 +1066,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.227750Z", + "last_modified": "2024-08-15T18:38:17.787957Z", "mimetype": null, "name": "twenty_executives.ipynb", "path": "twenty_executives.ipynb", @@ -1080,11 +1080,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.035748Z", + "last_modified": "2024-08-15T18:38:17.595956Z", "mimetype": null, "name": "fifteen_points_in_bridge.ipynb", "path": "fifteen_points_in_bridge.ipynb", @@ -1094,11 +1094,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.251750Z", + "last_modified": "2024-08-15T18:38:17.815958Z", "mimetype": null, "name": "unemployment_percent_solution.ipynb", "path": "unemployment_percent_solution.ipynb", @@ -1108,11 +1108,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.155771Z", + "created": "2024-08-15T18:38:19.791972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.015747Z", + "last_modified": "2024-08-15T18:38:17.575956Z", "mimetype": null, "name": "mouse_bootstrap.ipynb", "path": "mouse_bootstrap.ipynb", @@ -1122,11 +1122,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.163749Z", + "last_modified": "2024-08-15T18:38:17.727957Z", "mimetype": null, "name": "optical_density_solution.ipynb", "path": "optical_density_solution.ipynb", @@ -1136,11 +1136,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.159771Z", + "created": "2024-08-15T18:38:19.795972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.119748Z", + "last_modified": "2024-08-15T18:38:17.679956Z", "mimetype": null, "name": "paired_differences.ipynb", "path": "paired_differences.ipynb", @@ -1150,11 +1150,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.151771Z", + "created": "2024-08-15T18:38:19.787972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.079748Z", + "last_modified": "2024-08-15T18:38:17.643956Z", "mimetype": null, "name": "five_spades_four_clubs.ipynb", "path": "five_spades_four_clubs.ipynb", @@ -1164,11 +1164,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.167771Z", + "created": "2024-08-15T18:38:19.803972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:40.031747Z", + "last_modified": "2024-08-15T18:38:17.591956Z", "mimetype": null, "name": "squared_rations.ipynb", "path": "squared_rations.ipynb", @@ -1177,11 +1177,11 @@ "writable": true } ], - "created": "2024-08-15T18:11:42.171771Z", + "created": "2024-08-15T18:38:19.807972Z", "format": "json", "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:42.171771Z", + "last_modified": "2024-08-15T18:38:19.807972Z", "mimetype": null, "name": "", "path": "", diff --git a/interact/api/contents/data/all.json b/interact/api/contents/data/all.json index 8e61888..f3e791e 100644 --- a/interact/api/contents/data/all.json +++ b/interact/api/contents/data/all.json @@ -2,11 +2,11 @@ "content": [ { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:09:48.274468Z", + "last_modified": "2024-08-15T18:36:18.419232Z", "mimetype": "text/csv", "name": "athletic_iq.csv", "path": "data/athletic_iq.csv", @@ -16,11 +16,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:09:12.094108Z", + "last_modified": "2024-08-15T18:35:40.023049Z", "mimetype": "text/csv", "name": "pig_rations.csv", "path": "data/pig_rations.csv", @@ -30,11 +30,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:10:18.918854Z", + "last_modified": "2024-08-15T18:36:50.827389Z", "mimetype": "text/csv", "name": "hamilton.csv", "path": "data/hamilton.csv", @@ -44,11 +44,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:09:11.150099Z", + "last_modified": "2024-08-15T18:35:39.019044Z", "mimetype": "text/csv", "name": "birthweights.csv", "path": "data/birthweights.csv", @@ -58,11 +58,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:09:47.806464Z", + "last_modified": "2024-08-15T18:36:17.899229Z", "mimetype": "text/csv", "name": "cholost.csv", "path": "data/cholost.csv", @@ -72,11 +72,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:10:19.410859Z", + "last_modified": "2024-08-15T18:36:51.339392Z", "mimetype": "text/csv", "name": "election_1844.csv", "path": "data/election_1844.csv", @@ -86,11 +86,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:09:10.818095Z", + "last_modified": "2024-08-15T18:35:38.655042Z", "mimetype": "text/csv", "name": "liquor_prices.csv", "path": "data/liquor_prices.csv", @@ -100,11 +100,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:08:14.177535Z", + "last_modified": "2024-08-15T18:34:38.370737Z", "mimetype": "text/csv", "name": "congress_2023.csv", "path": "data/congress_2023.csv", @@ -114,11 +114,11 @@ }, { "content": null, - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:10:19.718862Z", + "last_modified": "2024-08-15T18:36:51.663393Z", "mimetype": "text/csv", "name": "exchange_rates.csv", "path": "data/exchange_rates.csv", @@ -127,11 +127,11 @@ "writable": true } ], - "created": "2024-08-15T18:11:42.147771Z", + "created": "2024-08-15T18:38:19.783972Z", "format": "json", "hash": null, "hash_algorithm": null, - "last_modified": "2024-08-15T18:11:42.147771Z", + "last_modified": "2024-08-15T18:38:19.783972Z", "mimetype": null, "name": "data", "path": "data", diff --git a/interact/files/ambulances.ipynb b/interact/files/ambulances.ipynb index 2d29c12..1edef9c 100644 --- a/interact/files/ambulances.ipynb +++ b/interact/files/ambulances.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "81ff8f3f", + "id": "8e3de2f3", "metadata": {}, "source": [ "# Ambulances" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "d5bce7da", + "id": "e7417b93", "metadata": {}, "source": [ "**Note: Note 2.1: Comments in code**\n", @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4444ee0a", + "id": "1f82a70b", "metadata": {}, "outputs": [], "source": [ @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "9a135341", + "id": "bb266685", "metadata": {}, "source": [ "Because R ignores lines beginning with `#`, the text after the `#` is\n", @@ -61,7 +61,7 @@ { "cell_type": "code", "execution_count": null, - "id": "003c66de", + "id": "cd1aa5cc", "metadata": {}, "outputs": [], "source": [ @@ -81,7 +81,7 @@ }, { "cell_type": "markdown", - "id": "bcc34115", + "id": "23134b6a", "metadata": {}, "source": [ "The commands above ask the computer to store the results of the random\n", @@ -94,7 +94,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8b60f6b8", + "id": "ebdcff73", "metadata": {}, "outputs": [], "source": [ @@ -108,7 +108,7 @@ }, { "cell_type": "markdown", - "id": "0edc1171", + "id": "945d739c", "metadata": {}, "source": [ "**Note: Counting sequence elements**\n", @@ -119,7 +119,7 @@ { "cell_type": "code", "execution_count": null, - "id": "494da5fe", + "id": "c65cc0a1", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "a8d10c03", + "id": "56742a15", "metadata": {}, "source": [ "What exactly happens here under the hood? First `a == 9` creates an\n", @@ -186,7 +186,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bd9a5307", + "id": "f05749bc", "metadata": {}, "outputs": [], "source": [ @@ -201,7 +201,7 @@ }, { "cell_type": "markdown", - "id": "4b2e03c2", + "id": "c3adfa79", "metadata": {}, "source": [ "You can probably see where we are going here. We are going to put the\n", @@ -218,7 +218,7 @@ { "cell_type": "code", "execution_count": null, - "id": "595d776e", + "id": "34c061cb", "metadata": {}, "outputs": [], "source": [ @@ -230,7 +230,7 @@ }, { "cell_type": "markdown", - "id": "3582310c", + "id": "abfe41b5", "metadata": {}, "source": [ "For now, `z` contains 1000 zeros, but we will soon use a `for` loop to\n", @@ -264,7 +264,7 @@ { "cell_type": "code", "execution_count": null, - "id": "01c97c5a", + "id": "c5216e81", "metadata": {}, "outputs": [], "source": [ @@ -299,7 +299,7 @@ }, { "cell_type": "markdown", - "id": "bef2ceb1", + "id": "9114df8b", "metadata": {}, "source": [ "The `z[i] <- b` statement that follows the `sum` *counting* operation\n", @@ -329,7 +329,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c4d7f268", + "id": "fb8ec281", "metadata": {}, "outputs": [], "source": [ @@ -345,7 +345,7 @@ }, { "cell_type": "markdown", - "id": "0f06ef3e", + "id": "eea49a85", "metadata": {}, "source": [ "This is the estimate we wanted; the proportion of days where more than\n", @@ -359,7 +359,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9aa05f80", + "id": "a95ba7f4", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/athlete_iq.ipynb b/interact/files/athlete_iq.ipynb index cf4f6fa..0b54b54 100644 --- a/interact/files/athlete_iq.ipynb +++ b/interact/files/athlete_iq.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f9a4da70", + "id": "b349a0a3", "metadata": {}, "source": [ "# Association of athletic and IQ scores" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "39d66938", + "id": "afd560ec", "metadata": {}, "source": [ "We use random pairings of the athletic and IQ scores to find the\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "53b5fabb", + "id": "80d4a82d", "metadata": {}, "outputs": [], "source": [ @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "88b574c5", + "id": "4fb45480", "metadata": {}, "outputs": [], "source": [ @@ -49,7 +49,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0b6323b4", + "id": "cf29e8ff", "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e2f1925", + "id": "eda9ddf2", "metadata": {}, "outputs": [], "source": [ @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "b1838abb", + "id": "bf2828c4", "metadata": {}, "source": [ "We see that obtaining a chance trial result as great as that observed\n", @@ -109,7 +109,7 @@ { "cell_type": "code", "execution_count": null, - "id": "417babc7", + "id": "36483ecd", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/athlete_iq_cc.ipynb b/interact/files/athlete_iq_cc.ipynb index 8e0a84f..9772c39 100644 --- a/interact/files/athlete_iq_cc.ipynb +++ b/interact/files/athlete_iq_cc.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5d65923c", + "id": "d34b0348", "metadata": {}, "source": [ "# Association of athletic and IQ scores with $r$" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "780d4261", + "id": "5fc9699c", "metadata": {}, "source": [ "We use random pairings of the athletic and IQ scores to find the\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9369f836", + "id": "5c0295c4", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/athlete_iq_rank_count.ipynb b/interact/files/athlete_iq_rank_count.ipynb index 84c5e21..dfd15ee 100644 --- a/interact/files/athlete_iq_rank_count.ipynb +++ b/interact/files/athlete_iq_rank_count.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "b146ceb6", + "id": "c8fbbb8e", "metadata": {}, "source": [ "# Athletic ability and IQ using rank counts" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "7a60f481", + "id": "23aa9ea1", "metadata": {}, "source": [ "Continuing with the question: **Is there correlation between two\n", @@ -30,7 +30,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c8d69c48", + "id": "91b29d36", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/basketball_shots.ipynb b/interact/files/basketball_shots.ipynb index e7bf39f..1b22639 100644 --- a/interact/files/basketball_shots.ipynb +++ b/interact/files/basketball_shots.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "d4b61107", + "id": "47f285da", "metadata": {}, "source": [ "# Three or more basketball shots" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "7237e1af", + "id": "e12b3f57", "metadata": {}, "source": [ "We simulate the probability of scoring three or more baskets from five\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e38065fe", + "id": "da455ca7", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/battery_lifetime_exercise.ipynb b/interact/files/battery_lifetime_exercise.ipynb index 37ee1e0..7635a1a 100644 --- a/interact/files/battery_lifetime_exercise.ipynb +++ b/interact/files/battery_lifetime_exercise.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "40181304", + "id": "b5489773", "metadata": {}, "source": [ "# Battery lifetime exercise" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "7d8d6221", + "id": "e644ea5b", "metadata": {}, "source": [ "A sample of 20 batteries is tested, and the average lifetime is 28.85\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7930cbb9", + "id": "fcef962b", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/battery_lifetime_solution.ipynb b/interact/files/battery_lifetime_solution.ipynb index c6daf28..add4f85 100644 --- a/interact/files/battery_lifetime_solution.ipynb +++ b/interact/files/battery_lifetime_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "24aa34d5", + "id": "8e8c3ee0", "metadata": {}, "source": [ "# Battery lifetime solution\n" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5d12a516", + "id": "8daea705", "metadata": {}, "outputs": [], "source": [ @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b3e65e98", + "id": "f4e54346", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/bayes_accidents.ipynb b/interact/files/bayes_accidents.ipynb index 9bcbe45..0a6005b 100644 --- a/interact/files/bayes_accidents.ipynb +++ b/interact/files/bayes_accidents.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "222753f3", + "id": "f05102fc", "metadata": {}, "source": [ "# Bayesian analysis for insurance premium" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "5cc151f1", + "id": "470a9c98", "metadata": {}, "source": [ "A mutual insurance company charges its members according to the risk of\n", @@ -42,7 +42,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2d7d953e", + "id": "b0122468", "metadata": {}, "outputs": [], "source": [ @@ -90,7 +90,7 @@ }, { "cell_type": "markdown", - "id": "7d7300bd", + "id": "3b4ae4f7", "metadata": {}, "source": [ "The answer should be around 4450 USD." diff --git a/interact/files/bayes_cars.ipynb b/interact/files/bayes_cars.ipynb index ac2e1c0..aa835f3 100644 --- a/interact/files/bayes_cars.ipynb +++ b/interact/files/bayes_cars.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e76d0753", + "id": "058b289b", "metadata": {}, "source": [ "# Bayesian analysis of cars and mechanics" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "648bbe91", + "id": "106f5ccd", "metadata": {}, "source": [ "We wish to know the probability that if the mechanic *says* a car is\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d9114ce7", + "id": "536a3de6", "metadata": {}, "outputs": [], "source": [ @@ -64,7 +64,7 @@ }, { "cell_type": "markdown", - "id": "4f94e490", + "id": "c0497d41", "metadata": {}, "source": [ "The answer looks to be somewhere between 5 and 6%. The code clearly\n", @@ -79,7 +79,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f18917d", + "id": "4508df03", "metadata": {}, "outputs": [], "source": [ @@ -144,7 +144,7 @@ }, { "cell_type": "markdown", - "id": "5c6409ba", + "id": "448c6fa0", "metadata": {}, "source": [ "The code now runs much faster, and with a larger number of cars we see\n", diff --git a/interact/files/bayes_covid.ipynb b/interact/files/bayes_covid.ipynb index 55b9b3e..9c255e8 100644 --- a/interact/files/bayes_covid.ipynb +++ b/interact/files/bayes_covid.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f6f2bf8b", + "id": "af54e716", "metadata": {}, "source": [ "# Bayesian analysis of Covid test result" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "052236c3", + "id": "fc6738bd", "metadata": {}, "source": [ "You get a COVID test, and the test is negative. Now, you would like to\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ab72c60c", + "id": "a282fb33", "metadata": {}, "outputs": [], "source": [ @@ -80,7 +80,7 @@ }, { "cell_type": "markdown", - "id": "01d0d004", + "id": "039f41db", "metadata": {}, "source": [ "This gives around 0.006 or 0.6%." diff --git a/interact/files/bill_in_rstudio.ipynb b/interact/files/bill_in_rstudio.ipynb index 4ea9283..3723f3f 100644 --- a/interact/files/bill_in_rstudio.ipynb +++ b/interact/files/bill_in_rstudio.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "1da86e07", + "id": "1c8a69c1", "metadata": {}, "source": [ "# The Bill but in RStudio" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "f12777c6", + "id": "49f93ad0", "metadata": {}, "source": [ "Notice that the Download link gave you a file ending in `.Rmd`, where\n", @@ -59,7 +59,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3da7fc90", + "id": "92e38e7b", "metadata": {}, "outputs": [], "source": [ @@ -72,7 +72,7 @@ }, { "cell_type": "markdown", - "id": "6368ed9d", + "id": "f329f044", "metadata": {}, "source": [ "Now we return to the interface. Click inside the code chunk above.\n", diff --git a/interact/files/billies_bill.ipynb b/interact/files/billies_bill.ipynb index a0fd59c..ec795d6 100644 --- a/interact/files/billies_bill.ipynb +++ b/interact/files/billies_bill.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "6a90d8a8", + "id": "3c68f3cb", "metadata": {}, "source": [ "# Billie's Bill" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "c2a53f85", + "id": "40169f66", "metadata": {}, "source": [ "The text in this notebook section assumes you have opened the page as an\n", @@ -93,7 +93,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f2ac0c26", + "id": "5d809f0f", "metadata": {}, "outputs": [], "source": [ @@ -102,7 +102,7 @@ }, { "cell_type": "markdown", - "id": "8c331cbb", + "id": "92b5dacd", "metadata": {}, "source": [ "The contents of the chunk above is R code. As you would predict, R\n", @@ -136,7 +136,7 @@ { "cell_type": "code", "execution_count": null, - "id": "92905cec", + "id": "3434ab6c", "metadata": {}, "outputs": [], "source": [ @@ -145,7 +145,7 @@ }, { "cell_type": "markdown", - "id": "f76cee62", + "id": "4975d014", "metadata": {}, "source": [ "Many of the code cells you see will have comments in them, to explain\n", @@ -177,7 +177,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cfd8598b", + "id": "25792c8f", "metadata": {}, "outputs": [], "source": [ @@ -187,7 +187,7 @@ }, { "cell_type": "markdown", - "id": "d6b5b4da", + "id": "d0ceb8c6", "metadata": {}, "source": [ "Oh dear, no, that isn’t doing the right calculation.\n", @@ -223,7 +223,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06eb9587", + "id": "4e5a3b6f", "metadata": {}, "outputs": [], "source": [ @@ -233,7 +233,7 @@ }, { "cell_type": "markdown", - "id": "15b9490b", + "id": "38eccbff", "metadata": {}, "source": [ "The obvious next step is to calculate the bill *including the tip*." @@ -242,7 +242,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8ff77554", + "id": "ecf3ebac", "metadata": {}, "outputs": [], "source": [ @@ -252,7 +252,7 @@ }, { "cell_type": "markdown", - "id": "0db093f9", + "id": "ee490523", "metadata": {}, "source": [ "At this stage we start to feel that we are doing too much typing. Notice\n", @@ -274,7 +274,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9b8b755d", + "id": "835c18a9", "metadata": {}, "outputs": [], "source": [ @@ -284,7 +284,7 @@ }, { "cell_type": "markdown", - "id": "9ee07013", + "id": "021122ac", "metadata": {}, "source": [ "`a` is a *name* we give to the value 10.50. You can read the line above\n", @@ -299,7 +299,7 @@ { "cell_type": "code", "execution_count": null, - "id": "688a1cd5", + "id": "a164d19f", "metadata": {}, "outputs": [], "source": [ @@ -309,7 +309,7 @@ }, { "cell_type": "markdown", - "id": "7e74b4f5", + "id": "96f24f4d", "metadata": {}, "source": [ "We did not have to use the name `a` — we can choose almost any name we\n", @@ -319,7 +319,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e78938e7", + "id": "90d8ee35", "metadata": {}, "outputs": [], "source": [ @@ -330,7 +330,7 @@ }, { "cell_type": "markdown", - "id": "0e7e8b71", + "id": "94c50268", "metadata": {}, "source": [ "We often set variables like this, and then display the result, all in\n", @@ -344,7 +344,7 @@ { "cell_type": "code", "execution_count": null, - "id": "db020e7f", + "id": "c411c061", "metadata": {}, "outputs": [], "source": [ @@ -357,7 +357,7 @@ }, { "cell_type": "markdown", - "id": "24eae42a", + "id": "df4aba2b", "metadata": {}, "source": [ "Of course, here, we did not learn much, but we often set variable values\n", @@ -367,7 +367,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e281cedc", + "id": "5e300110", "metadata": {}, "outputs": [], "source": [ @@ -379,7 +379,7 @@ }, { "cell_type": "markdown", - "id": "885587a7", + "id": "9fffbea3", "metadata": {}, "source": [ "But wait — we can do better than typing in the calculation like this. We\n", @@ -390,7 +390,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dca4a31b", + "id": "cf5217d3", "metadata": {}, "outputs": [], "source": [ @@ -402,7 +402,7 @@ }, { "cell_type": "markdown", - "id": "5c6126c7", + "id": "a76a5e1f", "metadata": {}, "source": [ "We make the calculation clearer by writing the calculation this way — we\n", @@ -416,7 +416,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cde265bf", + "id": "e333684a", "metadata": {}, "outputs": [], "source": [ @@ -429,7 +429,7 @@ }, { "cell_type": "markdown", - "id": "9cabfe39", + "id": "281516bf", "metadata": {}, "source": [ "Notice that `alex_meal` now has a new value. It was 10.50, but now it is\n", @@ -441,7 +441,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9626f0d4", + "id": "81b24683", "metadata": {}, "outputs": [], "source": [ @@ -453,7 +453,7 @@ }, { "cell_type": "markdown", - "id": "5716aa60", + "id": "2bdf2c09", "metadata": {}, "source": [ "Notice that, now we have rerun this calculation, we have *reset* the\n", @@ -467,7 +467,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f10aa0bb", + "id": "f1520449", "metadata": {}, "outputs": [], "source": [ @@ -479,7 +479,7 @@ }, { "cell_type": "markdown", - "id": "ab01b5ea", + "id": "8c6b7177", "metadata": {}, "source": [ "Now we are using variables with relevant names, the calculation looks\n", diff --git a/interact/files/birthday_problem.ipynb b/interact/files/birthday_problem.ipynb index e804e66..b03a019 100644 --- a/interact/files/birthday_problem.ipynb +++ b/interact/files/birthday_problem.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ae86b8e9", + "id": "bfa51558", "metadata": {}, "source": [ "# The Birthday Problem" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "cde6c701", + "id": "4be7712f", "metadata": {}, "source": [ "Here we answer the question: “What is the probability that two or more\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a19f995", + "id": "0de26821", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/birthweight_bootstap.ipynb b/interact/files/birthweight_bootstap.ipynb index b9a3683..43b4aec 100644 --- a/interact/files/birthweight_bootstap.ipynb +++ b/interact/files/birthweight_bootstap.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "b3d25aaa", + "id": "2e15c3e3", "metadata": {}, "source": [ "# Bootstrap test of birthweight difference" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "c57cf093", + "id": "dd5370c6", "metadata": {}, "source": [ "We run bootstrap resampling from pooled drug and control birthweights,\n", @@ -25,7 +25,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d475bc0b", + "id": "29c4f98d", "metadata": {}, "outputs": [], "source": [ @@ -50,7 +50,7 @@ }, { "cell_type": "markdown", - "id": "0d8aaae4", + "id": "b5a276c2", "metadata": {}, "source": [ "Proceed with the simulation:" @@ -59,7 +59,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dc23bb4c", + "id": "84bffefc", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/box_tao_mice.ipynb b/interact/files/box_tao_mice.ipynb index 4d33236..3ec3c5f 100644 --- a/interact/files/box_tao_mice.ipynb +++ b/interact/files/box_tao_mice.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "93413c3d", + "id": "7921be1a", "metadata": {}, "source": [ "# A problem of black and brown mice" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "97cfade2", + "id": "efb5c6c8", "metadata": {}, "source": [ "Solve the Box and Tao problem of parental probabilities for black and\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f371f44c", + "id": "c3134dd2", "metadata": {}, "outputs": [], "source": [ @@ -80,7 +80,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ba48cd17", + "id": "692912f5", "metadata": {}, "outputs": [], "source": [ @@ -90,7 +90,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7d1a1c9c", + "id": "8c1f29a0", "metadata": {}, "outputs": [], "source": [ @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "6577e0dc", + "id": "daf1c773", "metadata": {}, "source": [ "We see that all the offspring being black considerably changes the\n", @@ -120,7 +120,7 @@ { "cell_type": "code", "execution_count": null, - "id": "97bd08e2", + "id": "76e2cd3e", "metadata": {}, "outputs": [], "source": [ @@ -131,7 +131,7 @@ }, { "cell_type": "markdown", - "id": "317807e6", + "id": "d3c52c46", "metadata": {}, "source": [ "However, we can also generate *matrices* in R. Matrices have two\n", @@ -143,7 +143,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f4dcb305", + "id": "60db2135", "metadata": {}, "outputs": [], "source": [ @@ -156,7 +156,7 @@ }, { "cell_type": "markdown", - "id": "9aecc261", + "id": "8df22353", "metadata": {}, "source": [ "As usual, we can apply Boolean comparison operations to this matrix, to\n", @@ -166,7 +166,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f96e3995", + "id": "b26c9261", "metadata": {}, "outputs": [], "source": [ @@ -176,7 +176,7 @@ }, { "cell_type": "markdown", - "id": "85aeb717", + "id": "64d48ee4", "metadata": {}, "source": [ "R has functions to operate over rows and columns of a matrix. In\n", @@ -189,7 +189,7 @@ { "cell_type": "code", "execution_count": null, - "id": "33865302", + "id": "f4bafd75", "metadata": {}, "outputs": [], "source": [ @@ -199,7 +199,7 @@ }, { "cell_type": "markdown", - "id": "ae4933ea", + "id": "affb9e46", "metadata": {}, "source": [ "Notice that we get one answer for each row, where the answer is the\n", @@ -209,7 +209,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6ad7dfe1", + "id": "3b2c3fbc", "metadata": {}, "outputs": [], "source": [ @@ -267,7 +267,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1f908ba9", + "id": "9979898c", "metadata": {}, "outputs": [], "source": [ @@ -277,7 +277,7 @@ { "cell_type": "code", "execution_count": null, - "id": "794fb89b", + "id": "a36a3d7e", "metadata": {}, "outputs": [], "source": [ @@ -286,7 +286,7 @@ }, { "cell_type": "markdown", - "id": "1c23ea0d", + "id": "d58290d1", "metadata": {}, "source": [ "This yields a similar result, but in much shorter time — which means we\n", diff --git a/interact/files/building_strings.ipynb b/interact/files/building_strings.ipynb index 2c8dc3c..1236f3b 100644 --- a/interact/files/building_strings.ipynb +++ b/interact/files/building_strings.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "7038c399", + "id": "4694fd76", "metadata": {}, "source": [ "# Building strings for labels" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "8bc0653d", + "id": "975d86ff", "metadata": {}, "source": [ "As the examples in this book proceed, we will use more code techniques\n", @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3283006c", + "id": "95bc4e92", "metadata": {}, "outputs": [], "source": [ @@ -36,7 +36,7 @@ }, { "cell_type": "markdown", - "id": "794f833e", + "id": "53b92f99", "metadata": {}, "source": [ "Building the useful string above would involve taking the string\n", @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0b74a0d4", + "id": "c8406849", "metadata": {}, "outputs": [], "source": [ @@ -58,7 +58,7 @@ }, { "cell_type": "markdown", - "id": "8e59b721", + "id": "815466ab", "metadata": {}, "source": [ "Finally we need to append another string to the result — `' trials.'`.\n", @@ -78,7 +78,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cc16009e", + "id": "d9ea689c", "metadata": {}, "outputs": [], "source": [ @@ -87,7 +87,7 @@ }, { "cell_type": "markdown", - "id": "15670801", + "id": "827c42a8", "metadata": {}, "source": [ "If we wanted to insert a number as a string into this sequence, we can\n", @@ -98,7 +98,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43c29e2f", + "id": "7b6d86c5", "metadata": {}, "outputs": [], "source": [ @@ -107,7 +107,7 @@ }, { "cell_type": "markdown", - "id": "000a66bf", + "id": "59bc8a8f", "metadata": {}, "source": [ "To create the string we started this section with, we could write:" @@ -116,7 +116,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0fc80a4c", + "id": "705b07e6", "metadata": {}, "outputs": [], "source": [ @@ -125,7 +125,7 @@ }, { "cell_type": "markdown", - "id": "feca717b", + "id": "d836d5ba", "metadata": {}, "source": [ "We will start using `paste` from here, to compile messages to print, or\n", diff --git a/interact/files/bullseye.ipynb b/interact/files/bullseye.ipynb index 485fc36..756cf75 100644 --- a/interact/files/bullseye.ipynb +++ b/interact/files/bullseye.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8714cf4b", + "id": "9c75ae1d", "metadata": {}, "source": [ "# Bullseye" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "ecb93085", + "id": "d4b8f2eb", "metadata": {}, "source": [ "This notebook solves the “bullseye” problem: assume from past experience\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d5fd57ef", + "id": "d14d0d54", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/bush_clinton.ipynb b/interact/files/bush_clinton.ipynb index afa1936..2b9791a 100644 --- a/interact/files/bush_clinton.ipynb +++ b/interact/files/bush_clinton.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5c03d7c4", + "id": "c9b6c9d2", "metadata": {}, "source": [ "# Simulation of Bush / Clinton polling" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "1df33acd", + "id": "74775175", "metadata": {}, "source": [ "The notebook estimates the chances that Bush is in fact equal or behind\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8f98a9f4", + "id": "4ab77a45", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/compliance_cholesterol.ipynb b/interact/files/compliance_cholesterol.ipynb index fb16b71..6ac1ffb 100644 --- a/interact/files/compliance_cholesterol.ipynb +++ b/interact/files/compliance_cholesterol.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8fb9b8c4", + "id": "ac8fb0d2", "metadata": {}, "source": [ "# Testing association of compliance and cholesterol values" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "5ad47767", + "id": "d1c21301", "metadata": {}, "source": [ "We have 164 rows, each representing a person taking a medication. For\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "36b0d34f", + "id": "3dce8c06", "metadata": {}, "outputs": [], "source": [ @@ -50,7 +50,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ecb66f7", + "id": "29be9196", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/contract_poll.ipynb b/interact/files/contract_poll.ipynb index a8c5c43..1c845a3 100644 --- a/interact/files/contract_poll.ipynb +++ b/interact/files/contract_poll.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f20f021f", + "id": "fa30fff1", "metadata": {}, "source": [ "# Contract poll simulation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "63c3a7c4", + "id": "bf12da31", "metadata": {}, "source": [ "This R notebook generates samples of 50 simulated voters on the\n", @@ -27,7 +27,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5772b1e1", + "id": "92d41a02", "metadata": {}, "outputs": [], "source": [ @@ -50,7 +50,7 @@ }, { "cell_type": "markdown", - "id": "4b700cba", + "id": "8776878a", "metadata": {}, "source": [ "In the histogram above, we see that about 11 percent of our trials had\n", @@ -62,7 +62,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2a01d314", + "id": "c718e71a", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/contract_poll_32.ipynb b/interact/files/contract_poll_32.ipynb index 0a9ee51..9543294 100644 --- a/interact/files/contract_poll_32.ipynb +++ b/interact/files/contract_poll_32.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "57f9110c", + "id": "e70c0a3c", "metadata": {}, "source": [ "# Contract poll looking for >=32" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "db43f27c", + "id": "164e696c", "metadata": {}, "source": [ "This R notebook generates samples of 50 simulated voters on the\n", @@ -22,7 +22,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cdb87a6f", + "id": "fc841baa", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/exchange_rates_exercise.ipynb b/interact/files/exchange_rates_exercise.ipynb index 302fb34..58dace1 100644 --- a/interact/files/exchange_rates_exercise.ipynb +++ b/interact/files/exchange_rates_exercise.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "06111549", + "id": "8b54de18", "metadata": {}, "source": [ "# Exchange rates and money supply" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "980ff629", + "id": "9f36c691", "metadata": {}, "source": [ "Notebook for exercise on exchange rates and money supply." @@ -19,7 +19,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dceb07f3", + "id": "ec961226", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/exchange_rates_solution.ipynb b/interact/files/exchange_rates_solution.ipynb index 809172a..9a6b303 100644 --- a/interact/files/exchange_rates_solution.ipynb +++ b/interact/files/exchange_rates_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "3dbf1b57", + "id": "326bdfc4", "metadata": {}, "source": [ "# Exchange rates and money supply" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "7d9848d0", + "id": "711d17de", "metadata": {}, "source": [ "Solution notebook for exercise on exchange rates and money supply." @@ -19,7 +19,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0b6bf622", + "id": "efb032b6", "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1dc7a999", + "id": "5c7ad43f", "metadata": {}, "outputs": [], "source": [ @@ -45,7 +45,7 @@ { "cell_type": "code", "execution_count": null, - "id": "708e3e83", + "id": "937433f0", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/female_calves.ipynb b/interact/files/female_calves.ipynb index a3afd09..2cc838c 100644 --- a/interact/files/female_calves.ipynb +++ b/interact/files/female_calves.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "6f9c0476", + "id": "d540c923", "metadata": {}, "source": [ "# Female calf numbers simulation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "808b1614", + "id": "599bd116", "metadata": {}, "source": [ "This notebook uses simulation to test the null hypothesis that the\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c2065132", + "id": "49d12844", "metadata": {}, "outputs": [], "source": [ @@ -67,7 +67,7 @@ }, { "cell_type": "markdown", - "id": "8bb4d3a0", + "id": "eb1bcdd5", "metadata": {}, "source": [ "We read from the result in variable `kk` that the probability of 9 or 10\n", diff --git a/interact/files/fifteen_points_in_bridge.ipynb b/interact/files/fifteen_points_in_bridge.ipynb index dd4e772..b347bba 100644 --- a/interact/files/fifteen_points_in_bridge.ipynb +++ b/interact/files/fifteen_points_in_bridge.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "e594435b", + "id": "39f3c323", "metadata": {}, "source": [ "# Fifteen points in a bridge hand" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "ddf47dbb", + "id": "4f5df005", "metadata": {}, "source": [ "Let us assume that ace counts as 4, king = 3, queen = 2, and jack = 1." @@ -19,7 +19,7 @@ { "cell_type": "code", "execution_count": null, - "id": "436f24dc", + "id": "835e5056", "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "14927f0b", + "id": "537eabd3", "metadata": {}, "outputs": [], "source": [ @@ -58,7 +58,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6dacecdf", + "id": "41605d9e", "metadata": {}, "outputs": [], "source": [ @@ -68,7 +68,7 @@ }, { "cell_type": "markdown", - "id": "0fa1a1c5", + "id": "98930633", "metadata": {}, "source": [ "From this histogram, we see that in about 4 percent of our trials we\n", @@ -79,7 +79,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8686fee7", + "id": "f2ea8e3f", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/fine_win.ipynb b/interact/files/fine_win.ipynb index e664ec7..0beb45c 100644 --- a/interact/files/fine_win.ipynb +++ b/interact/files/fine_win.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8965622b", + "id": "9224a14e", "metadata": {}, "source": [ "# Fine day and win" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "c06d0185", + "id": "6109e42b", "metadata": {}, "source": [ "This notebook calculates the chances that the Commanders win on a fine\n", @@ -23,7 +23,7 @@ { "cell_type": "code", "execution_count": null, - "id": "976af848", + "id": "4debb0f7", "metadata": {}, "outputs": [], "source": [ @@ -34,7 +34,7 @@ }, { "cell_type": "markdown", - "id": "192548d9", + "id": "49c5b71a", "metadata": {}, "source": [ "Now let us draw a ball at random from bucket_A:" @@ -43,7 +43,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4d077f16", + "id": "872b12e3", "metadata": {}, "outputs": [], "source": [ @@ -53,7 +53,7 @@ }, { "cell_type": "markdown", - "id": "211dd292", + "id": "d1068c4b", "metadata": {}, "source": [ "How we run our first `if` statement. Running this code will display “The\n", @@ -64,7 +64,7 @@ { "cell_type": "code", "execution_count": null, - "id": "723b4d08", + "id": "0120b9c2", "metadata": {}, "outputs": [], "source": [ @@ -75,7 +75,7 @@ }, { "cell_type": "markdown", - "id": "50d241bd", + "id": "2c43c1ea", "metadata": {}, "source": [ "Notice that the header line has `if`, followed by an open parenthesis\n", @@ -94,7 +94,7 @@ { "cell_type": "code", "execution_count": null, - "id": "405a204a", + "id": "4e4f1080", "metadata": {}, "outputs": [], "source": [ @@ -105,7 +105,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8c7a6e10", + "id": "4a09eea1", "metadata": {}, "outputs": [], "source": [ @@ -118,7 +118,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1458b6ba", + "id": "06b8f1be", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +128,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f61691df", + "id": "69de4ea2", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "089635c4", + "id": "e5033c74", "metadata": {}, "source": [ "We can add an `else` clause to the `if` statement. Remember the *body*\n", @@ -152,7 +152,7 @@ { "cell_type": "code", "execution_count": null, - "id": "20dc7f79", + "id": "def3e472", "metadata": {}, "outputs": [], "source": [ @@ -162,7 +162,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0103476b", + "id": "686b506a", "metadata": {}, "outputs": [], "source": [ @@ -177,7 +177,7 @@ }, { "cell_type": "markdown", - "id": "5118b156", + "id": "bb9c4417", "metadata": {}, "source": [ "Notice that the `else` clause of the `if` statement starts with the end\n", @@ -190,7 +190,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff196464", + "id": "a49e88ba", "metadata": {}, "outputs": [], "source": [ @@ -200,7 +200,7 @@ { "cell_type": "code", "execution_count": null, - "id": "04aa2840", + "id": "029db3b1", "metadata": {}, "outputs": [], "source": [ @@ -215,7 +215,7 @@ }, { "cell_type": "markdown", - "id": "6428b978", + "id": "6fda2796", "metadata": {}, "source": [ "With this machinery, we can now implement the full logic of step 4\n", @@ -236,7 +236,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2f1b13e1", + "id": "f7b3a635", "metadata": {}, "outputs": [], "source": [ @@ -245,7 +245,7 @@ }, { "cell_type": "markdown", - "id": "33fcaf35", + "id": "121408e6", "metadata": {}, "source": [ "The full logic for step 4 is:\n", @@ -256,7 +256,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e9ba7a9", + "id": "0196d02c", "metadata": {}, "outputs": [], "source": [ @@ -284,7 +284,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90c76c37", + "id": "271e4480", "metadata": {}, "outputs": [], "source": [ @@ -320,7 +320,7 @@ }, { "cell_type": "markdown", - "id": "99075c37", + "id": "3a5c49cc", "metadata": {}, "source": [ "The above procedure gives us the probability that it will be a nice day\n", diff --git a/interact/files/five_spades_four_clubs.ipynb b/interact/files/five_spades_four_clubs.ipynb index d3c17d6..8aceed5 100644 --- a/interact/files/five_spades_four_clubs.ipynb +++ b/interact/files/five_spades_four_clubs.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0b559ec8", + "id": "c7acc5b2", "metadata": {}, "source": [ "# Five spades and four clubs" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "c575bb16", + "id": "166ee4be", "metadata": {}, "source": [ "**This is an example of multiple-outcome sampling without replacement,\n", @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6d1d14c6", + "id": "aca67a0c", "metadata": {}, "outputs": [], "source": [ @@ -40,7 +40,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0bdd5185", + "id": "7d2d594f", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/five_spades_four_girls.ipynb b/interact/files/five_spades_four_girls.ipynb index cc4859e..d128793 100644 --- a/interact/files/five_spades_four_girls.ipynb +++ b/interact/files/five_spades_four_girls.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "1c029e96", + "id": "79fcaba2", "metadata": {}, "source": [ "# Five spades, four girls" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "5cedced0", + "id": "32b2b421", "metadata": {}, "source": [ "This is a compound problem: what are the chances of *both* five or more\n", @@ -59,7 +59,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9d86a182", + "id": "d7cbcacf", "metadata": {}, "outputs": [], "source": [ @@ -92,7 +92,7 @@ }, { "cell_type": "markdown", - "id": "f4b6b6fd", + "id": "96fcee71", "metadata": {}, "source": [ "Here is an alternative approach to the same problem, but getting the\n", @@ -104,7 +104,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5689365f", + "id": "778f1aa2", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/flies_sample_size.ipynb b/interact/files/flies_sample_size.ipynb index 8d430ef..aff95d1 100644 --- a/interact/files/flies_sample_size.ipynb +++ b/interact/files/flies_sample_size.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "060d2790", + "id": "7e3a9fd0", "metadata": {}, "source": [ "# Sample size for detecting fruitfly sex difference" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "2d61ba16", + "id": "0d3de159", "metadata": {}, "source": [ "We are interested in a procedure to change the sex ratio of fruit flies\n", @@ -25,7 +25,7 @@ { "cell_type": "code", "execution_count": null, - "id": "482bed5a", + "id": "7c40b80e", "metadata": {}, "outputs": [], "source": [ @@ -54,7 +54,7 @@ }, { "cell_type": "markdown", - "id": "bb33ba98", + "id": "fae6fbf4", "metadata": {}, "source": [ "If the result `kk` is close to 1, we then know that samples of size 80\n", diff --git a/interact/files/four_girls_one_boy.ipynb b/interact/files/four_girls_one_boy.ipynb index 37a62e6..d0eacbd 100644 --- a/interact/files/four_girls_one_boy.ipynb +++ b/interact/files/four_girls_one_boy.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "91aa4ed5", + "id": "3b5860cc", "metadata": {}, "source": [ "# Four girls and one boy" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "be833299", + "id": "c3d52a8b", "metadata": {}, "source": [ "What is the probability of selecting four girls and one boy when\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eb95bc98", + "id": "132ade98", "metadata": {}, "outputs": [], "source": [ @@ -62,7 +62,7 @@ }, { "cell_type": "markdown", - "id": "82d0bc8d", + "id": "1b48f7c3", "metadata": {}, "source": [ "We can also find the probabilities of other outcomes from a histogram of\n", @@ -72,7 +72,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5fa01363", + "id": "e81f4a71", "metadata": {}, "outputs": [], "source": [ @@ -82,7 +82,7 @@ }, { "cell_type": "markdown", - "id": "17199a13", + "id": "f465b90b", "metadata": {}, "source": [ "In the resulting histogram we can see that in 15 percent of the trials,\n", diff --git a/interact/files/four_girls_then_one_boy_25.ipynb b/interact/files/four_girls_then_one_boy_25.ipynb index 9bca2e3..265ec77 100644 --- a/interact/files/four_girls_then_one_boy_25.ipynb +++ b/interact/files/four_girls_then_one_boy_25.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8c101dd7", + "id": "2763dc1c", "metadata": {}, "source": [ "# Four girls then one boy from 25/25" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "2b9d6731", + "id": "b520125f", "metadata": {}, "source": [ "**In this problem, order matters; we are sampling without replacement,\n", @@ -46,7 +46,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a89addc7", + "id": "6ee2b9c9", "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "202009e9", + "id": "475e6993", "metadata": {}, "source": [ "Our next step (step 3) is to check whether `c` is exactly equal to the\n", @@ -73,7 +73,7 @@ { "cell_type": "code", "execution_count": null, - "id": "73835a95", + "id": "f8ab1b45", "metadata": {}, "outputs": [], "source": [ @@ -84,7 +84,7 @@ }, { "cell_type": "markdown", - "id": "823851c4", + "id": "a4a70135", "metadata": {}, "source": [ "We can then use a vector *comparison* with `==` to do an element by\n", @@ -95,7 +95,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a0ca6249", + "id": "c7a45152", "metadata": {}, "outputs": [], "source": [ @@ -107,7 +107,7 @@ }, { "cell_type": "markdown", - "id": "030a1f16", + "id": "34aa45b6", "metadata": {}, "source": [ "We are nearly finished with step 3 — it only remains to check whether\n", @@ -121,7 +121,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cb1832f3", + "id": "3ca44710", "metadata": {}, "outputs": [], "source": [ @@ -131,7 +131,7 @@ }, { "cell_type": "markdown", - "id": "75caf603", + "id": "9ed402a1", "metadata": {}, "source": [ "Another way to ask the same question is by using the `all` function on\n", @@ -151,7 +151,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1fe5c90b", + "id": "04c78da0", "metadata": {}, "outputs": [], "source": [ @@ -162,7 +162,7 @@ { "cell_type": "code", "execution_count": null, - "id": "25560144", + "id": "10708985", "metadata": {}, "outputs": [], "source": [ @@ -172,7 +172,7 @@ }, { "cell_type": "markdown", - "id": "f8bf30bc", + "id": "8f438939", "metadata": {}, "source": [ "**End of note**\n", @@ -183,7 +183,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fb3b69db", + "id": "75988ac7", "metadata": {}, "outputs": [], "source": [ @@ -199,7 +199,7 @@ }, { "cell_type": "markdown", - "id": "0d0dade1", + "id": "263316c5", "metadata": {}, "source": [ "All that remains is to put the single trial procedure into a loop." @@ -208,7 +208,7 @@ { "cell_type": "code", "execution_count": null, - "id": "27fdf601", + "id": "038f4764", "metadata": {}, "outputs": [], "source": [ @@ -246,7 +246,7 @@ }, { "cell_type": "markdown", - "id": "4151d65c", + "id": "9780185b", "metadata": {}, "source": [ "This type of problem is conventionally done with a *permutation*\n", diff --git a/interact/files/framingham_hearts.ipynb b/interact/files/framingham_hearts.ipynb index 280f843..54047b7 100644 --- a/interact/files/framingham_hearts.ipynb +++ b/interact/files/framingham_hearts.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "9fda082f", + "id": "90ec9f8e", "metadata": {}, "source": [ "# Framingham heart data" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "4fdc7413", + "id": "176ba983", "metadata": {}, "source": [ "We use simulation to investigate the relationship between serum\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b84e6b95", + "id": "4d83fe71", "metadata": {}, "outputs": [], "source": [ @@ -59,7 +59,7 @@ }, { "cell_type": "markdown", - "id": "e836d86b", + "id": "dadb0714", "metadata": {}, "source": [ "The results of the test using this program may be seen in the histogram.\n", diff --git a/interact/files/fruit_fly.ipynb b/interact/files/fruit_fly.ipynb index 06406bb..d7f7982 100644 --- a/interact/files/fruit_fly.ipynb +++ b/interact/files/fruit_fly.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a7b1a28f", + "id": "d39c05dc", "metadata": {}, "source": [ "# Fruit fly simulation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "2cac6a7a", + "id": "da061cf8", "metadata": {}, "source": [ "This notebook uses simulation to test the null hypothesis that it is\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec4e97dd", + "id": "bb2eb647", "metadata": {}, "outputs": [], "source": [ @@ -58,7 +58,7 @@ }, { "cell_type": "markdown", - "id": "ea0bd805", + "id": "fb5c538e", "metadata": {}, "source": [ "In the histogram above, we see that in about 12 percent of the trials,\n", @@ -70,7 +70,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4dcc64e0", + "id": "6e65716a", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/fruit_fly4.ipynb b/interact/files/fruit_fly4.ipynb index 8d04a3a..3941a96 100644 --- a/interact/files/fruit_fly4.ipynb +++ b/interact/files/fruit_fly4.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "50bc7e5d", + "id": "1f70ed7f", "metadata": {}, "source": [ "# Fruit fly simulation of four groups" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "88de86ef", + "id": "6762d641", "metadata": {}, "source": [ "This notebook uses simulation to test whether a result of 14 or more\n", @@ -38,7 +38,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5be44c12", + "id": "4b5c63e5", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/gold_silver_booleans.ipynb b/interact/files/gold_silver_booleans.ipynb index 8f3e199..3da93e6 100644 --- a/interact/files/gold_silver_booleans.ipynb +++ b/interact/files/gold_silver_booleans.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5d04c8ac", + "id": "f26af8b5", "metadata": {}, "source": [ "# Another approach to ships with gold and silver" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "c4ddad4c", + "id": "5ba3e0af", "metadata": {}, "source": [ "This notebook is a variation on the problem with gold and silver chests\n", @@ -25,7 +25,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff22a7c4", + "id": "0cdef9cf", "metadata": {}, "outputs": [], "source": [ @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc54d03b", + "id": "5c636cd8", "metadata": {}, "outputs": [], "source": [ @@ -87,7 +87,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6adc1fa", + "id": "13273bee", "metadata": {}, "outputs": [], "source": [ @@ -97,7 +97,7 @@ { "cell_type": "code", "execution_count": null, - "id": "312f73a2", + "id": "f841eb8c", "metadata": {}, "outputs": [], "source": [ @@ -108,7 +108,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3625b768", + "id": "17ea64f4", "metadata": {}, "outputs": [], "source": [ @@ -117,7 +117,7 @@ }, { "cell_type": "markdown", - "id": "85e35c6d", + "id": "8c23b0f9", "metadata": {}, "source": [ "In this variant, we recorded the type of first chest for each trial\n", @@ -147,7 +147,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c13722e4", + "id": "50f2969b", "metadata": {}, "outputs": [], "source": [ @@ -158,7 +158,7 @@ { "cell_type": "code", "execution_count": null, - "id": "02dc10ac", + "id": "efda5f35", "metadata": {}, "outputs": [], "source": [ @@ -168,7 +168,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e0242ef9", + "id": "fec886b0", "metadata": {}, "outputs": [], "source": [ @@ -179,7 +179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e4caea87", + "id": "827d5eb1", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "fab19e46", + "id": "f699341a", "metadata": {}, "source": [ "Now let us use `&` to combine Boolean vectors:" @@ -197,7 +197,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64712f08", + "id": "1b3f220f", "metadata": {}, "outputs": [], "source": [ @@ -207,7 +207,7 @@ }, { "cell_type": "markdown", - "id": "d317cc78", + "id": "4961cbdd", "metadata": {}, "source": [ "Notice that R does the comparison *elementwise* — element by element.\n", @@ -227,7 +227,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3be3f461", + "id": "ac594e25", "metadata": {}, "outputs": [], "source": [ @@ -237,7 +237,7 @@ }, { "cell_type": "markdown", - "id": "2bbe6920", + "id": "8f5f7682", "metadata": {}, "source": [ "The second question is:" @@ -246,7 +246,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b2837851", + "id": "26e8a5e4", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "bf76bfd1", + "id": "629fc6fc", "metadata": {}, "source": [ "and so on. We have ten elements on *each side*, and 10 answers, giving a\n", @@ -270,7 +270,7 @@ }, { "cell_type": "markdown", - "id": "0e401f26", + "id": "c398348f", "metadata": {}, "source": [ "Remember, we wanted the answer to the question: how many trials had\n", @@ -281,7 +281,7 @@ { "cell_type": "code", "execution_count": null, - "id": "88634f25", + "id": "91ef7e9c", "metadata": {}, "outputs": [], "source": [ @@ -291,7 +291,7 @@ }, { "cell_type": "markdown", - "id": "1a014485", + "id": "7ae9a819", "metadata": {}, "source": [ "We can answer the same question for *all* the trials, in the same way:" @@ -300,7 +300,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b8ef83a", + "id": "7e51acde", "metadata": {}, "outputs": [], "source": [ @@ -312,7 +312,7 @@ }, { "cell_type": "markdown", - "id": "c44b1fc7", + "id": "1c3e3791", "metadata": {}, "source": [ "We could also do the same calculation all in one line:" @@ -321,7 +321,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e93fea1b", + "id": "2b6595a4", "metadata": {}, "outputs": [], "source": [ @@ -331,7 +331,7 @@ }, { "cell_type": "markdown", - "id": "78921c1f", + "id": "fb02b1c3", "metadata": {}, "source": [ "We can then count all the ships where the first chest was gold:" @@ -340,7 +340,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9fc06fff", + "id": "b129be10", "metadata": {}, "outputs": [], "source": [ @@ -350,7 +350,7 @@ }, { "cell_type": "markdown", - "id": "b64b1fbe", + "id": "119d89a4", "metadata": {}, "source": [ "The final calculation is the proportion of second chests that are gold,\n", @@ -360,7 +360,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4ffa84ca", + "id": "84124b33", "metadata": {}, "outputs": [], "source": [ @@ -370,7 +370,7 @@ }, { "cell_type": "markdown", - "id": "d6ca9e5d", + "id": "a981b90d", "metadata": {}, "source": [ "Of course we won’t get exactly the same results from the two\n", diff --git a/interact/files/gold_silver_ships.ipynb b/interact/files/gold_silver_ships.ipynb index 43793e8..1189679 100644 --- a/interact/files/gold_silver_ships.ipynb +++ b/interact/files/gold_silver_ships.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4588146d", + "id": "77ac9bd9", "metadata": {}, "source": [ "# Ships with gold and silver" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "cba4b61d", + "id": "03fc4f25", "metadata": {}, "source": [ "In which we solve the problem of gold and silver chests in a discovered\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "095e8849", + "id": "a3e01adb", "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f2dc4c9b", + "id": "ba16f511", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/homerun_correlation_solution.ipynb b/interact/files/homerun_correlation_solution.ipynb index b399187..39d2ef9 100644 --- a/interact/files/homerun_correlation_solution.ipynb +++ b/interact/files/homerun_correlation_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a3b2d11d", + "id": "ac7d50b6", "metadata": {}, "source": [ "# Homeruns and strikeout correlation" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "4c6255e7", + "id": "a15e615d", "metadata": {}, "source": [ "Solution for exercise on relationship of home runs and strikeouts, using\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e5438911", + "id": "03e8a192", "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "73517b7c", + "id": "62c29034", "metadata": {}, "outputs": [], "source": [ @@ -61,7 +61,7 @@ }, { "cell_type": "markdown", - "id": "496cc4f3", + "id": "34edc5b7", "metadata": {}, "source": [ "Interpretation: a correlation coefficient as high as the observed value\n", diff --git a/interact/files/homerun_sop_exercise.ipynb b/interact/files/homerun_sop_exercise.ipynb index 157843e..499efce 100644 --- a/interact/files/homerun_sop_exercise.ipynb +++ b/interact/files/homerun_sop_exercise.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2dd007d0", + "id": "25a64809", "metadata": {}, "source": [ "# Homeruns and strikeout sum of products." @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "9d3e0e66", + "id": "539843b6", "metadata": {}, "source": [ "Exercise on relationship of home runs and strikeouts, using sum of\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "53736191", + "id": "9982c007", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/homerun_sop_solution.ipynb b/interact/files/homerun_sop_solution.ipynb index 0a18ce5..43a4967 100644 --- a/interact/files/homerun_sop_solution.ipynb +++ b/interact/files/homerun_sop_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5c2ddd11", + "id": "121f44d8", "metadata": {}, "source": [ "# Homeruns and strikeout sum of products." @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "8ea1f051", + "id": "c67a5e55", "metadata": {}, "source": [ "Solution to exercise on relationship of home runs and strikeouts, using\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b08878e2", + "id": "4e0613a1", "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d3753f17", + "id": "f027f0b5", "metadata": {}, "outputs": [], "source": [ @@ -61,7 +61,7 @@ }, { "cell_type": "markdown", - "id": "989b072c", + "id": "ceffbfbf", "metadata": {}, "source": [ "Interpretation: In 10,000 simulations, random shuffling very rarely\n", diff --git a/interact/files/intro_data_frames.ipynb b/interact/files/intro_data_frames.ipynb index fe861ab..0e421d0 100644 --- a/interact/files/intro_data_frames.ipynb +++ b/interact/files/intro_data_frames.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "b44d84e4", + "id": "2cdd6171", "metadata": {}, "source": [ "# Introducing data frames" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "7f7b274e", + "id": "891ae838", "metadata": {}, "source": [ "R is a data analysis language, so, as you would expect, it is\n", @@ -24,7 +24,7 @@ { "cell_type": "code", "execution_count": null, - "id": "711dba94", + "id": "3fcca295", "metadata": {}, "outputs": [], "source": [ @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "2ed8d468", + "id": "6a1952d0", "metadata": {}, "source": [ "We have thus far done many operations that returned R *vectors*.\n", @@ -45,7 +45,7 @@ { "cell_type": "code", "execution_count": null, - "id": "09120274", + "id": "6d2b0095", "metadata": {}, "outputs": [], "source": [ @@ -54,7 +54,7 @@ }, { "cell_type": "markdown", - "id": "6c489f83", + "id": "b663d033", "metadata": {}, "source": [ "A data frame is R’s own way of representing a table, with columns and\n", @@ -68,7 +68,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf6b8075", + "id": "d42f2fad", "metadata": {}, "outputs": [], "source": [ @@ -78,7 +78,7 @@ }, { "cell_type": "markdown", - "id": "52436a2f", + "id": "e19b057d", "metadata": {}, "source": [ "The data are in income order, sorted lowest to highest, so the first\n", @@ -96,7 +96,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c67a16d2", + "id": "a1be9f4d", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/liquor_permutation.ipynb b/interact/files/liquor_permutation.ipynb index 4ed6c18..d72d2e2 100644 --- a/interact/files/liquor_permutation.ipynb +++ b/interact/files/liquor_permutation.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "2d675542", + "id": "c3cc7e92", "metadata": {}, "source": [ "# Permutation test of public and private liquor prices" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "08699453", + "id": "4c706bf7", "metadata": {}, "source": [ "This notebook asks the question whether the difference in the means of\n", @@ -23,7 +23,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0d37e469", + "id": "aca3c394", "metadata": {}, "outputs": [], "source": [ @@ -37,7 +37,7 @@ }, { "cell_type": "markdown", - "id": "e5f1c132", + "id": "788daa97", "metadata": {}, "source": [ "Take all prices from the loaded data file, and convert into a vectors\n", @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "df304455", + "id": "eb473dff", "metadata": {}, "outputs": [], "source": [ @@ -62,7 +62,7 @@ { "cell_type": "code", "execution_count": null, - "id": "aa9705e2", + "id": "d53b31aa", "metadata": {}, "outputs": [], "source": [ @@ -76,7 +76,7 @@ }, { "cell_type": "markdown", - "id": "88191e95", + "id": "d7e81d63", "metadata": {}, "source": [ "Calculate actual difference:" @@ -85,7 +85,7 @@ { "cell_type": "code", "execution_count": null, - "id": "aab24c50", + "id": "3db2e8fa", "metadata": {}, "outputs": [], "source": [ @@ -95,7 +95,7 @@ }, { "cell_type": "markdown", - "id": "6aada5bf", + "id": "fe081c45", "metadata": {}, "source": [ "Concatenate the private and government values into one vector:" @@ -104,7 +104,7 @@ { "cell_type": "code", "execution_count": null, - "id": "10f36178", + "id": "6e87991f", "metadata": {}, "outputs": [], "source": [ @@ -115,7 +115,7 @@ }, { "cell_type": "markdown", - "id": "a54af313", + "id": "f5dce588", "metadata": {}, "source": [ "Do simulation:" @@ -124,7 +124,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ae76fb60", + "id": "25e265fb", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/liquor_prices.ipynb b/interact/files/liquor_prices.ipynb index b5e8ada..8e1979c 100644 --- a/interact/files/liquor_prices.ipynb +++ b/interact/files/liquor_prices.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "4e249956", + "id": "c4481b1a", "metadata": {}, "source": [ "# Public and private liquor prices" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "fd9f0557", + "id": "84d438e0", "metadata": {}, "source": [ "This notebook asks the question whether the difference in the means of\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c390ce43", + "id": "cb2cac36", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/logical_operators.ipynb b/interact/files/logical_operators.ipynb index 3e8ad17..775d499 100644 --- a/interact/files/logical_operators.ipynb +++ b/interact/files/logical_operators.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "ac5e4caf", + "id": "9018422d", "metadata": {}, "source": [ "# Logical operators" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "463c578b", + "id": "e6e06fd2", "metadata": {}, "source": [ "This section continues our programme of expanding the range of R\n", @@ -25,7 +25,7 @@ { "cell_type": "code", "execution_count": null, - "id": "27613b2c", + "id": "afb29e96", "metadata": {}, "outputs": [], "source": [ @@ -36,7 +36,7 @@ }, { "cell_type": "markdown", - "id": "823153bf", + "id": "0426f3c0", "metadata": {}, "source": [ "Let us now say that we are interested to record if the trial had\n", @@ -48,7 +48,7 @@ { "cell_type": "code", "execution_count": null, - "id": "90140c25", + "id": "4719c6ce", "metadata": {}, "outputs": [], "source": [ @@ -60,7 +60,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7dba0141", + "id": "b0d8c18d", "metadata": {}, "outputs": [], "source": [ @@ -71,7 +71,7 @@ }, { "cell_type": "markdown", - "id": "e1792d00", + "id": "28b518e9", "metadata": {}, "source": [ "It is a little repetitive to have to repeat the code identical code to\n", @@ -85,7 +85,7 @@ { "cell_type": "code", "execution_count": null, - "id": "42e52e05", + "id": "42c1cd63", "metadata": {}, "outputs": [], "source": [ @@ -96,7 +96,7 @@ }, { "cell_type": "markdown", - "id": "a4b2768c", + "id": "64b2a5bd", "metadata": {}, "source": [ "**Note: Note 23.1: What is an operator?**\n", @@ -113,7 +113,7 @@ { "cell_type": "code", "execution_count": null, - "id": "abe5d5d4", + "id": "02f930c5", "metadata": {}, "outputs": [], "source": [ @@ -123,7 +123,7 @@ }, { "cell_type": "markdown", - "id": "dc271dd3", + "id": "67b206dc", "metadata": {}, "source": [ "`+`, `-`, `/` and `*` are all examples of operators that do *arithmetic*\n", @@ -133,7 +133,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c1e9013b", + "id": "8cd1f87f", "metadata": {}, "outputs": [], "source": [ @@ -143,7 +143,7 @@ }, { "cell_type": "markdown", - "id": "61f3f287", + "id": "e3115b53", "metadata": {}, "source": [ "**End of note**\n" @@ -151,7 +151,7 @@ }, { "cell_type": "markdown", - "id": "5b8427cb", + "id": "c400f3fb", "metadata": {}, "source": [ "We are about to use the operator `|` (*or*). `|` is a *logical*\n", @@ -166,7 +166,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06f2787c", + "id": "d7f9765c", "metadata": {}, "outputs": [], "source": [ @@ -176,7 +176,7 @@ }, { "cell_type": "markdown", - "id": "f37b7bda", + "id": "a84cb77d", "metadata": {}, "source": [ "`|` (*or*) applies a very simple rule: if *either* the left-hand (LH)\n", @@ -188,7 +188,7 @@ { "cell_type": "code", "execution_count": null, - "id": "50f832b2", + "id": "2c28ba54", "metadata": {}, "outputs": [], "source": [ @@ -199,7 +199,7 @@ { "cell_type": "code", "execution_count": null, - "id": "119e6b7e", + "id": "dcfa9e85", "metadata": {}, "outputs": [], "source": [ @@ -210,7 +210,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bbb429f1", + "id": "12b78b73", "metadata": {}, "outputs": [], "source": [ @@ -221,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ceb580d3", + "id": "21167492", "metadata": {}, "outputs": [], "source": [ @@ -231,7 +231,7 @@ }, { "cell_type": "markdown", - "id": "69285ae6", + "id": "0af64144", "metadata": {}, "source": [ "Now let’s go back to the `if` statement above. The conditional part of\n", @@ -241,7 +241,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b5d45a27", + "id": "169e4b95", "metadata": {}, "outputs": [], "source": [ @@ -250,7 +250,7 @@ }, { "cell_type": "markdown", - "id": "4c7528de", + "id": "46cb7e30", "metadata": {}, "source": [ "This will be `TRUE` *either* when there there are two or fewer “heads”,\n", @@ -262,7 +262,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f73baeb8", + "id": "0252c4aa", "metadata": {}, "outputs": [], "source": [ @@ -273,7 +273,7 @@ }, { "cell_type": "markdown", - "id": "d2c69341", + "id": "37af79ac", "metadata": {}, "source": [ "While we are here, R has another very useful logical operator: ‘&’\n", @@ -286,7 +286,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5de6bdeb", + "id": "82cd6004", "metadata": {}, "outputs": [], "source": [ @@ -297,7 +297,7 @@ { "cell_type": "code", "execution_count": null, - "id": "58e630e9", + "id": "8a9f58b7", "metadata": {}, "outputs": [], "source": [ @@ -308,7 +308,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b7e95787", + "id": "19fb06c0", "metadata": {}, "outputs": [], "source": [ @@ -319,7 +319,7 @@ { "cell_type": "code", "execution_count": null, - "id": "22d2bde3", + "id": "e0ba3575", "metadata": {}, "outputs": [], "source": [ @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "a54914bd", + "id": "0a685936", "metadata": {}, "source": [ "We could, for example, ask whether the number of heads is \\>=3 *and*\n", @@ -339,7 +339,7 @@ { "cell_type": "code", "execution_count": null, - "id": "823cdb3a", + "id": "df7c3960", "metadata": { "lines_to_next_cell": 0 }, @@ -352,7 +352,7 @@ }, { "cell_type": "markdown", - "id": "09692213", + "id": "87b06f25", "metadata": {}, "source": [] } diff --git a/interact/files/measured_rations.ipynb b/interact/files/measured_rations.ipynb index aa6ceab..ed73552 100644 --- a/interact/files/measured_rations.ipynb +++ b/interact/files/measured_rations.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "922ae266", + "id": "54f7830f", "metadata": {}, "source": [ "# Pig rations via bootstrap" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "66b7bf50", + "id": "1835314e", "metadata": {}, "source": [ "Use the bootstrap (resampling with replacement) procedure to test\n", @@ -25,7 +25,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4d2f7826", + "id": "09474e71", "metadata": {}, "outputs": [], "source": [ @@ -39,7 +39,7 @@ }, { "cell_type": "markdown", - "id": "75093d2e", + "id": "cffade53", "metadata": {}, "source": [ "Let us first select the rows containing data for ration B (we will get\n", @@ -49,7 +49,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2c4e875c", + "id": "74267b6f", "metadata": {}, "outputs": [], "source": [ @@ -61,7 +61,7 @@ }, { "cell_type": "markdown", - "id": "a1ef829e", + "id": "b94ecf73", "metadata": {}, "source": [ "Finally for ration B, convert the weights to a vector for use in the\n", @@ -71,7 +71,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dbacd065", + "id": "d1537b04", "metadata": {}, "outputs": [], "source": [ @@ -82,7 +82,7 @@ }, { "cell_type": "markdown", - "id": "82e4e100", + "id": "c413896d", "metadata": {}, "source": [ "Select ration A rows, and get the weights as a vector:" @@ -91,7 +91,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6cfb4b1a", + "id": "c14649a9", "metadata": {}, "outputs": [], "source": [ @@ -103,7 +103,7 @@ }, { "cell_type": "markdown", - "id": "dc99b147", + "id": "8811d7de", "metadata": {}, "source": [ "We will use the `a_weights` and `b_weights` vectors for our simulation.\n", @@ -116,7 +116,7 @@ { "cell_type": "code", "execution_count": null, - "id": "59d3d25b", + "id": "2ca3f59e", "metadata": {}, "outputs": [], "source": [ @@ -126,7 +126,7 @@ }, { "cell_type": "markdown", - "id": "b4f77585", + "id": "f0f92a42", "metadata": {}, "source": [ "Now do the simulation:" @@ -135,7 +135,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ef8f96e", + "id": "3a6c1d90", "metadata": {}, "outputs": [], "source": [ @@ -170,7 +170,7 @@ }, { "cell_type": "markdown", - "id": "376cfafa", + "id": "18383d47", "metadata": {}, "source": [ "From this histogram we see that a very small proportion of the trials\n", @@ -181,7 +181,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1d54eae", + "id": "3f4fad40", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/merger_ranks.ipynb b/interact/files/merger_ranks.ipynb index f3c44f4..ba5d26a 100644 --- a/interact/files/merger_ranks.ipynb +++ b/interact/files/merger_ranks.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "de957c00", + "id": "88f6ff66", "metadata": {}, "source": [ "# Merger rank test" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "e3031ec4", + "id": "4f5d1f78", "metadata": {}, "source": [ "Test whether observed mean rank is plausible in the null-world where\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fadef0ed", + "id": "008eaf8b", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/monty_hall.ipynb b/interact/files/monty_hall.ipynb index 85f2fb1..7f300be 100644 --- a/interact/files/monty_hall.ipynb +++ b/interact/files/monty_hall.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "8cee7dcd", + "id": "edb4165c", "metadata": {}, "source": [ "# The Monty Hall problem" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "90bf15cb", + "id": "6cd2fecc", "metadata": {}, "source": [ "Here we do a R simulation of the Monty Hall problem.\n", @@ -28,7 +28,7 @@ { "cell_type": "code", "execution_count": null, - "id": "daa00fa2", + "id": "fb22a859", "metadata": {}, "outputs": [], "source": [ @@ -44,7 +44,7 @@ }, { "cell_type": "markdown", - "id": "da038632", + "id": "d22b5b16", "metadata": {}, "source": [ "We choose one of the doors to be the door with the car behind it:" @@ -53,7 +53,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a517a5d2", + "id": "b75d9fed", "metadata": {}, "outputs": [], "source": [ @@ -66,7 +66,7 @@ }, { "cell_type": "markdown", - "id": "b8367f50", + "id": "6ab9be7a", "metadata": {}, "source": [ "Now we need to decide which door Monty will open.\n", @@ -89,7 +89,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f8021627", + "id": "efa67be6", "metadata": {}, "outputs": [], "source": [ @@ -99,7 +99,7 @@ }, { "cell_type": "markdown", - "id": "92d02f04", + "id": "4112accc", "metadata": {}, "source": [ "We want to find the remaining doors from `doors` after removing the\n", @@ -116,7 +116,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e08c0ce2", + "id": "ea20b51c", "metadata": {}, "outputs": [], "source": [ @@ -128,7 +128,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3f710d47", + "id": "fcf61717", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +140,7 @@ { "cell_type": "code", "execution_count": null, - "id": "91ca500d", + "id": "74299149", "metadata": {}, "outputs": [], "source": [ @@ -151,7 +151,7 @@ }, { "cell_type": "markdown", - "id": "fe6a4fcb", + "id": "1fd84ca8", "metadata": {}, "source": [ "This logic allows us to choose the doors Monty can open:" @@ -160,7 +160,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f7178f91", + "id": "93fa81d8", "metadata": {}, "outputs": [], "source": [ @@ -170,7 +170,7 @@ }, { "cell_type": "markdown", - "id": "b5ded1ce", + "id": "c86cd148", "metadata": {}, "source": [ "Notice that `montys_choices` will only have one element left when\n", @@ -183,7 +183,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0719a575", + "id": "d6a96946", "metadata": {}, "outputs": [], "source": [ @@ -197,7 +197,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0f7ddf6e", + "id": "d6442b30", "metadata": {}, "outputs": [], "source": [ @@ -210,7 +210,7 @@ }, { "cell_type": "markdown", - "id": "6434b6e2", + "id": "192565c1", "metadata": {}, "source": [ "If Monty can only choose one door, we’ll take that. Otherwise we’ll\n", @@ -220,7 +220,7 @@ { "cell_type": "code", "execution_count": null, - "id": "129e0a23", + "id": "d8d5fea9", "metadata": {}, "outputs": [], "source": [ @@ -235,7 +235,7 @@ }, { "cell_type": "markdown", - "id": "6a60ab73", + "id": "8c4e2b19", "metadata": {}, "source": [ "Now we know Monty’s door, we can identify the other door, by removing\n", @@ -245,7 +245,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4478d0d0", + "id": "5776d717", "metadata": {}, "outputs": [], "source": [ @@ -257,7 +257,7 @@ }, { "cell_type": "markdown", - "id": "0ea9c376", + "id": "5022ee36", "metadata": {}, "source": [ "The logic above gives us the full procedure for one trial." @@ -266,7 +266,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4d5861ae", + "id": "062fcf1e", "metadata": {}, "outputs": [], "source": [ @@ -296,7 +296,7 @@ }, { "cell_type": "markdown", - "id": "2210d48d", + "id": "e3aac73a", "metadata": {}, "source": [ "All that remains is to put that trial procedure into a loop, and collect\n", @@ -306,7 +306,7 @@ { "cell_type": "code", "execution_count": null, - "id": "14bb5f75", + "id": "ab9ff2eb", "metadata": {}, "outputs": [], "source": [ @@ -352,7 +352,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf0ed1e9", + "id": "178ef8a9", "metadata": {}, "outputs": [], "source": [ @@ -361,7 +361,7 @@ }, { "cell_type": "markdown", - "id": "a62b0a5f", + "id": "f412cea5", "metadata": {}, "source": [ "We can also follow the same strategy as we used for the second\n", @@ -378,7 +378,7 @@ { "cell_type": "code", "execution_count": null, - "id": "277112c3", + "id": "27db18f4", "metadata": {}, "outputs": [], "source": [ @@ -427,7 +427,7 @@ { "cell_type": "code", "execution_count": null, - "id": "75db67ed", + "id": "d7109149", "metadata": {}, "outputs": [], "source": [ @@ -436,7 +436,7 @@ }, { "cell_type": "markdown", - "id": "e69ffdcc", + "id": "38a22e75", "metadata": {}, "source": [ "### 10.8.1 Insight from the Monty Hall simulation\n", @@ -450,7 +450,7 @@ { "cell_type": "code", "execution_count": null, - "id": "01b69e36", + "id": "3e089fda", "metadata": {}, "outputs": [], "source": [ @@ -473,7 +473,7 @@ }, { "cell_type": "markdown", - "id": "7ef98e84", + "id": "d4cd52d9", "metadata": {}, "source": [ "This calculation, on its own, tells us the answer, but it also points to\n", @@ -511,7 +511,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0c370458", + "id": "427851a6", "metadata": {}, "outputs": [], "source": [ @@ -527,7 +527,7 @@ }, { "cell_type": "markdown", - "id": "848cff25", + "id": "97160348", "metadata": {}, "source": [ "Now — let us say we happen to know that Monty is rather lazy, and he\n", @@ -542,7 +542,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4ec8f450", + "id": "4b55527e", "metadata": {}, "outputs": [], "source": [ @@ -558,7 +558,7 @@ }, { "cell_type": "markdown", - "id": "be943dff", + "id": "a497697d", "metadata": {}, "source": [ "It feels as if we have more information about where the car is, when we\n", @@ -571,7 +571,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ca57c1e7", + "id": "93cab112", "metadata": {}, "outputs": [], "source": [ @@ -590,7 +590,7 @@ }, { "cell_type": "markdown", - "id": "560e41a2", + "id": "dbc1555a", "metadata": {}, "source": [ "To take that into account, we might try a different strategy. We will\n", @@ -622,7 +622,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a2e78b4b", + "id": "7bb377f2", "metadata": {}, "outputs": [], "source": [ @@ -633,7 +633,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ade3b271", + "id": "3c04e0e0", "metadata": {}, "outputs": [], "source": [ @@ -677,7 +677,7 @@ }, { "cell_type": "markdown", - "id": "0ac06ad5", + "id": "bc196ba7", "metadata": {}, "source": [ "We find that the “switch-if-right” has around the same chance of success\n", diff --git a/interact/files/mouse_bootstrap.ipynb b/interact/files/mouse_bootstrap.ipynb index 08bb56a..f684140 100644 --- a/interact/files/mouse_bootstrap.ipynb +++ b/interact/files/mouse_bootstrap.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "bebb7759", + "id": "e201121d", "metadata": {}, "source": [ "# A classic bootstrap example" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "5af66b11", + "id": "a800e7c4", "metadata": {}, "source": [ "Draw bootstrap samples from mouse survival data to compare actual mean\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ad25c2d", + "id": "f2e0b7bc", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/mouse_permutation.ipynb b/interact/files/mouse_permutation.ipynb index 2ad0dd3..f17b506 100644 --- a/interact/files/mouse_permutation.ipynb +++ b/interact/files/mouse_permutation.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "cfc90807", + "id": "d50e0754", "metadata": {}, "source": [ "# Permutation test for mouse survival data" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "7b9c4fe1", + "id": "dcdbbc37", "metadata": {}, "source": [ "Use permutation (shuffle-and-split) samples from mouse survival data to\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "78f9b1c9", + "id": "1ae73e5e", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/offenders.ipynb b/interact/files/offenders.ipynb index 7351a55..427a68f 100644 --- a/interact/files/offenders.ipynb +++ b/interact/files/offenders.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "af815e54", + "id": "6f5db3ba", "metadata": {}, "source": [ "# Simulation of offender strategies" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "65fb9bfd", + "id": "e6c75f59", "metadata": {}, "source": [ "This notebook uses simulation to test the null hypothesis that the four\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d299151a", + "id": "f7a9f00d", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/offenders_squared.ipynb b/interact/files/offenders_squared.ipynb index 072bc01..5aaf456 100644 --- a/interact/files/offenders_squared.ipynb +++ b/interact/files/offenders_squared.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "fdc0216c", + "id": "c04547db", "metadata": {}, "source": [ "# Simulation of offender strategies using squared differences" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "3a022064", + "id": "e341151b", "metadata": {}, "source": [ "This notebook uses squared differences in a simulation to test the null\n", @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46d6358e", + "id": "141c87ba", "metadata": {}, "outputs": [], "source": [ @@ -46,7 +46,7 @@ }, { "cell_type": "markdown", - "id": "0f4b9743", + "id": "f1a56566", "metadata": {}, "source": [ "Our experiment will be, as before, to constitute four groups of 20 at\n", @@ -61,7 +61,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6d126115", + "id": "33801687", "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,7 @@ }, { "cell_type": "markdown", - "id": "0e9cc418", + "id": "e20babb9", "metadata": {}, "source": [ "From this histogram, we see that in only about 1 percent of the cases\n", @@ -125,7 +125,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d089e3e0", + "id": "5f8532e7", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "76feca0a", + "id": "cebebfdb", "metadata": {}, "source": [ "The conventional way to approach this problem would be with what is\n", diff --git a/interact/files/on_histograms.ipynb b/interact/files/on_histograms.ipynb index e35029a..b2bc8d5 100644 --- a/interact/files/on_histograms.ipynb +++ b/interact/files/on_histograms.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "936b4c58", + "id": "8df03b98", "metadata": {}, "source": [ "# Plotting histograms" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "9695dd40", + "id": "894c2e14", "metadata": {}, "source": [ "A histogram is a visual way to show the *distribution* of a sequence of\n", @@ -19,7 +19,7 @@ }, { "cell_type": "markdown", - "id": "ae8cd289", + "id": "64759f6d", "metadata": {}, "source": [ "The easiest way to explain histograms is to show one.\n", @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "da716320", + "id": "fdc23e9f", "metadata": {}, "outputs": [], "source": [ @@ -44,7 +44,7 @@ }, { "cell_type": "markdown", - "id": "82bab7a8", + "id": "09c516d5", "metadata": {}, "source": [ "These are the 16 values for states with a liquor monopoly (`govt`):" @@ -53,7 +53,7 @@ { "cell_type": "code", "execution_count": null, - "id": "35c949df", + "id": "054fb53d", "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ }, { "cell_type": "markdown", - "id": "717dbfcc", + "id": "eb1c30c1", "metadata": {}, "source": [ "We concatenate these values to get a sequence (a vector) of all 40\n", @@ -73,7 +73,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c0f0c6b", + "id": "d02770e7", "metadata": {}, "outputs": [], "source": [ @@ -83,7 +83,7 @@ }, { "cell_type": "markdown", - "id": "f14025ee", + "id": "9663bbd9", "metadata": {}, "source": [ "We are interested in the distribution of these 40 values. To show the\n", @@ -94,7 +94,7 @@ { "cell_type": "code", "execution_count": null, - "id": "494276f5", + "id": "b94895fc", "metadata": {}, "outputs": [], "source": [ @@ -103,7 +103,7 @@ }, { "cell_type": "markdown", - "id": "3fb6095a", + "id": "a05672d8", "metadata": {}, "source": [ "`hist` has calculated a vector of suitable intervals (*bins*) to divide\n", @@ -120,7 +120,7 @@ }, { "cell_type": "markdown", - "id": "e48bdde6", + "id": "e10ad278", "metadata": {}, "source": [ "In fact, `hist` sent back the edges (or *breaks*) of these bins as part\n", @@ -131,7 +131,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57256ddd", + "id": "e91031a2", "metadata": {}, "outputs": [], "source": [ @@ -140,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "282748f9", + "id": "f19db8df", "metadata": {}, "source": [ "Notice that the values attached to the `hist_res` result have *names*,\n", @@ -152,7 +152,7 @@ { "cell_type": "code", "execution_count": null, - "id": "81ee480e", + "id": "782960f6", "metadata": {}, "outputs": [], "source": [ @@ -161,7 +161,7 @@ }, { "cell_type": "markdown", - "id": "9834b12b", + "id": "4d057878", "metadata": {}, "source": [ "as “get the value called `counts` that is attached to the `hist_res`\n", @@ -179,7 +179,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c9536bc5", + "id": "1d533e62", "metadata": {}, "outputs": [], "source": [ @@ -189,7 +189,7 @@ }, { "cell_type": "markdown", - "id": "346df818", + "id": "a8a89e10", "metadata": {}, "source": [ "Think of the `breaks` values as: the value that starts the first bin,\n", @@ -212,7 +212,7 @@ { "cell_type": "code", "execution_count": null, - "id": "809cb4f6", + "id": "ae9807ce", "metadata": {}, "outputs": [], "source": [ @@ -222,7 +222,7 @@ }, { "cell_type": "markdown", - "id": "8631a433", + "id": "58f08d84", "metadata": {}, "source": [ "The `counts` vector shows that 3 values from `prices` fell in the range\n", @@ -241,7 +241,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eb2b3dd2", + "id": "655686b9", "metadata": {}, "outputs": [], "source": [ @@ -250,7 +250,7 @@ }, { "cell_type": "markdown", - "id": "ce38b94e", + "id": "203f07e4", "metadata": {}, "source": [ "Notice that R treats this number as a suggestion, and will adjust the\n", @@ -262,7 +262,7 @@ { "cell_type": "code", "execution_count": null, - "id": "af5f5167", + "id": "f01fb0cb", "metadata": {}, "outputs": [], "source": [ @@ -271,7 +271,7 @@ }, { "cell_type": "markdown", - "id": "deafcffc", + "id": "01727f15", "metadata": {}, "source": [ "We now have 16 new edges (boundaries), the first value giving the\n", @@ -282,7 +282,7 @@ { "cell_type": "code", "execution_count": null, - "id": "82cb7ed4", + "id": "7bf33888", "metadata": {}, "outputs": [], "source": [ @@ -291,7 +291,7 @@ }, { "cell_type": "markdown", - "id": "3da4b647", + "id": "f38e052f", "metadata": {}, "source": [ "We can also specify our own `breaks`, in order to bypass `hist`s default\n", @@ -302,7 +302,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7cd6d08f", + "id": "d12a9186", "metadata": {}, "outputs": [], "source": [ @@ -312,7 +312,7 @@ }, { "cell_type": "markdown", - "id": "f6afcd0c", + "id": "6d974aa7", "metadata": {}, "source": [ "We can send these directly to `hist` to specify the edges (and the\n", @@ -322,7 +322,7 @@ { "cell_type": "code", "execution_count": null, - "id": "43445232", + "id": "0a43d8e1", "metadata": {}, "outputs": [], "source": [ @@ -332,7 +332,7 @@ { "cell_type": "code", "execution_count": null, - "id": "042e1d75", + "id": "b5d6e8dd", "metadata": { "lines_to_next_cell": 0 }, @@ -344,13 +344,13 @@ }, { "cell_type": "markdown", - "id": "fa5160e9", + "id": "69f09a24", "metadata": {}, "source": [] }, { "cell_type": "markdown", - "id": "e123c8aa", + "id": "cb15eb38", "metadata": {}, "source": [ "[^1]: You can customize the calculation and meaning of the `breaks`\n", diff --git a/interact/files/one_pair.ipynb b/interact/files/one_pair.ipynb index 911453c..02c540a 100644 --- a/interact/files/one_pair.ipynb +++ b/interact/files/one_pair.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a87ababc", + "id": "19357b13", "metadata": {}, "source": [ "# One pair" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "9d647808", + "id": "92e1f1e2", "metadata": {}, "source": [ "This is a simulation to find the probability of exactly one pair in a\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ad454eb7", + "id": "03d91499", "metadata": {}, "outputs": [], "source": [ @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0dc87580", + "id": "6a93d7d3", "metadata": {}, "outputs": [], "source": [ @@ -45,7 +45,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1821b065", + "id": "a072d86d", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/optical_density_exercise.ipynb b/interact/files/optical_density_exercise.ipynb index b80a217..dd1c07b 100644 --- a/interact/files/optical_density_exercise.ipynb +++ b/interact/files/optical_density_exercise.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f5b41b60", + "id": "6644953e", "metadata": {}, "source": [ "# Optical density exercise" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "0b1fe6ea", + "id": "223f0614", "metadata": {}, "source": [ "Suppose we have 10 measurements of Optical Density on a batch of HIV\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c6453b33", + "id": "98778bb2", "metadata": {}, "outputs": [], "source": [ @@ -29,7 +29,7 @@ }, { "cell_type": "markdown", - "id": "4944962e", + "id": "fcc7034e", "metadata": {}, "source": [ "Derive a 95 percent confidence interval for the sample mean. Are there\n", diff --git a/interact/files/optical_density_solution.ipynb b/interact/files/optical_density_solution.ipynb index d50235d..46c4532 100644 --- a/interact/files/optical_density_solution.ipynb +++ b/interact/files/optical_density_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5cf333bb", + "id": "72d3658f", "metadata": {}, "source": [ "# Optical density solution" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "00f9766a", + "id": "f2277757", "metadata": {}, "source": [ "Suppose we have 10 measurements of Optical Density on a batch of HIV\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "98b6c11b", + "id": "bb678d31", "metadata": {}, "outputs": [], "source": [ @@ -29,7 +29,7 @@ }, { "cell_type": "markdown", - "id": "b5897fa2", + "id": "f3a8ed8f", "metadata": {}, "source": [ "Derive a 95 percent confidence interval for the sample mean. Are there\n", @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0014cf9d", + "id": "6c686ccc", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/paired_differences.ipynb b/interact/files/paired_differences.ipynb index 116fea3..4d3b4ef 100644 --- a/interact/files/paired_differences.ipynb +++ b/interact/files/paired_differences.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "679963d9", + "id": "92d02552", "metadata": {}, "source": [ "# Paired differences exercise\n" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3fe479ee", + "id": "61e61636", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/paired_differences_solution.ipynb b/interact/files/paired_differences_solution.ipynb index 9d45558..d3fa129 100644 --- a/interact/files/paired_differences_solution.ipynb +++ b/interact/files/paired_differences_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "79226da7", + "id": "f306d845", "metadata": {}, "source": [ "# Paired differences solution\n" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b75a36f", + "id": "25782e2c", "metadata": {}, "outputs": [], "source": [ @@ -50,7 +50,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5e27d44f", + "id": "eb0c0782", "metadata": {}, "outputs": [], "source": [ @@ -71,7 +71,7 @@ }, { "cell_type": "markdown", - "id": "92080d4a", + "id": "4078c6d7", "metadata": {}, "source": [ "Finally we consider the pairs. Here we *do* take the pairs into account.\n", @@ -99,7 +99,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30319d5b", + "id": "8ed4401f", "metadata": {}, "outputs": [], "source": [ @@ -125,7 +125,7 @@ }, { "cell_type": "markdown", - "id": "e01a7221", + "id": "ebbeace5", "metadata": {}, "source": [ "Notice that the sign-flip test, in which we preserve the information\n", diff --git a/interact/files/pennies.ipynb b/interact/files/pennies.ipynb index ecd7062..5c0fbb5 100644 --- a/interact/files/pennies.ipynb +++ b/interact/files/pennies.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "5be72d55", + "id": "2bfb3d63", "metadata": {}, "source": [ "# Simulating the pennies game" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "0ea39015", + "id": "bf33efcb", "metadata": {}, "source": [ "This notebook calculates the probability that one player will run out of\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9af37d9f", + "id": "96764fb4", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/pig_pairs.ipynb b/interact/files/pig_pairs.ipynb index 7213a32..4243bf6 100644 --- a/interact/files/pig_pairs.ipynb +++ b/interact/files/pig_pairs.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "69c7626a", + "id": "ef3f8991", "metadata": {}, "source": [ "# Paired test for pig rations" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "e8ef3403", + "id": "ca628eca", "metadata": {}, "source": [ "Use simulation to test for a difference in pig rations, by pairing pigs\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8e76089a", + "id": "acdf10c4", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/pig_rations.ipynb b/interact/files/pig_rations.ipynb index 1189862..1363a60 100644 --- a/interact/files/pig_rations.ipynb +++ b/interact/files/pig_rations.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a34f9096", + "id": "d7072075", "metadata": {}, "source": [ "# Weight gain on pig rations" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "dd4739ba", + "id": "a470da7f", "metadata": {}, "source": [ "We do a simulation of weight gain ranks for two different pig rations.\n", @@ -44,7 +44,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e6f9ee5", + "id": "5049adab", "metadata": {}, "outputs": [], "source": [ @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "e19c6b2a", + "id": "e54d5a95", "metadata": {}, "source": [ "We see from the histogram that, in about 3 percent of the trials, either\n", @@ -86,7 +86,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9498a536", + "id": "000b5bc2", "metadata": {}, "outputs": [], "source": [ @@ -107,7 +107,7 @@ }, { "cell_type": "markdown", - "id": "6cfdf2f3", + "id": "988949c7", "metadata": {}, "source": [ "The decisions that are warranted on the basis of the results depend upon\n", diff --git a/interact/files/pill_placebo.ipynb b/interact/files/pill_placebo.ipynb index 2f1c37d..31573bd 100644 --- a/interact/files/pill_placebo.ipynb +++ b/interact/files/pill_placebo.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "43a1c7aa", + "id": "80982c01", "metadata": {}, "source": [ "# Cures for pill vs placebo" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "5ecba086", + "id": "bebc1e73", "metadata": {}, "source": [ "Now for a R solution. Again, the benchmark hypothesis is that pill P has\n", @@ -39,7 +39,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23cba69e", + "id": "03edaac2", "metadata": {}, "outputs": [], "source": [ @@ -64,7 +64,7 @@ }, { "cell_type": "markdown", - "id": "91836386", + "id": "09b73089", "metadata": {}, "source": [ "Recall our actual observed results: In the medicine group, three more\n", diff --git a/interact/files/planet_densities.ipynb b/interact/files/planet_densities.ipynb index b6e3d0b..dc455ad 100644 --- a/interact/files/planet_densities.ipynb +++ b/interact/files/planet_densities.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "19ad5f14", + "id": "9ef033df", "metadata": {}, "source": [ "# Planet densities and distance" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "b191b93a", + "id": "e6e5f4f1", "metadata": {}, "source": [ "We apply the logic of resampling to the problem of close and distant\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "efd97404", + "id": "d254d5b9", "metadata": {}, "outputs": [], "source": [ @@ -57,7 +57,7 @@ }, { "cell_type": "markdown", - "id": "b2058b76", + "id": "52b8199d", "metadata": {}, "source": [ "Interpretation: 20 percent of the time, random shufflings produced a\n", diff --git a/interact/files/poll_sample_size.ipynb b/interact/files/poll_sample_size.ipynb index 8c10b59..3f13617 100644 --- a/interact/files/poll_sample_size.ipynb +++ b/interact/files/poll_sample_size.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "d8bf03ef", + "id": "682f31e2", "metadata": {}, "source": [ "# Sample size for an internet contract poll" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "55e0db21", + "id": "4d99767b", "metadata": {}, "source": [ "We want to know how many voters we should survey to be confident that\n", @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5be32e01", + "id": "f24f9590", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/r_for_cholesterol.ipynb b/interact/files/r_for_cholesterol.ipynb index 8b000ce..f5d455f 100644 --- a/interact/files/r_for_cholesterol.ipynb +++ b/interact/files/r_for_cholesterol.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "f88f37d4", + "id": "f89ba148", "metadata": {}, "source": [ "# Correlation coefficient for compliance and cholesterol" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "f5eba811", + "id": "970cfb9c", "metadata": {}, "source": [ "Calculate correlation coefficient for compliance and cholesterol." @@ -19,7 +19,7 @@ { "cell_type": "code", "execution_count": null, - "id": "065e8557", + "id": "91283875", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/sample_size_rations.ipynb b/interact/files/sample_size_rations.ipynb index 86d6b11..d21b134 100644 --- a/interact/files/sample_size_rations.ipynb +++ b/interact/files/sample_size_rations.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "43947f72", + "id": "25918dd5", "metadata": {}, "source": [ "# Sample size for pig rations with bootstrap" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "13cd6926", + "id": "f9f14de7", "metadata": {}, "source": [ "Use the bootstrap (resampling with replacement) procedure to find the\n", @@ -28,7 +28,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4e7b63ca", + "id": "16e181ad", "metadata": {}, "outputs": [], "source": [ @@ -77,7 +77,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ed8432d9", + "id": "d0ca1d29", "metadata": {}, "outputs": [], "source": [ @@ -90,7 +90,7 @@ }, { "cell_type": "markdown", - "id": "e946cbcb", + "id": "b1bbf51b", "metadata": {}, "source": [ "We find that in only of the trials the difference between the two\n", @@ -111,7 +111,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a57ce7e9", + "id": "d3ab322d", "metadata": {}, "outputs": [], "source": [ @@ -151,7 +151,7 @@ }, { "cell_type": "markdown", - "id": "75a99b00", + "id": "e9252e2d", "metadata": {}, "source": [ "If `kk` is close to one, we know that the sample size is large enough\n", diff --git a/interact/files/sampling_error_bootstrap.ipynb b/interact/files/sampling_error_bootstrap.ipynb index bc27b9b..a98a301 100644 --- a/interact/files/sampling_error_bootstrap.ipynb +++ b/interact/files/sampling_error_bootstrap.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "c31bd3a4", + "id": "583b0000", "metadata": {}, "source": [ "# Sampling error for pig ration weight gain via bootstrap" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "58c4e0c0", + "id": "28ef54b5", "metadata": {}, "source": [ "Use the bootstrap (resampling with replacement) procedure to estimate\n", @@ -20,7 +20,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87bb6676", + "id": "890971cc", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/sampling_tools.ipynb b/interact/files/sampling_tools.ipynb index 3509391..d8b9491 100644 --- a/interact/files/sampling_tools.ipynb +++ b/interact/files/sampling_tools.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "0ea1459e", + "id": "7c740961", "metadata": {}, "source": [ "# Sampling tools" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "9d48e678", + "id": "9e30d567", "metadata": {}, "source": [ "## 7.2 Samples and labels and strings\n", @@ -37,7 +37,7 @@ { "cell_type": "code", "execution_count": null, - "id": "038d37b0", + "id": "1755e247", "metadata": {}, "outputs": [], "source": [ @@ -51,7 +51,7 @@ }, { "cell_type": "markdown", - "id": "d2cc1c10", + "id": "31601721", "metadata": {}, "source": [ "After that, we have to unpack our labeling of 0 through 25 as being\n", @@ -61,7 +61,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f1876ad0", + "id": "0ec0d596", "metadata": {}, "outputs": [], "source": [ @@ -71,7 +71,7 @@ }, { "cell_type": "markdown", - "id": "4c6c8195", + "id": "48e9465c", "metadata": {}, "source": [ "This all works as we want it to, but it’s just a little bit difficult to\n", @@ -92,7 +92,7 @@ }, { "cell_type": "markdown", - "id": "25a4301a", + "id": "eccd0d00", "metadata": {}, "source": [ "So far, all the values we have seen in R are *numeric* — integers or\n", @@ -102,7 +102,7 @@ { "cell_type": "code", "execution_count": null, - "id": "33720188", + "id": "be418202", "metadata": {}, "outputs": [], "source": [ @@ -112,7 +112,7 @@ }, { "cell_type": "markdown", - "id": "78eee831", + "id": "045972b4", "metadata": {}, "source": [ "Here the variable `v` holds the value. We can see what type of value `v`\n", @@ -122,7 +122,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a7673c51", + "id": "fc874aa7", "metadata": {}, "outputs": [], "source": [ @@ -131,7 +131,7 @@ }, { "cell_type": "markdown", - "id": "3902cc52", + "id": "e19f4a3c", "metadata": {}, "source": [ "The value contained by the variable `v` is of `'numeric'` type (class).\n", @@ -143,7 +143,7 @@ { "cell_type": "code", "execution_count": null, - "id": "74722462", + "id": "7cedaaa0", "metadata": {}, "outputs": [], "source": [ @@ -153,7 +153,7 @@ }, { "cell_type": "markdown", - "id": "a9d0f892", + "id": "1c4d516e", "metadata": {}, "source": [ "Notice that R also see this as a `\"numeric\"` type of value. However, we\n", @@ -163,7 +163,7 @@ }, { "cell_type": "markdown", - "id": "7a778382", + "id": "5bf8395b", "metadata": {}, "source": [ "## 7.4 String values\n", @@ -177,7 +177,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3a7e971a", + "id": "25a97529", "metadata": {}, "outputs": [], "source": [ @@ -187,7 +187,7 @@ }, { "cell_type": "markdown", - "id": "9058a9c8", + "id": "81669247", "metadata": {}, "source": [ "What is the `class` of the new bit-of-text value `s`?" @@ -196,7 +196,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be051c84", + "id": "9051f21f", "metadata": {}, "outputs": [], "source": [ @@ -205,7 +205,7 @@ }, { "cell_type": "markdown", - "id": "a3370860", + "id": "784be237", "metadata": {}, "source": [ "The R `character` value is a bit of text, and therefore consists of a\n", @@ -221,7 +221,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1e3006d0", + "id": "7df7b3fa", "metadata": {}, "outputs": [], "source": [ @@ -231,7 +231,7 @@ }, { "cell_type": "markdown", - "id": "3ac5d3dd", + "id": "6cc6d4ce", "metadata": {}, "source": [ "R has a `substring` function that allows you to select individual\n", @@ -246,7 +246,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bdb1f8d7", + "id": "62b1dfc8", "metadata": {}, "outputs": [], "source": [ @@ -257,7 +257,7 @@ }, { "cell_type": "markdown", - "id": "672ca895", + "id": "9c51fdd5", "metadata": {}, "source": [ "## 7.5 Strings in vectors\n", @@ -269,7 +269,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15a7c669", + "id": "8e1138b3", "metadata": {}, "outputs": [], "source": [ @@ -279,7 +279,7 @@ }, { "cell_type": "markdown", - "id": "b94e7f7b", + "id": "72f41b30", "metadata": {}, "source": [ "As for any vector, you can select elements with *indexing*. When you\n", @@ -290,7 +290,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7daa9619", + "id": "51d77a3e", "metadata": {}, "outputs": [], "source": [ @@ -301,7 +301,7 @@ }, { "cell_type": "markdown", - "id": "fe7d427a", + "id": "6027d5d3", "metadata": {}, "source": [ "As for numbers, we can compare strings with, for example, the `==`\n", @@ -311,7 +311,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0046f1d0", + "id": "7e40982d", "metadata": {}, "outputs": [], "source": [ @@ -320,7 +320,7 @@ }, { "cell_type": "markdown", - "id": "7bec1885", + "id": "61464ebc", "metadata": {}, "source": [ "## 7.6 Repeating elements\n", @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": null, - "id": "729c7788", + "id": "f851f7be", "metadata": {}, "outputs": [], "source": [ @@ -367,7 +367,7 @@ }, { "cell_type": "markdown", - "id": "e3ce6ca8", + "id": "6d2005b2", "metadata": {}, "source": [ "We can use this vector of repeats of strings, to sample from. The result\n", @@ -378,7 +378,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c87c7b02", + "id": "b7e34676", "metadata": {}, "outputs": [], "source": [ @@ -390,7 +390,7 @@ }, { "cell_type": "markdown", - "id": "e7d20298", + "id": "2e026927", "metadata": {}, "source": [ "We can select our full jury of 12 jurors, and see the results in a more\n", @@ -400,7 +400,7 @@ { "cell_type": "code", "execution_count": null, - "id": "758983ab", + "id": "e206b8d9", "metadata": {}, "outputs": [], "source": [ @@ -411,7 +411,7 @@ }, { "cell_type": "markdown", - "id": "9660b752", + "id": "4f070fbf", "metadata": {}, "source": [ "**Note: Using the `size` argument to `sample`**\n", @@ -430,7 +430,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5b768713", + "id": "25d14145", "metadata": {}, "outputs": [], "source": [ @@ -442,7 +442,7 @@ }, { "cell_type": "markdown", - "id": "211a77e2", + "id": "7f981c13", "metadata": {}, "source": [ "**End of note**\n", @@ -454,7 +454,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6cf0fd7a", + "id": "16db1297", "metadata": {}, "outputs": [], "source": [ @@ -464,7 +464,7 @@ }, { "cell_type": "markdown", - "id": "d4d1e9fd", + "id": "4100d980", "metadata": {}, "source": [ "Finally, we can `sum` to find the number of black jurors\n", @@ -475,7 +475,7 @@ { "cell_type": "code", "execution_count": null, - "id": "075420cd", + "id": "4a4dede4", "metadata": {}, "outputs": [], "source": [ @@ -486,7 +486,7 @@ }, { "cell_type": "markdown", - "id": "a9c40556", + "id": "a22db58b", "metadata": {}, "source": [ "Putting that all together, this is our new procedure to select one jury\n", @@ -496,7 +496,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ab6adef9", + "id": "a049368c", "metadata": {}, "outputs": [], "source": [ @@ -508,7 +508,7 @@ }, { "cell_type": "markdown", - "id": "c1c86267", + "id": "f3b78472", "metadata": {}, "source": [ "Or we can be even more compact by putting several statements together\n", @@ -518,7 +518,7 @@ { "cell_type": "code", "execution_count": null, - "id": "62007fd5", + "id": "b739e7d5", "metadata": {}, "outputs": [], "source": [ @@ -529,7 +529,7 @@ }, { "cell_type": "markdown", - "id": "35e8fb4e", + "id": "c2a87d2d", "metadata": {}, "source": [ "## 7.7 Resampling with and without replacement\n", @@ -572,7 +572,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1cbbb4b1", + "id": "834417cf", "metadata": {}, "outputs": [], "source": [ @@ -586,7 +586,7 @@ }, { "cell_type": "markdown", - "id": "b2bd80dd", + "id": "8b4fdb3e", "metadata": {}, "source": [ "Now consider taking a 12-person jury at random from this panel. We\n", @@ -637,7 +637,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b9b824dd", + "id": "f40ed6e7", "metadata": {}, "outputs": [], "source": [ @@ -648,7 +648,7 @@ }, { "cell_type": "markdown", - "id": "e85f3bb6", + "id": "992c9f62", "metadata": {}, "source": [ "This is a strange jury, because it can select any member of the jury\n", @@ -670,7 +670,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0fed3f55", + "id": "1da09ecd", "metadata": {}, "outputs": [], "source": [ @@ -682,7 +682,7 @@ }, { "cell_type": "markdown", - "id": "fff6007d", + "id": "1f4b8d4d", "metadata": {}, "source": [ "**Note: Note 7.1: Comments at the end of lines**\n", @@ -695,7 +695,7 @@ { "cell_type": "code", "execution_count": null, - "id": "391b8349", + "id": "bbc44e37", "metadata": {}, "outputs": [], "source": [ @@ -704,7 +704,7 @@ }, { "cell_type": "markdown", - "id": "e7943189", + "id": "621e57e9", "metadata": {}, "source": [ "You can also put comments at the *end of code lines*, by finishing the\n", @@ -716,7 +716,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ac108f7d", + "id": "3ee54a6c", "metadata": {}, "outputs": [], "source": [ @@ -725,7 +725,7 @@ }, { "cell_type": "markdown", - "id": "fb64b6bb", + "id": "f6ee6682", "metadata": {}, "source": [ "**End of note**\n", @@ -737,7 +737,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2b993f93", + "id": "3e8e31fa", "metadata": {}, "outputs": [], "source": [ @@ -747,7 +747,7 @@ }, { "cell_type": "markdown", - "id": "325a2ae4", + "id": "e1ea28e4", "metadata": {}, "source": [ "Now we have the procedure for one simulated trial, here is the procedure\n", @@ -757,7 +757,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eb5045da", + "id": "c6ccc81c", "metadata": {}, "outputs": [], "source": [ @@ -778,7 +778,7 @@ }, { "cell_type": "markdown", - "id": "96fad697", + "id": "4c8ac736", "metadata": {}, "source": [ "We have found that, when there are only 8% black jurors in the jury\n", diff --git a/interact/files/sampling_variability.ipynb b/interact/files/sampling_variability.ipynb index 741c487..3b3c94c 100644 --- a/interact/files/sampling_variability.ipynb +++ b/interact/files/sampling_variability.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "38671b25", + "id": "acc2b4e2", "metadata": {}, "source": [ "# Experiment in sampling variability" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "f9314a74", + "id": "d6c3e2de", "metadata": {}, "source": [ "Try generating some rookie “seasons” yourself with the following\n", @@ -21,7 +21,7 @@ { "cell_type": "code", "execution_count": null, - "id": "660b21dc", + "id": "686c0d47", "metadata": {}, "outputs": [], "source": [ @@ -36,7 +36,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9866a34", + "id": "24eecfd5", "metadata": {}, "outputs": [], "source": [ @@ -50,7 +50,7 @@ }, { "cell_type": "markdown", - "id": "2293672f", + "id": "6e0e0fee", "metadata": {}, "source": [ "Simulate a set of 10 or 20 such rookie seasons, and look at the one who\n", diff --git a/interact/files/santas_hats.ipynb b/interact/files/santas_hats.ipynb index d9857b3..67f2c4b 100644 --- a/interact/files/santas_hats.ipynb +++ b/interact/files/santas_hats.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "c81d429b", + "id": "23736d61", "metadata": {}, "source": [ "# Santas' hats" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "59361619", + "id": "874946d8", "metadata": {}, "source": [ "**The welcome staff at a restaurant mix up the hats of a party of six\n", @@ -33,7 +33,7 @@ { "cell_type": "code", "execution_count": null, - "id": "febfb4e8", + "id": "c74be775", "metadata": {}, "outputs": [], "source": [ @@ -66,7 +66,7 @@ }, { "cell_type": "markdown", - "id": "4752169c", + "id": "a7d801fb", "metadata": {}, "source": [ "We see that in roughly 63 percent of the trials at least one Santa\n", diff --git a/interact/files/seatbelt_proportion_solution.ipynb b/interact/files/seatbelt_proportion_solution.ipynb index fe8379c..513dee3 100644 --- a/interact/files/seatbelt_proportion_solution.ipynb +++ b/interact/files/seatbelt_proportion_solution.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "084f3714", + "id": "7d26952f", "metadata": {}, "source": [ "# Seatbelt proportion solution\n" @@ -11,7 +11,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2c0ff998", + "id": "8c850424", "metadata": {}, "outputs": [], "source": [ diff --git a/interact/files/selecting_by_slicing.ipynb b/interact/files/selecting_by_slicing.ipynb index 8802ae7..85efe02 100644 --- a/interact/files/selecting_by_slicing.ipynb +++ b/interact/files/selecting_by_slicing.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "50ec27c1", + "id": "4c0d564a", "metadata": {}, "source": [ "# Selecting elements by slicing" @@ -10,7 +10,7 @@ }, { "cell_type": "markdown", - "id": "5e1fe0bf", + "id": "804af197", "metadata": {}, "source": [ "As you saw in Note Table of contents
  • What Simon saw
  • Resampling and data science
  • What we changed
  • +
  • The third edition is the director’s cut, where Simon is the director
  • Who should read this book, and when
  • Welcome to resampling
  • @@ -460,6 +461,10 @@

    What we changed

    Our second and minor change is that we have added some content that Simon specifically left out. Simon knew that his approach was radical for its time, and designed his book as a commentary, correction, and addition to traditional courses in statistics. He assumes some familiarity with the older world of normal distributions, standard deviations, and correlation. We want this book to useful to the true beginner, so we have added some explanation standard deviations, standard scores and the correlation coefficient.

    We have also updated some the examples, but we have deliberately been light in our edits, to give you the fresh and creative flavor of Simon’s book, as he worked through the landscape of traditional statistics with his radical eye.

    +
    +

    The third edition is the director’s cut, where Simon is the director

    +

    As you see from the section above, the largest change for this edition is to update the code sections to use R. We intend this edition to be as close as possible to the book that Simon intended, but updated to use modern tools and a standard, widely-used programming language. Read this edition as our service to Simon for his visionary work — this is Simon’s book, and we (Matthew and Stéfan) intend to serve mainly as his editors and interpreters. We release this edition so you can see Simon’s ideas updated to current technology.

    +

    Who should read this book, and when

    As you have seen in the previous sections, this book uses a radical approach to explaining statistical inference — the science of drawing conclusions from noisy data. This approach is quickly becoming the standard in teaching of data science, partly because it is so much easier to explain, and partly because of the increasing role of code in data analysis.

    diff --git a/resampling_method.html b/resampling_method.html index d3acafc..4c87e12 100644 --- a/resampling_method.html +++ b/resampling_method.html @@ -507,7 +507,7 @@

    Soon we will do all these steps with some R code, but for now, consider Table Table 2.1. In each row, we placed 20 numbers, each one representing an ambulance. We added 25 such rows, each representing a simulation of one day.

    -
    +
    Table 2.1: 25 simulations of 20 ambulances, with counts @@ -1127,7 +1127,7 @@

    To know how many ambulances were “out of order” on any given day, we count number of ones in that row. We place the counts in the final column called “#9” (for “number of nines”):

    -
    +
    Table 2.2: 25 simulations of 20 ambulances, with counts diff --git a/search.json b/search.json index 45966fc..a923034 100644 --- a/search.json +++ b/search.json @@ -59,6 +59,16 @@ "Preface to the third edition" ] }, + { + "objectID": "preface_third.html#the-third-edition-is-the-directors-cut-where-simon-is-the-director", + "href": "preface_third.html#the-third-edition-is-the-directors-cut-where-simon-is-the-director", + "title": "Preface to the third edition", + "section": "The third edition is the director’s cut, where Simon is the director", + "text": "The third edition is the director’s cut, where Simon is the director\nAs you see from the section above, the largest change for this edition is to update the code sections to use R. We intend this edition to be as close as possible to the book that Simon intended, but updated to use modern tools and a standard, widely-used programming language. Read this edition as our service to Simon for his visionary work — this is Simon’s book, and we (Matthew and Stéfan) intend to serve mainly as his editors and interpreters. We release this edition so you can see Simon’s ideas updated to current technology.", + "crumbs": [ + "Preface to the third edition" + ] + }, { "objectID": "preface_third.html#who-should-read-this-book-and-when", "href": "preface_third.html#who-should-read-this-book-and-when", diff --git a/testing_counts_1.html b/testing_counts_1.html index 1945cd5..69479df 100644 --- a/testing_counts_1.html +++ b/testing_counts_1.html @@ -557,7 +557,7 @@

    -
    +
    Table 21.1: Results from 25 random trials for Fruitfly problem @@ -893,7 +893,7 @@

    -
    +
    Table 21.2: Results from 20 random trials for contract poll problem @@ -1241,7 +1241,7 @@

    -
    +
    Table 21.3: Results from 25 random trials for pill/placebo @@ -1604,7 +1604,7 @@

    -
    +
    Table 21.5: Results from 25 random trials for pig rations