Testing Hypotheses






Grayson White

Math 141
Week 8 | Fall 2025

Agenda (logistics)

  • Discuss midterm results
  • Get some credit back for missed midterm questions
  • Final exam info

Agenda (content)

  • Wrap up confidence interval lecture from Monday
  • Start testing hypotheses!

Discussion of midterm results

Midterm make-up credit

If you scored less than 80% on the midterm you have the opportunity to get some points back. Parameters:

  • You can get up to 50% of your missed points back (up to an 80% total score on the midterm).
    • Example: If you got a 70% on the midterm, you can get up to an 80% on the midterm, but if you got a 50% on the midterm you can get up to a 75% on the midterm.
  • For each question part you can get half the points you missed.
    • Example: If you got a 3 / 5 on Question 2 part (a), an entirely correct solution submitted to me on the midterm makeups will score you a 4 / 5 on Question 2 part (a).
  • All rules of the midterm still apply, but now:
    1. you have no time pressure, and
    2. you can come to my (Grayson’s) office hours to discuss questions you are stuck on, but no other office hours or individual tutoring.
  • Midterm corrects are due on Gradescope by Sunday 11/9 (11 days from now) at 8pm.

Final exam info

  • We’ll be having our written final exam in person during the final exam time slot:

  • Wednesday, December 17th from 6pm - 9pm in Vollum Lecture Hall.

  • Oral exam details TBD.

Statistical Inference

Goal: Draw conclusions about the population based on a sample.

Main Flavors:

  • Estimating numerical quantities.
  • Testing conjectures.

Example: Does Extrasensory Perception (ESP) exist?

Daryl Bem and Ben Honorton

Bem and Honorton conducted extrasensory perception studies:

  • A “sender” randomly chooses an object out of 4 possible objects and sends that information to a “receiver”.
  • The “receiver” is then given a set of 4 possible objects and they must decide which one most resembles the object sent to them.

Out of 329 trials, the “receivers” correctly identified the object 106 times.

ESP Example

Let’s consider the following questions:

  1. If ESP does not exist and the “receivers” are guessing, how often would we expect them to be correct?

  2. For each sample (set of 329 trials), do we expect the proportion of correct guesses to be equal? Why or why not?

  3. Is it possible to randomly guess correctly 106 out of 329 times (i.e., 32% of the time)?

  4. How unusual is it to guess correctly 106 out of 329 times if ESP doesn’t exist?

To help us answer d., we need a sampling distribution for the sample proportion where we assume the “receivers” were purely guessing!

Sampling Distribution of a Statistic

Steps for (Approximate) Distribution:

  1. Decide on a sample size, \(n\).

  2. Randomly select a sample of size \(n\) from the population.

  3. Compute the sample statistic.

  4. Put the sample back in.

  5. Repeat Steps (2) - (4) many (1000+) times.

Sampling Distribution of a Statistic

Steps for (Approximate) Distribution:

  1. Decide on a sample size, \(n\).

  2. Randomly select a sample of size \(n\) from the population.

  3. Compute the sample statistic.

  4. Put the sample back in.

  5. Repeat Steps (2) - (4) many (1000+) times.

Sampling Distribution Under No ESP

Steps for (Approximate) Distribution:

  1. Decide on a sample size, \(n\).

  2. Randomly select a sample of size \(n\) from the population.

library(mosaic)
rflip(n = 329, prob = 0.25)

Flipping 329 coins [ Prob(Heads) = 0.25 ] ...

T T H T T T T H H T T T T T T T T H T H H T T T T T T H T H T T T T T T
T T T T H T H T H T H T H T T T H H H T T T T T T T H H H H H T H H H T
T H T H T T T T H H T T T T H H T T T T T T T H T T T T H T T H H T T T
T T T T H T T T T T T T T H H H T T T H T T T T T H T T T T T T T T T H
T T T T T T T T H T T T T T T H T T T H H T T T H H T H H T T H T H T T
H T T T T T H T H T T H T H T T T T T T T T H T H T T T T T H H T T T T
T T H T T T H T H H T H T T H T T H T T T T T H H T H H T T T T H T T T
T T H T T H T T H T T T T T T T H T T T T T T T T T T T T T T T H T H H
T H T T T T T T T T T H H T H T T H H T T H H T T T H T T T T T T H H T
T T H T T

Number of Heads: 91 [Proportion Heads: 0.276595744680851]

Sampling Distribution Under No ESP

  1. Compute the sample statistic.
rflip(n = 329, prob = 0.25, summarize = TRUE)
    n heads tails prob
1 329    86   243 0.25
  1. Put the sample back in.

  2. Repeat Steps (2) - (4) many (1000+) times.

guessing_samp_dist <- do(1000)*rflip(n = 329, prob = 0.25)
guessing_samp_dist
       n heads tails      prop
