Tutorial A13

1 Modify the coinflip section from lesson A13 to simulate throwing a dice. Throw the dice 100 times and save the outcomes \(X_i\) with \(i = 1, ... , N\) in a list. Plot the result as a histogram.

2 Modify the code further to throw \(N = 10, 100, 1000\) dice and store the mean values \(S_N = \frac{1}{N}\sum_{i=1}^N X_i = \langle X \rangle\) in a list. For each \(N\) repeat the experiment 5000 times and plot the resulting distributions of mean values.

3 Repeat the experiment of task 2 but instead of plotting the distribution of mean values \(S_N\), plot the distribution of \(\sqrt{N}(S_N - \mu)\), where \(\mu\) is the expectation value \(\mu = \frac{1}{M}\sum_k^M w_k X_k\), where \(\omega_k\) and \(X_k\) are the weights and possible outcomes of the random variables, respectively. In the case of a dice the expectation value is \(\mu = (1 + 2 + 3 + 4 + 5 + 6) / 6 = 3.5\). What do you observe?