Skip to content

Commit

Permalink
Add pdf/cdf of a urv
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaakshat committed Oct 21, 2021
1 parent 4bdf16a commit 57175db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ch04.r
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 57175db

Please sign in to comment.