1    329    77   252 0.2340426
2    329    83   246 0.2522796
3    329    81   248 0.2462006
4    329    82   247 0.2492401
5    329    84   245 0.2553191
6    329    83   246 0.2522796
7    329    78   251 0.2370821
8    329    93   236 0.2826748
9    329    90   239 0.2735562
10   329    82   247 0.2492401
11   329    85   244 0.2583587
12   329    88   241 0.2674772
13   329    66   263 0.2006079
14   329    88   241 0.2674772
15   329    80   249 0.2431611
16   329    95   234 0.2887538
17   329    80   249 0.2431611
18   329    81   248 0.2462006
19   329    88   241 0.2674772
20   329    67   262 0.2036474
21   329    88   241 0.2674772
22   329    77   252 0.2340426
23   329    78   251 0.2370821
24   329    78   251 0.2370821
25   329    96   233 0.2917933
26   329    75   254 0.2279635
27   329    76   253 0.2310030
28   329    92   237 0.2796353
29   329    72   257 0.2188450
30   329    74   255 0.2249240
31   329    91   238 0.2765957
32   329    74   255 0.2249240
33   329    65   264 0.1975684
34   329    92   237 0.2796353
35   329    92   237 0.2796353
36   329   106   223 0.3221884
37   329    82   247 0.2492401
38   329    67   262 0.2036474
39   329    75   254 0.2279635
40   329    78   251 0.2370821
41   329    75   254 0.2279635
42   329    75   254 0.2279635
43   329    69   260 0.2097264
44   329    81   248 0.2462006
45   329    87   242 0.2644377
46   329    91   238 0.2765957
47   329    72   257 0.2188450
48   329    76   253 0.2310030
49   329    95   234 0.2887538
50   329    89   240 0.2705167
51   329    88   241 0.2674772
52   329    83   246 0.2522796
53   329    90   239 0.2735562
54   329    89   240 0.2705167
55   329    89   240 0.2705167
56   329    81   248 0.2462006
57   329    85   244 0.2583587
58   329    71   258 0.2158055
59   329    72   257 0.2188450
60   329    81   248 0.2462006
61   329    84   245 0.2553191
62   329    74   255 0.2249240
63   329    58   271 0.1762918
64   329    90   239 0.2735562
65   329    80   249 0.2431611
66   329    90   239 0.2735562
67   329    76   253 0.2310030
68   329    79   250 0.2401216
69   329    69   260 0.2097264
70   329    78   251 0.2370821
71   329    67   262 0.2036474
72   329    71   258 0.2158055
73   329    88   241 0.2674772
74   329    99   230 0.3009119
75   329    63   266 0.1914894
76   329    75   254 0.2279635
77   329    74   255 0.2249240
78   329    87   242 0.2644377
79   329    86   243 0.2613982
80   329   103   226 0.3130699
81   329    76   253 0.2310030
82   329    79   250 0.2401216
83   329    80   249 0.2431611
84   329    78   251 0.2370821
85   329    79   250 0.2401216
86   329    80   249 0.2431611
87   329    83   246 0.2522796
88   329    81   248 0.2462006
89   329    96   233 0.2917933
90   329    89   240 0.2705167
91   329    80   249 0.2431611
92   329    83   246 0.2522796
93   329    84   245 0.2553191
94   329    77   252 0.2340426
95   329    81   248 0.2462006
96   329    85   244 0.2583587
97   329    90   239 0.2735562
98   329    78   251 0.2370821
99   329    90   239 0.2735562
100  329    78   251 0.2370821
101  329    69   260 0.2097264
102  329    68   261 0.2066869
103  329    90   239 0.2735562
104  329    79   250 0.2401216
105  329    88   241 0.2674772
106  329    76   253 0.2310030
107  329    96   233 0.2917933
108  329    98   231 0.2978723
109  329    74   255 0.2249240
110  329    78   251 0.2370821
111  329    82   247 0.2492401
112  329    80   249 0.2431611
113  329    79   250 0.2401216
114  329    80   249 0.2431611
115  329    87   242 0.2644377
116  329    88   241 0.2674772
117  329    92   237 0.2796353
118  329    87   242 0.2644377
119  329    87   242 0.2644377
120  329    76   253 0.2310030
121  329    96   233 0.2917933
122  329    99   230 0.3009119
123  329    75   254 0.2279635
124  329    99   230 0.3009119
125  329    82   247 0.2492401
126  329    66   263 0.2006079
127  329    76   253 0.2310030
128  329    81   248 0.2462006
129  329    70   259 0.2127660
130  329    84   245 0.2553191
131  329    76   253 0.2310030
132  329    64   265 0.1945289
133  329    76   253 0.2310030
134  329    84   245 0.2553191
135  329    91   238 0.2765957
136  329    73   256 0.2218845
137  329    75   254 0.2279635
138  329    78   251 0.2370821
139  329    96   233 0.2917933
140  329    82   247 0.2492401
141  329    95   234 0.2887538
142  329    85   244 0.2583587
143  329    63   266 0.1914894
144  329    85   244 0.2583587
145  329    73   256 0.2218845
146  329    96   233 0.2917933
147  329    76   253 0.2310030
148  329    82   247 0.2492401
149  329    92   237 0.2796353
150  329    89   240 0.2705167
151  329    88   241 0.2674772
152  329    79   250 0.2401216
153  329    72   257 0.2188450
154  329    75   254 0.2279635
155  329    81   248 0.2462006
156  329    72   257 0.2188450
157  329   103   226 0.3130699
158  329    84   245 0.2553191
159  329    92   237 0.2796353
160  329    84   245 0.2553191
161  329    86   243 0.2613982
162  329    93   236 0.2826748
163  329    83   246 0.2522796
164  329    92   237 0.2796353
165  329    72   257 0.2188450
166  329    62   267 0.1884498
167  329    82   247 0.2492401
168  329    77   252 0.2340426
169  329    76   253 0.2310030
170  329    97   232 0.2948328
171  329    83   246 0.2522796
172  329    83   246 0.2522796
173  329    92   237 0.2796353
174  329    88   241 0.2674772
175  329    74   255 0.2249240
176  329    83   246 0.2522796
177  329    85   244 0.2583587
178  329    98   231 0.2978723
179  329    99   230 0.3009119
180  329    73   256 0.2218845
181  329    83   246 0.2522796
182  329   105   224 0.3191489
183  329    79   250 0.2401216
184  329    80   249 0.2431611
185  329    94   235 0.2857143
186  329    81   248 0.2462006
187  329    75   254 0.2279635
188  329    76   253 0.2310030
189  329    94   235 0.2857143
190  329    89   240 0.2705167
191  329    88   241 0.2674772
192  329    89   240 0.2705167
193  329    84   245 0.2553191
194  329    95   234 0.2887538
195  329    76   253 0.2310030
196  329    86   243 0.2613982
197  329    81   248 0.2462006
198  329    84   245 0.2553191
199  329    87   242 0.2644377
200  329    98   231 0.2978723
201  329    75   254 0.2279635
202  329    95   234 0.2887538
203  329    75   254 0.2279635
204  329    89   240 0.2705167
205  329    81   248 0.2462006
206  329    80   249 0.2431611
207  329    85   244 0.2583587
208  329    81   248 0.2462006
209  329    76   253 0.2310030
210  329    86   243 0.2613982
211  329    86   243 0.2613982
212  329    76   253 0.2310030
213  329    77   252 0.2340426
214  329    78   251 0.2370821
215  329    71   258 0.2158055
216  329    78   251 0.2370821
217  329    82   247 0.2492401
218  329    82   247 0.2492401
219  329    85   244 0.2583587
220  329    81   248 0.2462006
221  329    82   247 0.2492401
222  329    81   248 0.2462006
223  329    99   230 0.3009119
224  329    76   253 0.2310030
225  329    88   241 0.2674772
226  329    77   252 0.2340426
227  329    84   245 0.2553191
228  329    66   263 0.2006079
229  329    70   259 0.2127660
230  329    78   251 0.2370821
231  329    88   241 0.2674772
232  329    93   236 0.2826748
233  329    75   254 0.2279635
234  329    75   254 0.2279635
235  329    87   242 0.2644377
236  329    71   258 0.2158055
237  329    67   262 0.2036474
238  329    82   247 0.2492401
239  329    71   258 0.2158055
240  329    81   248 0.2462006
241  329    77   252 0.2340426
242  329    77   252 0.2340426
243  329    81   248 0.2462006
244  329    72   257 0.2188450
245  329   100   229 0.3039514
246  329    70   259 0.2127660
247  329    72   257 0.2188450
248  329    83   246 0.2522796
249  329    78   251 0.2370821
250  329    82   247 0.2492401
251  329    93   236 0.2826748
252  329    92   237 0.2796353
253  329    82   247 0.2492401
254  329    89   240 0.2705167
255  329    81   248 0.2462006
256  329    83   246 0.2522796
257  329    79   250 0.2401216
258  329    71   258 0.2158055
259  329    72   257 0.2188450
260  329    82   247 0.2492401
261  329    75   254 0.2279635
262  329    84   245 0.2553191
263  329    79   250 0.2401216
264  329    79   250 0.2401216
265  329    81   248 0.2462006
266  329    79   250 0.2401216
267  329    89   240 0.2705167
268  329    77   252 0.2340426
269  329    91   238 0.2765957
270  329    86   243 0.2613982
271  329    85   244 0.2583587
272  329    79   250 0.2401216
273  329    90   239 0.2735562
274  329    83   246 0.2522796
275  329    83   246 0.2522796
276  329    72   257 0.2188450
277  329    78   251 0.2370821
278  329    89   240 0.2705167
279  329    92   237 0.2796353
280  329    74   255 0.2249240
281  329    85   244 0.2583587
282  329    97   232 0.2948328
283  329    91   238 0.2765957
284  329    74   255 0.2249240
285  329    86   243 0.2613982
286  329    73   256 0.2218845
287  329    79   250 0.2401216
288  329    92   237 0.2796353
289  329    87   242 0.2644377
290  329    69   260 0.2097264
291  329    68   261 0.2066869
292  329    90   239 0.2735562
293  329    78   251 0.2370821
294  329    75   254 0.2279635
295  329    81   248 0.2462006
296  329    74   255 0.2249240
297  329    89   240 0.2705167
298  329    79   250 0.2401216
299  329    83   246 0.2522796
300  329    86   243 0.2613982
301  329    71   258 0.2158055
302  329    97   232 0.2948328
303  329    86   243 0.2613982
304  329    86   243 0.2613982
305  329    79   250 0.2401216
306  329    83   246 0.2522796
307  329    67   262 0.2036474
308  329    82   247 0.2492401
309  329    79   250 0.2401216
310  329    80   249 0.2431611
311  329    81   248 0.2462006
312  329    66   263 0.2006079
313  329    81   248 0.2462006
314  329    87   242 0.2644377
315  329   101   228 0.3069909
316  329    90   239 0.2735562
317  329    81   248 0.2462006
318  329    78   251 0.2370821
319  329    88   241 0.2674772
320  329    78   251 0.2370821
321  329    80   249 0.2431611
322  329    82   247 0.2492401
323  329    74   255 0.2249240
324  329    89   240 0.2705167
325  329    96   233 0.2917933
326  329    81   248 0.2462006
327  329    83   246 0.2522796
328  329    65   264 0.1975684
329  329    90   239 0.2735562
330  329    79   250 0.2401216
331  329    86   243 0.2613982
332  329    67   262 0.2036474
333  329    76   253 0.2310030
334  329    82   247 0.2492401
335  329    89   240 0.2705167
336  329    89   240 0.2705167
337  329    86   243 0.2613982
338  329    75   254 0.2279635
339  329    84   245 0.2553191
340  329    88   241 0.2674772
341  329    84   245 0.2553191
342  329    81   248 0.2462006
343  329    89   240 0.2705167
344  329    83   246 0.2522796
345  329    87   242 0.2644377
346  329    80   249 0.2431611
347  329    89   240 0.2705167
348  329    84   245 0.2553191
349  329    79   250 0.2401216
350  329    74   255 0.2249240
351  329    64   265 0.1945289
352  329    75   254 0.2279635
353  329    95   234 0.2887538
354  329    87   242 0.2644377
355  329    88   241 0.2674772
356  329    76   253 0.2310030
357  329    78   251 0.2370821
358  329    78   251 0.2370821
359  329    79   250 0.2401216
360  329    79   250 0.2401216
361  329    96   233 0.2917933
362  329    68   261 0.2066869
363  329    73   256 0.2218845
364  329    97   232 0.2948328
365  329    70   259 0.2127660
366  329    84   245 0.2553191
367  329    89   240 0.2705167
368  329    73   256 0.2218845
369  329    77   252 0.2340426
370  329    82   247 0.2492401
371  329    67   262 0.2036474
372  329    87   242 0.2644377
373  329    80   249 0.2431611
374  329    86   243 0.2613982
375  329    81   248 0.2462006
376  329    69   260 0.2097264
377  329    98   231 0.2978723
378  329    87   242 0.2644377
379  329    74   255 0.2249240
380  329    77   252 0.2340426
381  329    94   235 0.2857143
382  329    85   244 0.2583587
383  329    87   242 0.2644377
384  329    92   237 0.2796353
385  329    73   256 0.2218845
386  329    88   241 0.2674772
387  329    84   245 0.2553191
388  329    97   232 0.2948328
389  329    65   264 0.1975684
390  329    71   258 0.2158055
391  329    88   241 0.2674772
392  329    87   242 0.2644377
393  329    74   255 0.2249240
394  329    91   238 0.2765957
395  329    76   253 0.2310030
396  329    85   244 0.2583587
397  329    74   255 0.2249240
398  329    74   255 0.2249240
399  329    79   250 0.2401216
400  329    83   246 0.2522796
401  329    80   249 0.2431611
402  329   100   229 0.3039514
403  329    88   241 0.2674772
404  329    81   248 0.2462006
405  329    77   252 0.2340426
406  329    83   246 0.2522796
407  329    74   255 0.2249240
408  329    86   243 0.2613982
409  329    74   255 0.2249240
410  329    96   233 0.2917933
411  329    89   240 0.2705167
412  329    84   245 0.2553191
413  329    72   257 0.2188450
414  329    86   243 0.2613982
415  329    90   239 0.2735562
416  329    78   251 0.2370821
417  329    99   230 0.3009119
418  329    72   257 0.2188450
419  329    90   239 0.2735562
420  329    87   242 0.2644377
421  329    96   233 0.2917933
422  329    71   258 0.2158055
423  329    83   246 0.2522796
424  329    83   246 0.2522796
425  329    82   247 0.2492401
426  329    81   248 0.2462006
427  329    80   249 0.2431611
428  329    82   247 0.2492401
429  329    80   249 0.2431611
430  329    81   248 0.2462006
431  329    87   242 0.2644377
432  329    87   242 0.2644377
433  329    77   252 0.2340426
434  329    77   252 0.2340426
435  329    74   255 0.2249240
436  329    85   244 0.2583587
437  329    89   240 0.2705167
438  329    76   253 0.2310030
439  329    81   248 0.2462006
440  329    87   242 0.2644377
441  329    77   252 0.2340426
442  329    90   239 0.2735562
443  329    80   249 0.2431611
444  329    74   255 0.2249240
445  329    84   245 0.2553191
446  329    94   235 0.2857143
447  329    87   242 0.2644377
448  329    76   253 0.2310030
449  329    82   247 0.2492401
450  329    73   256 0.2218845
451  329    79   250 0.2401216
452  329    86   243 0.2613982
453  329    83   246 0.2522796
454  329    73   256 0.2218845
455  329    81   248 0.2462006
456  329    90   239 0.2735562
457  329    69   260 0.2097264
458  329    95   234 0.2887538
459  329    91   238 0.2765957
460  329    90   239 0.2735562
461  329    97   232 0.2948328
462  329    80   249 0.2431611
463  329    85   244 0.2583587
464  329    78   251 0.2370821
465  329    90   239 0.2735562
466  329    82   247 0.2492401
467  329    80   249 0.2431611
468  329    75   254 0.2279635
469  329    74   255 0.2249240
470  329    69   260 0.2097264
471  329    80   249 0.2431611
472  329    85   244 0.2583587
473  329    67   262 0.2036474
474  329    76   253 0.2310030
475  329    71   258 0.2158055
476  329    88   241 0.2674772
477  329    84   245 0.2553191
478  329    74   255 0.2249240
479  329    66   263 0.2006079
480  329    88   241 0.2674772
481  329    85   244 0.2583587
482  329    74   255 0.2249240
483  329    85   244 0.2583587
484  329    86   243 0.2613982
485  329    87   242 0.2644377
486  329    75   254 0.2279635
487  329    84   245 0.2553191
488  329    89   240 0.2705167
489  329    77   252 0.2340426
490  329    78   251 0.2370821
491  329   100   229 0.3039514
492  329    75   254 0.2279635
493  329    84   245 0.2553191
494  329    80   249 0.2431611
495  329    76   253 0.2310030
496  329    86   243 0.2613982
497  329    88   241 0.2674772
498  329    82   247 0.2492401
499  329    84   245 0.2553191
500  329    83   246 0.2522796
501  329    80   249 0.2431611
502  329    80   249 0.2431611
503  329    82   247 0.2492401
504  329    79   250 0.2401216
505  329    86   243 0.2613982
506  329    90   239 0.2735562
507  329    85   244 0.2583587
508  329    81   248 0.2462006
509  329    63   266 0.1914894
510  329    79   250 0.2401216
511  329    93   236 0.2826748
512  329    77   252 0.2340426
513  329    69   260 0.2097264
514  329    80   249 0.2431611
515  329    90   239 0.2735562
516  329    84   245 0.2553191
517  329    77   252 0.2340426
518  329    85   244 0.2583587
519  329    85   244 0.2583587
520  329    87   242 0.2644377
521  329    79   250 0.2401216
522  329    85   244 0.2583587
523  329    72   257 0.2188450
524  329    84   245 0.2553191
525  329    89   240 0.2705167
526  329    82   247 0.2492401
527  329    81   248 0.2462006
528  329    75   254 0.2279635
529  329    73   256 0.2218845
530  329    78   251 0.2370821
531  329    90   239 0.2735562
532  329    88   241 0.2674772
533  329    75   254 0.2279635
534  329    65   264 0.1975684
535  329    92   237 0.2796353
536  329    86   243 0.2613982
537  329    85   244 0.2583587
538  329    87   242 0.2644377
539  329    79   250 0.2401216
540  329    90   239 0.2735562
541  329    80   249 0.2431611
542  329    77   252 0.2340426
543  329    88   241 0.2674772
544  329    74   255 0.2249240
545  329    78   251 0.2370821
546  329    83   246 0.2522796
547  329    87   242 0.2644377
548  329    83   246 0.2522796
549  329    82   247 0.2492401
550  329    72   257 0.2188450
551  329    97   232 0.2948328
552  329    84   245 0.2553191
553  329    76   253 0.2310030
554  329    85   244 0.2583587
555  329    87   242 0.2644377
556  329    80   249 0.2431611
557  329    81   248 0.2462006
558  329    65   264 0.1975684
559  329    69   260 0.2097264
560  329    79   250 0.2401216
561  329    81   248 0.2462006
562  329    91   238 0.2765957
563  329    63   266 0.1914894
564  329    71   258 0.2158055
565  329    96   233 0.2917933
566  329    83   246 0.2522796
567  329    85   244 0.2583587
568  329    93   236 0.2826748
569  329    72   257 0.2188450
570  329    80   249 0.2431611
571  329    78   251 0.2370821
572  329    67   262 0.2036474
573  329    80   249 0.2431611
574  329    88   241 0.2674772
575  329    75   254 0.2279635
576  329    83   246 0.2522796
577  329    89   240 0.2705167
578  329    93   236 0.2826748
579  329    82   247 0.2492401
580  329    82   247 0.2492401
581  329    79   250 0.2401216
582  329    63   266 0.1914894
583  329    87   242 0.2644377
584  329    80   249 0.2431611
585  329    84   245 0.2553191
586  329    84   245 0.2553191
587  329    91   238 0.2765957
588  329    84   245 0.2553191
589  329    92   237 0.2796353
590  329    86   243 0.2613982
591  329    69   260 0.2097264
592  329    97   232 0.2948328
593  329    91   238 0.2765957
594  329    87   242 0.2644377
595  329    91   238 0.2765957
596  329    81   248 0.2462006
597  329    87   242 0.2644377
598  329    80   249 0.2431611
599  329    66   263 0.2006079
600  329    76   253 0.2310030
601  329    88   241 0.2674772
602  329    66   263 0.2006079
603  329    97   232 0.2948328
604  329    85   244 0.2583587
605  329    84   245 0.2553191
606  329    78   251 0.2370821
607  329    91   238 0.2765957
608  329    94   235 0.2857143
609  329    84   245 0.2553191
610  329    85   244 0.2583587
611  329    77   252 0.2340426
612  329    96   233 0.2917933
613  329    75   254 0.2279635
614  329    84   245 0.2553191
615  329    89   240 0.2705167
616  329    72   257 0.2188450
617  329    86   243 0.2613982
618  329    79   250 0.2401216
619  329    87   242 0.2644377
620  329    73   256 0.2218845
621  329    84   245 0.2553191
622  329    84   245 0.2553191
623  329    84   245 0.2553191
624  329    81   248 0.2462006
625  329    78   251 0.2370821
626  329    84   245 0.2553191
627  329    84   245 0.2553191
628  329    88   241 0.2674772
629  329    75   254 0.2279635
630  329    83   246 0.2522796
631  329    82   247 0.2492401
632  329   100   229 0.3039514
633  329   101   228 0.3069909
634  329    84   245 0.2553191
635  329    63   266 0.1914894
636  329   104   225 0.3161094
637  329    74   255 0.2249240
638  329    82   247 0.2492401
639  329    89   240 0.2705167
640  329    79   250 0.2401216
641  329    83   246 0.2522796
642  329    87   242 0.2644377
643  329    88   241 0.2674772
644  329    71   258 0.2158055
645  329    76   253 0.2310030
646  329    85   244 0.2583587
647  329    79   250 0.2401216
648  329    89   240 0.2705167
649  329    93   236 0.2826748
650  329    80   249 0.2431611
651  329    85   244 0.2583587
652  329    89   240 0.2705167
653  329    87   242 0.2644377
654  329    83   246 0.2522796
655  329    79   250 0.2401216
656  329    95   234 0.2887538
657  329    68   261 0.2066869
658  329    85   244 0.2583587
659  329    74   255 0.2249240
660  329    73   256 0.2218845
661  329    75   254 0.2279635
662  329    70   259 0.2127660
663  329    97   232 0.2948328
664  329    86   243 0.2613982
665  329    77   252 0.2340426
666  329    86   243 0.2613982
667  329    79   250 0.2401216
668  329    75   254 0.2279635
669  329    80   249 0.2431611
670  329    98   231 0.2978723
671  329    83   246 0.2522796
672  329    81   248 0.2462006
673  329   105   224 0.3191489
674  329    86   243 0.2613982
675  329    89   240 0.2705167
676  329    90   239 0.2735562
677  329    99   230 0.3009119
678  329    77   252 0.2340426
679  329    81   248 0.2462006
680  329    96   233 0.2917933
681  329    82   247 0.2492401
682  329    73   256 0.2218845
683  329    84   245 0.2553191
684  329    91   238 0.2765957
685  329    87   242 0.2644377
686  329    80   249 0.2431611
687  329    89   240 0.2705167
688  329    89   240 0.2705167
689  329    89   240 0.2705167
690  329    77   252 0.2340426
691  329    86   243 0.2613982
692  329    76   253 0.2310030
693  329    79   250 0.2401216
694  329    77   252 0.2340426
695  329    86   243 0.2613982
696  329    87   242 0.2644377
697  329    93   236 0.2826748
698  329    75   254 0.2279635
699  329    76   253 0.2310030
700  329    88   241 0.2674772
701  329    75   254 0.2279635
702  329    77   252 0.2340426
703  329    73   256 0.2218845
704  329    86   243 0.2613982
705  329    75   254 0.2279635
706  329    77   252 0.2340426
707  329    85   244 0.2583587
708  329    74   255 0.2249240
709  329    88   241 0.2674772
710  329    77   252 0.2340426
711  329    75   254 0.2279635
712  329    99   230 0.3009119
713  329    80   249 0.2431611
714  329    82   247 0.2492401
715  329    91   238 0.2765957
716  329    83   246 0.2522796
717  329    78   251 0.2370821
718  329    71   258 0.2158055
719  329    79   250 0.2401216
720  329    80   249 0.2431611
721  329    74   255 0.2249240
722  329    77   252 0.2340426
723  329    94   235 0.2857143
724  329    77   252 0.2340426
725  329    76   253 0.2310030
726  329    80   249 0.2431611
727  329    76   253 0.2310030
728  329    76   253 0.2310030
729  329    86   243 0.2613982
730  329    87   242 0.2644377
731  329    67   262 0.2036474
732  329    82   247 0.2492401
733  329    85   244 0.2583587
734  329    83   246 0.2522796
735  329    78   251 0.2370821
736  329    80   249 0.2431611
737  329    84   245 0.2553191
738  329    79   250 0.2401216
739  329    74   255 0.2249240
740  329    81   248 0.2462006
741  329    83   246 0.2522796
742  329    79   250 0.2401216
743  329    84   245 0.2553191
744  329    86   243 0.2613982
745  329    83   246 0.2522796
746  329    82   247 0.2492401
747  329    81   248 0.2462006
748  329    77   252 0.2340426
749  329    84   245 0.2553191
750  329    84   245 0.2553191
751  329    81   248 0.2462006
752  329    85   244 0.2583587
753  329    86   243 0.2613982
754  329    82   247 0.2492401
755  329    89   240 0.2705167
756  329    71   258 0.2158055
757  329    88   241 0.2674772
758  329    80   249 0.2431611
759  329    69   260 0.2097264
760  329    96   233 0.2917933
761  329    83   246 0.2522796
762  329    80   249 0.2431611
763  329    70   259 0.2127660
764  329    93   236 0.2826748
765  329    87   242 0.2644377
766  329    79   250 0.2401216
767  329   101   228 0.3069909
768  329    89   240 0.2705167
769  329    77   252 0.2340426
770  329    94   235 0.2857143
771  329    84   245 0.2553191
772  329    74   255 0.2249240
773  329    79   250 0.2401216
774  329    98   231 0.2978723
775  329    77   252 0.2340426
776  329    80   249 0.2431611
777  329    85   244 0.2583587
778  329    88   241 0.2674772
779  329    92   237 0.2796353
780  329    96   233 0.2917933
781  329    73   256 0.2218845
782  329    80   249 0.2431611
783  329    87   242 0.2644377
784  329    87   242 0.2644377
785  329    85   244 0.2583587
786  329    71   258 0.2158055
787  329    68   261 0.2066869
788  329    86   243 0.2613982
789  329    98   231 0.2978723
790  329    80   249 0.2431611
791  329    90   239 0.2735562
792  329    84   245 0.2553191
793  329    93   236 0.2826748
794  329    97   232 0.2948328
795  329    76   253 0.2310030
796  329    98   231 0.2978723
797  329    82   247 0.2492401
798  329    88   241 0.2674772
799  329    93   236 0.2826748
800  329    70   259 0.2127660
801  329    81   248 0.2462006
802  329    83   246 0.2522796
803  329    65   264 0.1975684
804  329    79   250 0.2401216
805  329    75   254 0.2279635
806  329    84   245 0.2553191
807  329    88   241 0.2674772
808  329    89   240 0.2705167
809  329    86   243 0.2613982
810  329    77   252 0.2340426
811  329    82   247 0.2492401
812  329    87   242 0.2644377
813  329    84   245 0.2553191
814  329    77   252 0.2340426
815  329    74   255 0.2249240
816  329    71   258 0.2158055
817  329    80   249 0.2431611
818  329    95   234 0.2887538
819  329    81   248 0.2462006
820  329    88   241 0.2674772
821  329    96   233 0.2917933
822  329    82   247 0.2492401
823  329    93   236 0.2826748
824  329    82   247 0.2492401
825  329    90   239 0.2735562
826  329    79   250 0.2401216
827  329    82   247 0.2492401
828  329    71   258 0.2158055
829  329    83   246 0.2522796
830  329    85   244 0.2583587
831  329    73   256 0.2218845
832  329    90   239 0.2735562
833  329    85   244 0.2583587
834  329    87   242 0.2644377
835  329    89   240 0.2705167
836  329    70   259 0.2127660
837  329    67   262 0.2036474
838  329    80   249 0.2431611
839  329    82   247 0.2492401
840  329    79   250 0.2401216
841  329    72   257 0.2188450
842  329    96   233 0.2917933
843  329    79   250 0.2401216
844  329    76   253 0.2310030
845  329    83   246 0.2522796
846  329    75   254 0.2279635
847  329    87   242 0.2644377
848  329    71   258 0.2158055
849  329    92   237 0.2796353
850  329    90   239 0.2735562
851  329    72   257 0.2188450
852  329    74   255 0.2249240
853  329    88   241 0.2674772
854  329    82   247 0.2492401
855  329    77   252 0.2340426
856  329    92   237 0.2796353
857  329    80   249 0.2431611
858  329    79   250 0.2401216
859  329    79   250 0.2401216
860  329    92   237 0.2796353
861  329    76   253 0.2310030
862  329    91   238 0.2765957
863  329    86   243 0.2613982
864  329    90   239 0.2735562
865  329    80   249 0.2431611
866  329    82   247 0.2492401
867  329    85   244 0.2583587
868  329    78   251 0.2370821
869  329    90   239 0.2735562
870  329    78   251 0.2370821
871  329    78   251 0.2370821
872  329    85   244 0.2583587
873  329    71   258 0.2158055
874  329    77   252 0.2340426
875  329    78   251 0.2370821
876  329    94   235 0.2857143
877  329    82   247 0.2492401
878  329    89   240 0.2705167
879  329    84   245 0.2553191
880  329    79   250 0.2401216
881  329    83   246 0.2522796
882  329    91   238 0.2765957
883  329    82   247 0.2492401
884  329    76   253 0.2310030
885  329    87   242 0.2644377
886  329    89   240 0.2705167
887  329    77   252 0.2340426
888  329    71   258 0.2158055
889  329    78   251 0.2370821
890  329    77   252 0.2340426
891  329    79   250 0.2401216
892  329    94   235 0.2857143
893  329    89   240 0.2705167
894  329    80   249 0.2431611
895  329    69   260 0.2097264
896  329    78   251 0.2370821
897  329    80   249 0.2431611
898  329    85   244 0.2583587
899  329    88   241 0.2674772
900  329    94   235 0.2857143
901  329    83   246 0.2522796
902  329    75   254 0.2279635
903  329    93   236 0.2826748
904  329    73   256 0.2218845
905  329    87   242 0.2644377
906  329    80   249 0.2431611
907  329    79   250 0.2401216
908  329    86   243 0.2613982
909  329    83   246 0.2522796
910  329    92   237 0.2796353
911  329    73   256 0.2218845
912  329    78   251 0.2370821
913  329    98   231 0.2978723
914  329    78   251 0.2370821
915  329    82   247 0.2492401
916  329   104   225 0.3161094
917  329    90   239 0.2735562
918  329    76   253 0.2310030
919  329    83   246 0.2522796
920  329   103   226 0.3130699
921  329    76   253 0.2310030
922  329    81   248 0.2462006
923  329    98   231 0.2978723
924  329    82   247 0.2492401
925  329    89   240 0.2705167
926  329    82   247 0.2492401
927  329    76   253 0.2310030
928  329    75   254 0.2279635
929  329    75   254 0.2279635
930  329    86   243 0.2613982
931  329    80   249 0.2431611
932  329    86   243 0.2613982
933  329    86   243 0.2613982
934  329    87   242 0.2644377
935  329    70   259 0.2127660
936  329    88   241 0.2674772
937  329    81   248 0.2462006
938  329    90   239 0.2735562
939  329    85   244 0.2583587
940  329    74   255 0.2249240
941  329    80   249 0.2431611
942  329    82   247 0.2492401
943  329    69   260 0.2097264
944  329    87   242 0.2644377
945  329    76   253 0.2310030
946  329    96   233 0.2917933
947  329    88   241 0.2674772
948  329    83   246 0.2522796
949  329    72   257 0.2188450
950  329    85   244 0.2583587
951  329    63   266 0.1914894
952  329    87   242 0.2644377
953  329    75   254 0.2279635
954  329    80   249 0.2431611
955  329    74   255 0.2249240
956  329    96   233 0.2917933
957  329    83   246 0.2522796
958  329    89   240 0.2705167
959  329    92   237 0.2796353
960  329    82   247 0.2492401
961  329    85   244 0.2583587
962  329    78   251 0.2370821
963  329    74   255 0.2249240
964  329    77   252 0.2340426
965  329    90   239 0.2735562
966  329    87   242 0.2644377
967  329    93   236 0.2826748
968  329    79   250 0.2401216
969  329    69   260 0.2097264
970  329    74   255 0.2249240
971  329    83   246 0.2522796
972  329    77   252 0.2340426
973  329    76   253 0.2310030
974  329    82   247 0.2492401
975  329    60   269 0.1823708
976  329    94   235 0.2857143
977  329    84   245 0.2553191
978  329    91   238 0.2765957
979  329    76   253 0.2310030
980  329    87   242 0.2644377
981  329    78   251 0.2370821
982  329    85   244 0.2583587
983  329    86   243 0.2613982
984  329    79   250 0.2401216
985  329    71   258 0.2158055
986  329   111   218 0.3373860
987  329    83   246 0.2522796
988  329    84   245 0.2553191
989  329    75   254 0.2279635
990  329    91   238 0.2765957
991  329    78   251 0.2370821
992  329    81   248 0.2462006
993  329    78   251 0.2370821
994  329    72   257 0.2188450
995  329    94   235 0.2857143
996  329    79   250 0.2401216
997  329    76   253 0.2310030
998  329    86   243 0.2613982
999  329    85   244 0.2583587
1000 329    74   255 0.2249240

