(Please write R code script) Use ‘sample’ function to generate a random vector that follows a multinomial distribution with probability (0.2, 0.3, 0.5).
(Please transcribe R decree script) Use ‘sample’ exercise to beget a purposeless vector that follows a multinomial classification with chance (0.2, 0.3, 0.5).
exp<- scantling(0:2, 10, reinstate = TRUE, prob = c(0.2,0.3,0.5))
exp
=============
See Output
Thanks, permit me perceive if there is any doubts
See Output using multinomial as well
exp<- rmultinom(n=1, size=10, prob=c(0.2,0.3,0.5))
exp
==========================================
See Output using multinomial as well
See Output using multinomial as well