56k views

### How to sample from a discrete distribution? [duplicate]

Assume I have a distribution governing the possible outcome from a single random variable X. This is something like [0.1, 0.4, 0.2, 0.3] for X being a value of either 1, 2, 3, 4. Is it possible to ...
324 views

419 views

### Approaches for generating synthetic survey data with dependent answers?

I would like to produce synthetic survey data. At the moment I produce independent answers between questions according to an arbitrary discrete distribution as in this question. I want to generate ...
2k views

### Generating data with a pre-specified odds ratio

I have to simulate (in javascript) the likelihood that members of a certain population would have a disease, given a contextual value. All information I have comes from papers that show odds ratios ...
1k views

### Generate random number from a specific probability mass in R

How can I generate sample from a distribution with probability mass $P(X=x)$ in R? I know that probability mass, but it is not from a known distribution, also it is not linear, instead it has a ...
2k views

### Choosing a discrete non-uniform distribution for generating random integers

I have a list $l$ containing integers in the range $[1,max]$ On list $l$ I do an operation $isPresent(x)$ which return true if x...
1 vote
2k views

### Generate bivariate random numbers from joint distribution function

I have an empirical joint distribution function $\hat{F}(x_1,x_2) = Pr(X_1 < x_1, X_2 < x_2)$ Can I generate bivariate random number from this distribution with a certain condition such as \$...
1 vote
1k views

### How to draw random sample from an empirical joint distribution?

I want to draw a random sample from a known joint distribution. what I have now is the number of people in each age and income bracket (as shown in the example below):0.12 0.42 0.06 16 0.08 0.28 0.04 ...