Data and R code used by Chapter Chiou, S., Kang, S., and Yan, J. (2015): Change point analysis of top baseball batting average. In D. K. Dey and J. Yan (eds.) Extreme Value Modeling and Risk Analysis: Methods and Applications, Taylor & Francis BattingAverages.csv: Top ten batting averages each year during 1876--2013 from Major League Baseball in the United States. gevFit.R: a sligtly modified gev.fit function from package ismev (optim was replaced with spg from package BB for better optimization) analysis.R: R script that does the analyses and plotting in the chapter. it depends on package: "ismev", "BB", "ggplot2", "splines", "SVMMaj", "grid" and "gridExtra" as well as gevFit.R. The main functions include 1) "isp" for choosing the optimal knot; 2) "getL" for computing likelihood; and 3) "hytest" for computing p-value.