x<-c(22,27,32,37,42,47,52,57)
bunbo<-c(138,67,165,154,145,135,143,152)
bunshi<-c(9,2,6,3,2,2,2,1)
(soqw<-bunshi/bunbo)
(result1<-nls(soqw~a+b*x+c*x^2,start=c(a=0.01,b=0,c=0)))
(result2<-nls(soqw~a+b*x+c*x^2,start=c(a=0.01,b=0,c=0),weights=bunbo))
pre1<-predict(result1)
pre2<-predict(result2)
plot(x,soqw,type="l",xlim=c(20,60),ylim=c(0,0.07))
par(new=T)
plot(x,pre1,type="l",col="blue",xlim=c(20,60),ylim=c(0,0.07),ylab="")
par(new=T)
plot(x,pre2,type="l",col="red",xlim=c(20,60),ylim=c(0,0.07),ylab="")

