[R] Interpreting R -results for Bivariate Normal

2009-06-07 Thread beetle2
HI Guys, I know that this forum is not for homework but I am trying to interpret R output code. I was just wondering if someone might be able to help. I have been given the following. For (X1,X2) distributed bivariate normal with parameters mu1 = 5.8 mu2 = 5.3 sd1 = sd2 = 0.2 and p = 0.6

Re: [R] Plot bivariate joint pdf

2009-05-13 Thread beetle2
quot;) Worked a real treat. Thankyou all Ben Bolker wrote: > > > > beetle2 wrote: >> >> For a homework question. >> I was wondering if rcmdr has a function to plot a graph of a bivariate >> function of X and Y. >> I have a function with joint pdf >

Re: [R] Overlay cdf

2009-05-13 Thread beetle2
e probability", col = "red", line = 2.5) > > x0 <- c(0, sort(Sample)) > p0 <- 0:1000/1000 > lines(x0, p0, type = "S", col = "blue") > > > Bill Venables > http://www.cmis.csiro.au/bill.venables/ > > > -Original Message

[R] Overlay cdf

2009-05-12 Thread beetle2
Hi, Is it possible to overlay a cummulative distribution function on a histogram of a gamma distribuition. I have a gamma function Sample = rgamma(1000,2.5,.8)+1.5 hist(Sample) regards -- View this message in context: http://www.nabble.com/Overlay-cdf-tp23515551p23515551.html Sent from th

Re: [R] Plot bivariate joint pdf

2009-05-11 Thread beetle2
2009, at 9:46 AM, Ben Bolker wrote: > >> >> >> >> beetle2 wrote: >>> >>> For a homework question. >>> I was wondering if rcmdr has a function to plot a graph of a >>> bivariate >>> function of X and Y. >>> I have

[R] Plot bivariate joint pdf

2009-05-11 Thread beetle2
For a homework question. I was wondering if rcmdr has a function to plot a graph of a bivariate function of X and Y. I have a function with joint pdf fX,Y(x,y) = x+y for 0 x <- seq(0,1,.001) > y <- seq(0,1,.001) > r = x+y > plot(r) but it seems to just add them together say .2+.2 .3+.3 not ot

Re: [R] Binomial simulation

2009-04-19 Thread beetle2
Hi All, Thank you for all your help. In future I will state if it's homework related. regards Brendan beetle2 wrote: > > Hi Guy's > I was wondering if someone could point me in the right direction. > > dbinom(10,1,0.25) > > I am using dbinom(10,1,0.25) to

Re: [R] Binomial simulation

2009-04-19 Thread beetle2
0.004 [1] 0 [1] 0 [1] 0 > Thanks for pointing me to the rbinom() function regards Brendan beetle2 wrote: > > Hi Guy's > I was wondering if someone could point me in the right direction. > > dbinom(10,1,0.25) > > I am using dbinom(10,1,0.25) to c

Re: [R] Binomial simulation

2009-04-19 Thread beetle2
I'm thinking I will just use: results <- rbinom(1000, 10, .25) d = sum(results == 0 ) df = (d/1000) df And do each individually beetle2 wrote: > > Hi Guy's > I was wondering if someone could point me in the right direction. > > dbinom(10,1,0.25) > &g

Re: [R] Binomial simulation

2009-04-19 Thread beetle2
Sorry guys one quick question I've graphed the histogram with hist(rbinom(n = 1000, size = 10, prob = 0.25)) How to I sum the individual values 0 to 12? regards Brendan beetle2 wrote: > > Hi Guy's > I was wondering if someone could point me in the right direction. > >

Re: [R] Binomial simulation

2009-04-19 Thread beetle2
prob = 0.25) > > in that case and compare the relative frequencies. > > Btw, there is a small chance of getting a 0. Are you sure the > instructor (or whoever has issued the orders) wants only from 1:10? > > HTH! > Ranjan > > On Fri, 17 Apr 2009 22:23:11 -0700 (

Re: [R] Binomial simulation

2009-04-18 Thread beetle2
Not being entirely sure what you mean, I think rbinom(1000, 10, .25) may be what you want. Hi, Thanks for your reply. It is close to that but I need to know the probabilty of how many judges pick a certain brand. Just say x= 6 judges pick brand A which has P=0.25. Using R it would be: > db

[R] Binomial simulation

2009-04-17 Thread beetle2
Hi Guy's I was wondering if someone could point me in the right direction. dbinom(10,1,0.25) I am using dbinom(10,1,0.25) to calculate the probabilty of 10 judges choosing a certain brand x times. I was wondering how I would go about simulating 1000 trials of each x value ? regards Brendan -