From 8e8cca4a1cd662211de33bdc3139af3db569ded3 Mon Sep 17 00:00:00 2001 From: Prawal Pokharel <57414987+prawalpokharel@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:19:19 -0600 Subject: [PATCH] Fix typos in Chapter 4, 5 and 18 exercises and solutions Closes #562. --- exercises/_04-sa-explore-categorical.qmd | 2 +- exercises/_05-sa-explore-numerical.qmd | 2 +- exercises/_18-ex-inference-tables.qmd | 4 ++-- exercises/_18-sa-inference-tables.qmd | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/_04-sa-explore-categorical.qmd b/exercises/_04-sa-explore-categorical.qmd index d7051960..c8e3ca00 100644 --- a/exercises/_04-sa-explore-categorical.qmd +++ b/exercises/_04-sa-explore-categorical.qmd @@ -10,5 +10,5 @@ 1. \(a\) The ridge plots do not tell us about the relationship between meat consumption and life expectancy. While it is true that the high income group of countries has highest meat consumption and highest life expectancy, we can't, for example, differentiate meat consumption across the low and middle income groups (so as to connect to life expectancy). Additionally, we don't know anything about the relationship betwen meat consumption and life expectancy *within* an income group. (b) When a relationship is confounded we cannot determine the causal mechanism. We don't know if the longer life expecancy is due to meat consumption or due to higher income (which comes with many other life-extending practices). (c) In order to investigate a specific confounding variable, first break the data into categories according to that confounding variable (here, income). Then look at the relationship of interest (here meat consumption and life expectancy) separately for each of the levels of the confounding variable (income). \addtocounter{enumi}{1} -1. \(a\) 41% of the JetBlue flights are delayed. 40.7% of the United Airlines flights are delayed. (b) For SFO: JetBlue had 39.7% delayed, United had 40% delayed (United had more delayed flights). For LAX: JetBlue had 40.1% delayed, United had 41% delayed (United had more delayed flights). For BQN: JetBlue had 45.7% delayed, United had 48.8% delayed (United had more delayed flights). (c) Note that JetBlue had substantially more flights than United out of BQN (where there was a high delay percentage). United had substantially more flights than United out of SFO and LAX, both of which had low delay percentages. So JetBlue's overall percentage delay is bumped up due to the BQN flights, and United's overall percentage delay is bumped down due to the SFO and LAX flights. +1. \(a\) 41% of the JetBlue flights are delayed. 40.7% of the United Airlines flights are delayed. (b) For SFO: JetBlue had 39.7% delayed, United had 40% delayed (United had more delayed flights). For LAX: JetBlue had 40.1% delayed, United had 41% delayed (United had more delayed flights). For BQN: JetBlue had 45.7% delayed, United had 48.8% delayed (United had more delayed flights). (c) Note that JetBlue had substantially more flights than United out of BQN (where there was a high delay percentage). United had substantially more flights than JetBlue out of SFO and LAX, both of which had low delay percentages. So JetBlue's overall percentage delay is bumped up due to the BQN flights, and United's overall percentage delay is bumped down due to the SFO and LAX flights. \addtocounter{enumi}{1} diff --git a/exercises/_05-sa-explore-numerical.qmd b/exercises/_05-sa-explore-numerical.qmd index c7455ee8..8bcc13dd 100644 --- a/exercises/_05-sa-explore-numerical.qmd +++ b/exercises/_05-sa-explore-numerical.qmd @@ -26,7 +26,7 @@ \addtocounter{enumi}{1} -1. \(a\) About 26. (b) Since the distribution is right skewed the mean is higher than the median. (c) Q1: between 15 and 20, Q3: between 35 and 40, IQR: about 20. (d) Values that are considered to be unusually low or high lie more than 1.5$\times$IQR away from the quartiles. Upper fence: Q3 + 1.5 $\times$ IQR = $37.5 + 1.5 \times 20 = 67.5$; Lower fence: Q1 - 1.5 $\times$ IQR = $17.5 + 1.5 \times 20 = -12.5$; The lowest AQI recorded is not lower than 5 and the highest AQI recorded is not higher than 65, which are both within the fences. Therefore none of the days in this sample would be considered to have an unusually low or high AQI. +1. \(a\) About 26. (b) Since the distribution is right skewed the mean is higher than the median. (c) Q1: between 15 and 20, Q3: between 35 and 40, IQR: about 20. (d) Values that are considered to be unusually low or high lie more than 1.5$\times$IQR away from the quartiles. Upper fence: Q3 + 1.5 $\times$ IQR = $37.5 + 1.5 \times 20 = 67.5$; Lower fence: Q1 - 1.5 $\times$ IQR = $17.5 - 1.5 \times 20 = -12.5$; The lowest AQI recorded is not lower than 5 and the highest AQI recorded is not higher than 65, which are both within the fences. Therefore none of the days in this sample would be considered to have an unusually low or high AQI. \addtocounter{enumi}{1} diff --git a/exercises/_18-ex-inference-tables.qmd b/exercises/_18-ex-inference-tables.qmd index 1c5f656f..a155b1c7 100644 --- a/exercises/_18-ex-inference-tables.qmd +++ b/exercises/_18-ex-inference-tables.qmd @@ -81,7 +81,7 @@ column_spec(1:5, width = "3em") ``` - a. If the variables describing the habitat and the amount of sunlight are independent, what proporiton of lizards (total) would be expected in each of the three sunlight categories? + a. If the variables describing the habitat and the amount of sunlight are independent, what proportion of lizards (total) would be expected in each of the three sunlight categories? b. Given the proportions of each sunlight condition, how many lizards of each type would you expect to see in the sun? in the partial sun? @@ -128,7 +128,7 @@ column_spec(2:4, width = "7em") ``` - a. If the variables on ethnicity and smoking status are independent, estimate the proporiton of individuals (total) who smoke? + a. If the variables on ethnicity and smoking status are independent, estimate the proportion of individuals (total) who smoke? b. Given the overall proportion who smoke, how many of each Asian American ethnicity would you expect to smoke? diff --git a/exercises/_18-sa-inference-tables.qmd b/exercises/_18-sa-inference-tables.qmd index 242b3f24..2617c2be 100644 --- a/exercises/_18-sa-inference-tables.qmd +++ b/exercises/_18-sa-inference-tables.qmd @@ -18,7 +18,7 @@ \addtocounter{enumi}{1} -1. \(a\) Sun = 0.343, Partial = 0.325, Shade = 0.331. (b) For each, the numbers are listed in the order sun, partial, and shade: Desert (40,9, 38,7, 39.4), Mountain (36.7, 34.8, 35.5), Valley (36.4, 34.5, 35.1). (c) Yes. (d) We can't evaluate the association without a formal test. +1. \(a\) Sun = 0.343, Partial = 0.325, Shade = 0.331. (b) For each, the numbers are listed in the order sun, partial, and shade: Desert (40.9, 38.7, 39.4), Mountain (36.7, 34.8, 35.5), Valley (36.4, 34.5, 35.1). (c) Yes. (d) We can't evaluate the association without a formal test. \addtocounter{enumi}{1}