mirror of
https://github.com/ArthurDanjou/ArtStudies.git
synced 2026-01-26 15:54:18 +01:00
12 lines
239 B
Plaintext
12 lines
239 B
Plaintext
# Exercise 2 : Exponential distribution and related distributions
|
|
|
|
```{r}
|
|
n <- 10000
|
|
u <- runif(n)
|
|
x <- -1/2 * log(1-u)
|
|
hist(x, breaks = 50, freq = FALSE)
|
|
curve(dexp(x, rate = 2), add = TRUE, col = "red")
|
|
|
|
qqplot(x, rexp(n, rate = 2))
|
|
```
|