-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aaaakshat
committed
Oct 21, 2021
1 parent
57175db
commit 73aff20
Showing
1 changed file
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
# Chapter 4.3 (Cumulative Distribution Function) | ||
|
||
## CDF of a Gaussian mixture | ||
## 4.10 CDF of a Uniform Random Variable | ||
|
||
# R code to generate the PDF and CDF | ||
x = seq(-5, 10, (15)/1500) | ||
x = seq(-5, 10, (5+10)/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) | ||
|
||
## 4.11 CDF of an exponential random variable | ||
|
||
# R code to generate the PDF and CDF | ||
x = seq(-5, 10, (5+10)/1500) | ||
f = dexp(x, 1/2) | ||
F = pexp(x, 1/2) | ||
plot(x, f, type="n") | ||
lines(x, f, lwd=5) | ||
plot(x, F, type="n") | ||
lines(x, F, lwd=5) |