Hi My name is Jeong In Sim, and I'm korean. I'm learning 'R' on my own, so I have a question. I want to make probability density function and cumulative density function when X~Bin(10,0.5) How can I draw graph? Which function do I have to use? I want your help as soon as possible. Thank you [[alternative HTML version deleted]]
Hi see ?rbinom or other distribution functions ?Distributions for plottting see ?plot ?curve and for cdf see ?ecdf and learn from examples in help pages. Regards Petr> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of ??? > Sent: Thursday, May 09, 2013 3:01 PM > To: r-help at r-project.org > Subject: [R] Can you help me sir, > > Hi > My name is Jeong In Sim, and I'm korean. > I'm learning 'R' on my own, so I have a question. > > I want to make probability density function and cumulative density > function when X~Bin(10,0.5) How can I draw graph? Which function do I > have to use? > > I want your help as soon as possible. Thank you > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.
Well, in general, you can use the following functions: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Binomial.html See the examples at section "Examples". You may want to try the following: n<-10 k <- seq(0, n, by = 1) plot (k,dbinom(k,n,0.5,log =FALSE),type="l") plot(k,pbinom(k,n,0.5,log=FALSE),type="l") Was this your question? 2013/5/9 ??? <wjddls2464 at naver.com>:> Hi > My name is Jeong In Sim, and I'm korean. > I'm learning 'R' on my own, so I have a question. > > I want to make probability density function and cumulative density function when X~Bin(10,0.5) > How can I draw graph? Which function do I have to use? > > I want your help as soon as possible. Thank you > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Neumann, Conrad
For information on binomial distribution functions:> ?dbinomFor example:> dbinom(0:10, 10, 0.5)[1] 0.0009765625 0.0097656250 0.0439453125 0.1171875000 0.2050781250 [6] 0.2460937500 0.2050781250 0.1171875000 0.0439453125 0.0097656250 [11] 0.0009765625> pbinom(0:10, 10, 0.5)[1] 0.0009765625 0.0107421875 0.0546875000 0.1718750000 0.3769531250 [6] 0.6230468750 0.8281250000 0.9453125000 0.9892578125 0.9990234375 [11] 1.0000000000 ------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of ??? Sent: Thursday, May 9, 2013 8:01 AM To: r-help at r-project.org Subject: [R] Can you help me sir, Hi My name is Jeong In Sim, and I'm korean. I'm learning 'R' on my own, so I have a question. I want to make probability density function and cumulative density function when X~Bin(10,0.5) How can I draw graph? Which function do I have to use? I want your help as soon as possible. Thank you [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.