# Tag Info

### Why is random sampling good?

You seem to be conflating the idea of random sampling with the separate question of whether objects are sampled with our without replacement. The first method you describe is a simple-random-sample ...

### What distribution to sample X from to get an uniform distribution in Y?

maybe i misunderstand your question, but why don't you sample from a uniform distribution and set X to the arccos of your samples? in R, this would be ...

### What distribution to sample X from to get an uniform distribution in Y?

I suspect the difficulty you are having is in the generation of $x$ from $f(x) \propto |\sin(x)|$. I have coded a very simple acceptance-rejection random number generator in R that will do the job: <...

### Can I take a random sample of my very large data set to overcome non-independence?

I will add a couple of points to Tim's answer, focussing on the original question, which was "My question is - is this valid? Am I missing anything here?". I think the approach can be valid, ...
Accepted

### How to sample from a custom heavy tailed (e.g. custom Cauchy) distribution?

Because $Z$ is symmetric around $0$ and $|Z|$ has a generalized beta prime distribution, there is a simple algorithm to obtain random values of $Z$ efficiently: Step 1: Draw a random value $Y$ from a ...
Accepted

### Can I take a random sample of my very large data set to overcome non-independence?

If you downsample time-series data it would not remove the dependence, it would just dilute it. Say that your data follows the relationship $$y_{t+1} = f(y_{t}) + \varepsilon_{t+1}$$ so the current ...

### Markov Chain Monte Carlo with known normalisation

Another way of looking at the issue of approximating$$\mathfrak I = \sum_{x\in\mathfrak X} p(x)O(x)$$by stochastic techniques is to aim at adding primarily large values of $p(x)O(x)$. Assuming no ...

### Why is random sampling good?

The Central Limit Theorem may be the theory you're looking for. It shows that random sample means follow a Normal distribution (even if the population isn't Normally distributed) and that allows us ...
Accepted

### Logistic regression simulation with respect to event occurrence (prevalence)

You have an array of explanatory variables $(x_1, x_2, \ldots, x_n)$ ($n=20000$) and a model that assigns a probability to each $x_i.$ You seek a subarray of these variables that has a mean ...

### Why is random sampling good?

A non-random sample may be good for a particular purpose, or it may be bad. A random sample can be shown with high probability to be "good" for many purposes. In particular, in statistics, ...
1 vote

### What distribution to sample X from to get an uniform distribution in Y?

The question doesn't require a specific programming language, which is fine, but I noted that the OP's plot looks like the default style of matplotlib. @jbowman has given a useful r implementation. ...
1 vote
Accepted

### Choosing an equal number of samples from each strata - what is this called?

This would be a type of "disproportional sampling". In particular it would be "equal allocation". I've never tried it, but from this Stack Overflow question, https://stackoverflow....

Only top scored, non community-wiki answers of a minimum length are eligible