Skip to content

Commit

Permalink
test only
Browse files Browse the repository at this point in the history
  • Loading branch information
Pius Korner authored and Pius Korner committed Nov 20, 2024
1 parent fadf2d8 commit 3834116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 1.3-distributions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The expected value is $E(x) = np$ and the variance is $Var(x) = np(1-p)$.

```{r, echo=FALSE, fig.cap="Two examples of a binomial distribution. size: number of trials (the argument in the corresponding R function, for example in rbinom, is called size). p: success probability."}
randombinom <- rbinom(100000, size=10, prob=0.3)
histrandombin <- hist(randombinom, breaks=seq(-0.5, 10.5,by=1), plot=FALSE)
histrandombin <- hist(randombinom, breaks=seq(-0.5, 10.5, by=1), plot=FALSE)
par(mfrow=c(1,2), oma=c(0, 2, 0,0))
plot(histrandombin$mids, histrandombin$density, type="h", lwd=5,col="blue", las=1, xlim=c(0, 10), cex.lab=1.2, cex.axis=1,
xlab="size=10, p=0.3", lend="butt", ylab="")
Expand Down

0 comments on commit 3834116

Please sign in to comment.