# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- DF = read.csv("../../Data/chap_1_prob_9.csv") # A histogram/density plot of the raw data (ignoring region): # #postscript("../../WriteUp/Graphics/Chapter1/ex_9_hist_plots.eps", onefile=FALSE, horizontal=FALSE) par(mfrow=c(1,2)) hist( DF$Cost, main='Histogram of Cost', xlab='Cost' ) plot( density( DF$Cost ), main='KDE of Cost' ) par(mfrow=c(1,1)) #dev.off() print( median( DF$Cost ) ) print( max( DF$Cost ) - min( DF$Cost ) )