Sampling Distribution Under No ESP

ggplot(data = guessing_samp_dist,
       mapping = aes(x = prop)) +
  geom_histogram(color = "white",
                 bins = 20)

What value should our sampling distribution be centered around if the receivers are just guessing?

Sampling Distribution Under No ESP

  • How do the study results compare to the sampling distribution under no ESP?
    • How unusual is it to guess correctly 106 out of 329 times if ESP doesn’t exist?
p_hat <- 106 / 329

ggplot(data = guessing_samp_dist,
       mapping = aes(x = prop)) +
  geom_histogram(color = "white",
                 bins = 20) +
  geom_vline(xintercept = p_hat,
             color = "orange",
             size = 2)

  • Do Bem and Honorton have evidence that ESP exists?

Do Reedies Have ESP?

In pairs:

  • Decide who is going to be the sender and who is going to be the receiver.

  • Sender: Think of one of these images.

  • Receiver: Guess which image the sender was thinking of.

  • Now switch roles and do it again!

  • Once you have both played each role, each person should add a tally mark on the chalkboard.

Do Reedies Have ESP?

What do we need to modify in the code to answer the question?

guessing_samp_dist <- do(1000)*rflip(n = 329, prob = 0.25)

p_hat <- 106 / 329

ggplot(data = guessing_samp_dist, mapping = aes(x = prop)) +
  geom_histogram(color = "white", bins = 20) +
  geom_vline(xintercept = p_hat, color = "orange", size = 2)

