diff --git a/ch04.r b/ch04.r new file mode 100644 index 0000000..c0ee293 --- /dev/null +++ b/ch04.r @@ -0,0 +1,12 @@ +# Chapter 4.3 (Cumulative Distribution Function) + +## CDF of a Gaussian mixture + +# R code to generate the PDF and CDF +x = seq(-5, 10, (15)/1500) +f = dunif(x, -3, 4) +F = punif(x, -3, 4) +plot(x, f, type="n") +lines(x, f, lwd=5) +plot(x, F, type="n") +lines(x, F, lwd=5)