Random Numbers in R: Binomial Distribution

  • Thread starter Thread starter MaxManus
  • Start date Start date
  • Tags Tags
    Numbers Random
AI Thread Summary
To generate random numbers representing the number of sick individuals in a population using R's binomial distribution, the command "rbinom(n, size, prob)" is recommended, where 'n' is the number of observations, 'size' is the number of trials, and 'prob' is the probability of success (sick individual). Users can refer to resources like r-tutor.com for a deeper understanding of binomial distributions in R. The discussion emphasizes the importance of correctly defining parameters to achieve accurate simulations. Additional links provided offer further guidance on the topic. Understanding these commands is crucial for effective statistical analysis in R.
MaxManus
Messages
268
Reaction score
1
n is the population
p is the probability for one person to be sick
y is the numbers who are sick
I want to use R to generate random y. Binomial distribution. Does anyone know which command?
 
Physics news on Phys.org
Yes, thanks for the help.
 
Back
Top