Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Die sim
sim <- vector() heads <-vector() results <- vector() n = 300 for(i in 1:n) { sim[[i]] <- sample(c(1:6), 1, replace = TRUE) heads[[i]] = length(sim[sim=="1"]) results[[i]] <- heads[[i]]/i } #the plot plot(c(1:n), results[1:n], ylim = c(0,1), pch=16,cex=0.75, col = "skyblue", main = "Proportion of Heads", ylab="Proportion", xlab="Number of Coin Flips", yaxt="n") lines(c(1:n), results[1:n], type = "l", col = "skyblue", lwd=4) abline(h=1/6, col = "darkblue") axis(2, at=seq(0,1,1/6), labels=c("0","1/6","2/6","3/6","4/6","5/6","1"))
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
5 # SUMMARY PART A
3.4.0 / 3.5.2 / 3.5.1 / 3.6.1 / 3.6.5.#
Visualization Test Exercise 6 ggplot
AjusteNaoLinear11-02-21
jcruet_bi variate r regression
histograms for survey stats and fats
Mtcars analysis
Análise de Variâncias DIC e teste de Tukey 1
practica 2
24-08-2020-GradConj
Please log in to post a comment.