random numbers

  1. C

    How does "qpois(1-pvars, 3, .25) " work in R ?

    R code : library(MASS) mu <- rep(0,4) Sigma <- matrix(.7, nrow=4, ncol=4) + diag(4)*.3 rawvars <- mvrnorm(n=10000, mu=mu, Sigma=Sigma) pvars <- pnorm(rawvars) binomvars <- qpois(1-pvars, 3, .25) I have not understood how does qpois(1-pvars, 3, .25) work ? What is the...
  2. L

    Comparing two estimated distributions

    I estimated the density function (adaptive kde) from two samples (one of small size) and the cdf using approxfun() and integrate() in R. Now, I would implement a ks test to know if the two distributions are similar. I guess I have two options: Either, I draw two samples and use the function...
  3. L

    How to generate two random vectors correlated to three existing vectors

    Let's have three vectors that are given and cannot change (M, N and O). I have to generate two random vectors X and Y. The correlation that has to be kept is given by the correlation matrix C. The correlation matrix show the correlation between all the vectors (M, N, O , X and Y). Does anyone...
  4. C

    Using Random Number Table.

    In a random number table , the random numbers are given as first thousand, second thousand, third thousand, and so on. Every thousand has 25 rows and 1 to 4, 5 to 8 up to 37 to 40 columns. Suppose i have to draw a sample of size 40 from a population of 10000 and I am using the 1 to 5...
  5. B

    Sampling a hemisphere using an arbitary distribtuion

    I am writing a ray tracer and I wish to fire rays from a point **p** into a hemisphere above that point according to some distribution. 1) I have derived a method to uniformly sample within a solid angle (defined by theta) above **p** [1] \phi = 2\pi\xi_1 \alpha = \arccos...
  6. S

    Probability that a set of numbers is non-random?

    Hello, I'm wondering if anyone knows the answer to this: For a set of X numbers with a median of Y and a standard deviation of Z, where a set determined randomly according to a Gaussian distribution would have a median of 0, what is the probability that the median Y indicates that the set...