Analysis in R: Introduction to Probability Distribution Commands
This section introduces commands for the normal, binomial, chi-square, and F distributions.
<おすすめのRに関する書籍です>
現場ですぐに使える! 最新R言語プログラミング逆引き大全323の極意
323項目の逆引きテクニック集。tidyverseやtidymodelsといったモダンな書き方もカバーしている。
Command
See the command and package help for details.
###normal distribution#####
Nomal <- dnorm(x = 1:10, mean = 5, sd = 1)
#Plot
plot(1:10, Nomal, type = "l")
#######
###binomial distribution#####
Binomial <- dbinom(x = 1:20, size = 30, prob = 0.25)
#Plot
plot(1:20, Binomial, type = "l")
#######
###chi-square distribution#####
Chisquare <- dchisq(x = 1:20, df = 10)
#Plot
plot(1:20, Chisquare, type = "l")
#######
###F distribution#####
FDist <- df(x = 1:20, df1 = 10, df2 = 20)
#Plot
plot(1:20, FDist, type = "l")
#######I hope this makes your analysis a little easier !!
スポンサーリンク