Session Ready
Exercise

How is this parameter optimal?

Now sample out of an exponential distribution with \(\tau\) being twice as large as the optimal \(\tau\). Do it again for \(\tau\) half as large. Make CDFs of these samples and overlay them with your data. You can see that they do not reproduce the data as well. Thus, the \(\tau\) you computed from the mean inter-no-hitter times is optimal in that it best reproduces the data.

Note: In this and all subsequent exercises, the random number generator is pre-seeded for you to save you some typing.

Instructions
100 XP
  • Take 10000 samples out of an Exponential distribution with parameter \(\tau_{1/2}\) = tau/2.
  • Take 10000 samples out of an Exponential distribution with parameter \(\tau_{2}\) = 2*tau.
  • Generate CDFs from these two sets of samples using your ecdf() function.
  • Add these two CDFs as lines to your plot. This has been done for you, so hit 'Submit Answer' to view the plot!