Let \(D_i\) be a random digit chosen uniformly from \(\{0,1,2,3,4,5,6,7,8,9\}\). Assume that each of the \(D_i\) are independent.

Let \(X_i\) be the last digit of \(D_i^2\). So if \(D_i=9\) then \(D_i^2=81\) and \(X_i=1\). Define \(\bar X_n\) by

\[\bar X_n = \frac{X_1 + \cdots+X_n}{n}\]

- Predict the value of \(\bar X_n \) when \(n\) is large.
- Find the number \(\epsilon\) such that for \(n=10,000\) the chance that you prediction is off by more than \(\epsilon\) is about 1/200.
- Find approximately the least value of \(n\) such that your prediction of \(\bar X_n\) is correct to within 0.01 with probability at least 0.99 .
- If you just had to predict the first digit of \(\bar X_{100}\), what digit should you choose to maximize your chance of being correct, and what is that chance ?

[Pitman p206, #30]