Linked Questions

3 votes
1 answer
992 views

From unevenly spaced values, a normal distribution that sums to the mean

I have input data that is $N$ items and each has several properties, one of which is called, say, $P$. Their values of $P$ are unevenly spaced between 0 and 1, and may even repeat between items. For ...
DrSandwich's user avatar
1 vote
0 answers
2k views

How to simulate data in R given mean, median, and range?

I would like to simulate n numbers (all within the range between a and b, n being an even number) using R, and the mean (u) and median (m) is given. If I use runif then the standard deviation is ...
asdf's user avatar
  • 11
1 vote
2 answers
201 views

How to generate normal variates subject to mixed constraints?

I want to randomly generate 1000 normal variates (using rnorm, e.g.) that have mean 100. 25% of the 1000 numbers should be over 110. How can I do this in ...
rlost's user avatar
  • 11
1 vote
2 answers
660 views

how to generate random data based on simple statistical meassures

0 I currently have a test data set that has 500k data points. I have an algorithm that process that data and returns some information. In order to establish the statistical significance of the ...
lucas rodriguez's user avatar
3 votes
1 answer
409 views

Simulating population-level logistic regression model with pre-specified prevalence

I'm interested in simulating the following prospective, population-based model for binary outcome $Y_i$, and independent subjects $i=1,\dots,N$: $$ \Pr(Y_i=1\mid X_i,G_i)=\frac{1}{1+\exp(-(\alpha_0 + ...
stats134711's user avatar
4 votes
1 answer
212 views

Generate nonnegative variates with mean 1 and specified variance-covariance

Problem In several applications in surveys, it would be helpful to be able to generate a set of $R$ $n$-dimensional variates with the following properties: Has mean vector $1$ Has a specified ...
bschneidr's user avatar
  • 506
1 vote
1 answer
107 views

How can I shift the average probability keeping constraint (0.0:1.0)?

I have a large datasets of values that range from 0 to n. I am interpreting the values as probabilities for a later pseudo-random selection process. To make the values serve as probabilities, I ...
philologon's user avatar

15 30 50 per page
1
2