Assume our data, 1, 2,. . ., n, is uniform on the interval [,] (Â is an unknown parameter). Set max to be the maximum value in the data set. Then the quantity max/Â is pivotal with distribution
Thus(max/ ) =  n . As  is always bigger than max(), we can solve for  n = α and get that  is in the interval [max,max /] with probability 1 − α.
Use this fact to find a 90% confidence interval for the number of entries in the 2002 New York City Marathon. The place variable from the data set nyc.2002 contains the place of the runner in the sample and is randomly sampled from all the possible places.
Figure 8.4: Fluctuating presidential approval ratings in United States from early 2010 through spring 2013.