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};
F[s_,c_,x_] = 1 - E^(-(x/s)^c);

f[s_,c_,x_] = (c (x/s)^(c-1) E^(-(x/s)^c))/s;

error[s_,c_] = Evaluate[Apply[Plus,Table[(F[s,c,n]-cumulative[[n]])^2,{n,1,6}]]];

leasterror = FindMinimum[error[s,c],{s,0.1,0.2,0,4},{c,1,1.1,0,3}]
sopt = s/.leasterror[[2]]; copt = c/.leasterror[[2]];

Fbest[x_] = F[sopt,copt,x];
fbest[x_] = f[sopt,copt,x];
				
up:= Show[Plot[fbest[x],{x,0.001,6}],
			PlotRange->{{0,6.05},{0,0.8}},
			PlotLabel->FontForm["(a)  y = F'(x) = f(x)\n        (p.d.f.)",
				{"Courier",10}],
			AxesOrigin->{-0.15,-0.025},
			Axes->True,AxesLabel->{" x","y"}];
			
down:= Show[Plot[Fbest[x],{x,0.001,6},
			PlotRange->{{0,6.05},{0,1.05}},
			PlotLabel->FontForm["(b)  y = F(x)\n     (c.d.f.)",{"Courier",10}],
			AxesOrigin->{-0.15,-0.025},
			Axes->True,AxesLabel->{" x","y"}],
			ListPlot[datapoints]];
Show[GraphicsArray[{{up},{down}}],
		PlotLabel->"                           Figure 24.10\nPrairie dog survival according to (21)-(22)"]