ClearAll;Clear[f1];Clear[f2];
$DefaultFont = {"Times-Roman",10};
Needs["Statistics`DataManipulation`"];
Needs["Graphics`Graphics`"];
cumulative = {312/545,413/545,487/545,522/545,537/545,1};
datapoints = {{0,0},{1,312/545},{2,413/545},
			  {3,487/545},{4,522/545},{5,537/545},{6,1}};
density = {312/545,101/545,74/545,35/545,15/545,8/545};
bound[z_,a_,b_]:= Which[z<a,a,z>b,b,a<=z<=b,z];
F1[A_,c_,x_] = 4 A c x/(1 + A c^2) - A x^2;
F2[A_,c_,x_] = 1 - ((1 - A c^2)^2 (c/x)^(2A c^2/(1 - A c^2)))/(1 + A c^2);

f1[A_,c_,x_] = 2 A(c-x) + 2 A c(1 - A c^2)/(1 + A c^2);
f2[A_,c_,x_] = (2A c(1 - A c^2) (c/x)^((1 + A c^2)/(1 - A c^2)))/(1 + A c^2);

FF[a_,c_,x_] = Which[x<=1.5,F1[a,c,x],x>1.5,F2[a,c,x]];

error[a_,c_] = Evaluate[Apply[Plus,Table[(FF[a,c,n]-cumulative[[n]])^2,{n,1,6}]]];

minimizer[a_]:= Max[c/.FindMinimum[error[a,c],{c,1.85,1.86,1,2}][[2]],1.7];
leasterror[a_]:= error[a,minimizer[a]];
				
topleft = Show[Plot[error[0.12,c],{c,1.7,2},PlotRange->{{1.69,2},{0.006,0.035}},
			   AxesOrigin->{1.68,0.0055},AxesLabel->{"c","z"},
			   Ticks->{{1.7,1.8,1.9,2},{0.01,0.02,0.03}},
			   PlotLabel->"(a) z  =  S(0.12, c)"],
			   Graphics[Disk[{minimizer[0.12],leasterror[0.12]},{0.0035,0.0005}]]];
			   
topright = Show[Plot[error[0.13,c],{c,1.7,2},PlotRange->{{1.69,2},{0.006,0.035}},
			   AxesOrigin->{1.68,0.0055},AxesLabel->{"c","z"},
			   Ticks->{{1.7,1.8,1.9,2},{0.01,0.02,0.03}},
			   PlotLabel->"(b) z  =  S(0.13, c)"],
			   Graphics[Disk[{minimizer[0.13],leasterror[0.13]},{0.0035,0.0005}]]];
			   			   
bottomleft = Show[Plot[error[0.14,c],{c,1.7,2},PlotRange->{{1.69,2},{0.006,0.035}},
			   AxesOrigin->{1.68,0.0055},AxesLabel->{"c","z"},
			   Ticks->{{1.7,1.8,1.9,2},{0.01,0.02,0.03}},
			   PlotLabel->"(c) z  =  S(0.14, c)"],
			   Graphics[Disk[{minimizer[0.14],leasterror[0.14]},{0.0035,0.0005}]]];
			   			   
bottomright = Show[Plot[error[0.15,c],{c,1.7,2},PlotRange->{{1.69,2},{0.006,0.035}},
			   AxesOrigin->{1.68,0.0055},AxesLabel->{"c","z"},
			   Ticks->{{1.7,1.8,1.9,2},{0.01,0.02,0.03}},
			   PlotLabel->"(d) z  =  S(0.15, c)"],
			   Graphics[Disk[{minimizer[0.15],leasterror[0.15]},{0.0035,0.0005}]]];
			   			   
Show[GraphicsArray[{{topleft,topright},{bottomleft,bottomright}}],
				  PlotLabel->"Figure 24.7"]