# EXAMPLE 7: Introduction to Statistics for Astrophysicists # SS 2012 # JOCHEN WELLER # Exponential PROBABILITY x=seq(0,5,by=0.1) xi=1.0 plot(x,exp(-x/xi)/xi,type='l',xlim=c(0,5),xlab='x',ylab="f(x;xi)",lwd=2) xi2=2.0 lines(x,exp(-x/xi2)/xi2,lwd=2,lty=2) xi3=5.0 lines(x,exp(-x/xi3)/xi3,lwd=2,lty=3) legend("topright",legend=c(paste("xi=",xi),paste("xi=",xi2),paste("xi=",xi3)),lty=c(1,2,3),lwd=c(2,2,2),col=c("black","black","black"))