@@ -165,6 +165,8 @@ Continuing on with our example above, about the average number of hours worked a
165165#| label: "generate-point"
166166#| warning: false
167167#| message: false
168+ set.seed(571)
169+
168170gss %>%
169171 specify(response = hours) %>%
170172 hypothesize(null = "point", mu = 40) %>%
@@ -179,6 +181,8 @@ To generate a null distribution for the independence of two variables, we could
179181#| label: "generate-permute"
180182#| warning: false
181183#| message: false
184+ set.seed(328)
185+
182186gss %>%
183187 specify(partyid ~ age) %>%
184188 hypothesize(null = "independence") %>%
@@ -193,6 +197,8 @@ Depending on whether you're carrying out computation-based inference or theory-b
193197#| label: "calculate-point"
194198#| warning: false
195199#| message: false
200+ set.seed(265)
201+
196202gss %>%
197203 specify(response = hours) %>%
198204 hypothesize(null = "point", mu = 40) %>%
@@ -206,6 +212,8 @@ The output of `calculate()` here shows us the sample statistic (in this case, th
206212#| label: "specify-diff-in-means"
207213#| warning: false
208214#| message: false
215+ set.seed(174)
216+
209217gss %>%
210218 specify(age ~ college) %>%
211219 hypothesize(null = "independence") %>%
@@ -227,6 +235,8 @@ point_estimate <- gss %>%
227235 calculate(stat = "mean")
228236
229237# generate a null distribution
238+ set.seed(693)
239+
230240null_dist <- gss %>%
231241 specify(response = hours) %>%
232242 hypothesize(null = "point", mu = 40) %>%
@@ -301,6 +311,8 @@ Generally, to find a null distribution using theory-based methods, use the same
301311``` {r}
302312#| message: false
303313#| warning: false
314+ set.seed(533)
315+
304316null_f_distn <- gss %>%
305317 specify(age ~ partyid) %>%
306318 hypothesize(null = "independence") %>%
0 commit comments