**QUESTION**

Text

Image

Question 7: To begin simulating, we should start by creating an array which has two items in it. The first item should be the proportion of times, assuming the null model is true, a TT practictioner picks the correct hand. The second item should be the proportion of times, under the same assumption, that the TT practicioner picks the incorrect hand. Assign model_proportions to this array. After this, simulate, using the sample_proportions function, Emily running through this experiment 210 times (as done in real life), and assign the proportion of correct answers to simulation_proportion . Lastly, define one_test_statistic to the test statistic of this one simulation. In [10]: model_proportions $=\ldots$ simulation_proportion $=\ldots$ one_test_statistic $=\ldots$ one_test_statistic Model_proportions $=\ldots$ simulation_proportion $=\ldots$ one_test_statistic $=\ldots$ one_test_statistic In [11]: $M \ldots-o k \cdot \operatorname{grade}\left(' q 7^{\prime}\right)$ Question 8: Let's now see what the distribution of test statistics is actually like under our fully specified model. Assign simulated_test_statistics to an array of 1000 test statistics that you simulated assuming the null hypothesis is true. Hint: This should follow the same pattern as normal simulations, in combination with the code you did in the previous problem. In [ ] : In [13]: In [14]: Mum_repetitions $=1000$ num_guesses $=210$ simulated_test_statistics $=\ldots$ for ... in .... $\ldots$ M num_repetitions $=1000$ num_guesses $=210$ simulated_test_statistics $=\ldots$ for ... in ...: ... \[ M_{-}=\text {ok.grade }\left(' \mathrm{q}^{\prime}\right. \text { ') } \] Let's view the distribution of the simulated test statistics under the null, and visually compare how the observed test statistic lies against the rest. M $t=$ Table().with_column('Simulated Test Statistics', simulated_test_statistics) t.hist() plt.scatter(observed_test_statistic, 0 , color='red', s=30) H $t=$ Table().with_column('Simulated Test Statistics', simulated_test_statistics) t.hist() plt.scatter(observed_test_statistic, 0 , color='red', $s=30$ ) We can make a visual argument as to whether or not we believe the observed test statistic is likely to occur under the null, or we can use the definition of pvalues to help us make a more formal argument.