Hypothesis Testing

Big Idea:

  • Make an assumption about the population parameter.

  • Generate a sampling distribution for a test statistic based on that assumption.

    • Called a null distribution
  • See if the test statistic based on the observed sample aligns with the generated sampling distribution or not.

  • If it does, then we didn’t learn much.

    • (Didn’t prove the parameter equals the assumed value but it is still plausible)
  • If it doesn’t, then we have evidence that our assumption about the parameter was wrong.

ESP Example

Big Idea:

  • Make an assumption about the population parameter.
    • Ex: ESP doesn’t exist. p, probability of guessing correctly, equals 0.25.
  • Generate a sampling distribution for a test statistic based on that assumption.
    • Called a null distribution

ESP Example

Big Idea:

  • See if the test statistic based on the observed sample aligns with the generated sampling distribution or not.
    • Ex: It is in the center-ish of the distribution. It isn’t an unusual value.
  • If it does, then we didn’t learn much. (Didn’t prove the parameter equals the assumed value but it is still plausible)
    • It is still possible that ESP doesn’t exist.

ESP Example

Big Idea:

  • See if the test statistic based on the observed sample aligns with the generated sampling distribution or not.
    • It is far in the tails of the distribution. It is an unusual value.
  • If it doesn’t, then we have evidence that our assumption about the parameter was wrong.
    • We have evidence ESP exists.

Let’s Take a Step Back from Our Last Statement…

  • Two important words in data analysis:

    • Reproducibility
    • Replicability
  • Reproducibility: If I give you the raw data and my write-up, you will get to the exact same final numbers that I did.

    • By using Quarto Documents, we are learning a reproducible workflow.
  • Replicability: If you follow my study design but collect new data (i.e. repeat my study on new subjects), you will come to the same conclusions that I did.

Replication Crisis