Skip to content

Commit

Permalink
more writing
Browse files Browse the repository at this point in the history
  • Loading branch information
benyamindsmith committed Oct 29, 2024
1 parent 218ef1d commit 2d91951
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/articles/understanding-prngs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
understanding-prngs: understanding-prngs.html
last_built: 2024-10-29T00:06Z
last_built: 2024-10-29T02:44Z

20 changes: 20 additions & 0 deletions vignettes/understanding-prngs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ runif(10000)|>
hist(main= "0-1 Uniform Random Variables with runif()")
```

## Applying the Inverse Probability Transform to Generate Random Variables

<!--
Define Inverse Probability Transform. Make POC with qnorm
--->
```{r}
library(randngen)
randngen::lcg(seed = 1234, n=10000)|>
range01()|>
qnorm()|>
hist(main= "Normal(0,1) Random Variables using\nscaled randgen::lcg() values and qnorm()")
```

```{r}
set.seed(1234)
runif(10000)|>
qnorm()|>
hist(main= "Normal(0,1) Random Variables using runif() and qnorm()")
```

# References

Expand Down

0 comments on commit 2d91951

Please sign in to comment.