search for: xprob

Displaying 2 results from an estimated 2 matches for "xprob".

Did you mean: prob
1999 Nov 22
1
variance?,...
hi I'm learning R and making some examples. One of them is that for given distribution I show density function, distribution function expected value and variance(?). I know EX <- function(xval,xprob) sum( (xval*xprob) ); where xval is vector of values and xprob vector of probabalities, but DX <- function(xval,xprob) EX((xval^2),xprob) - (EX(xval,xprob))^2; doesn't work as I thought. I've looked intto FAQs and archives but my question is probably too simple. Can somebody tell me wha...
2009 Mar 21
2
limiting simulated animal movement
Hi, I am trying to simulate animal movement in a gridded landscape made up of cells. At each time step (iteration), the animal moves from one cell to another in a random fashion. This is how I am simulating movement, where a and b are the x,y co-ordinates of the animal at the previous time step: for (i in 1:no.of.steps){ direction <- sample(1:8, 1) if(direction == 1){ a <- a b <- b -