# Questions tagged [sampling]

Creating samples from a well-specified population using a probabilistic method and/or producing random numbers from a specified distribution. As this tag is ambiguous, please consider [survey-sampling] for the former and [monte-carlo] or [simulation] for the latter. For questions regarding creating random samples from known distributions, please consider using the [random-generation] tag.

430 questions
Filter by
Sorted by
Tagged with
113k views

### Why does a 95% Confidence Interval (CI) not imply a 95% chance of containing the mean?

It seems that through various related questions here, there is consensus that the "95%" part of what we call a "95% confidence interval" refers to the fact that if we were to exactly replicate our ...
• 13.9k
40k views

### Central limit theorem for sample medians

If I calculate the median of a sufficiently large number of observations drawn from the same distribution, does the central limit theorem state that the distribution of medians will approximate a ...
• 1,077
32k views

### Statistical inference when the sample "is" the population

Imagine you have to do reporting on the numbers of candidates who yearly take a given test. It seems rather difficult to infer the observed % of success, for instance, on a wider population due to the ...
• 1,251
36k views

### Explanation of finite population correction factor?

I understand that when sampling from a finite population and our sample size is more than 5% of the population, we need to make a correction on the sample's mean and standard error using this formula: ...
• 1,507
100k views

### Why is the sampling distribution of variance a chi-squared distribution?

The statement The sampling distribution of the sample variance is a chi-squared distribution with degree of freedom equals to $n-1$, where $n$ is the sample size (given that the random variable of ...
• 5,152
21k views

### Calculating required sample size, precision of variance estimate?

Background I have a variable with an unknown distribution. I have 500 samples, but I would like demonstrate the precision with which I can calculate variance, e.g. to argue that a sample size of 500 ...
• 3,841
2k views

### Why is it that if you undersample or oversample you have to calibrate your output probabilities?

There are a number of stackexchange posts saying that you have to calibrate your probabilities if you oversample and undersample like 1,2. But my question is why? Lets use an example of detecting spam ...
• 329
37k views

### Generating data with a given sample covariance matrix

Given a covariance matrix $\boldsymbol \Sigma_s$, how to generate data such that it would have the sample covariance matrix $\hat{\boldsymbol \Sigma} = \boldsymbol \Sigma_s$? More generally: we are ...
• 1,674
13k views

### Size of bootstrap samples

I'm learning about bootstrapping as a means of estimating the variance of a sample statistic. I have one basic doubt. Quoting from http://web.stanford.edu/class/psych252/tutorials/doBootstrapPrimer....
• 243
29k views

### What is the standard error of the sample standard deviation?

I read from there that the standard error of the sample variance is $$SE_{s^2} = \sqrt{\frac{2 \sigma^4}{N-1}}$$ What is the standard error of the sample standard deviation? I'd be tempted to guess ...
• 5,152
7k views

### Computation of the marginal likelihood from MCMC samples

This is a recurring question (see this post, this post and this post), but I have a different spin. Suppose I have a bunch of samples from a generic MCMC sampler. For each sample $\theta$, I know the ...
• 5,226
923 views

### Determine if a heavy tailed distributed process has improved significantly

I observe processing times of a process before and after a change in order to find out, if the process has improved by the change. The process has improved, if the processing time is reduced. The ...
• 233
116k views

### Is a sample covariance matrix always symmetric and positive definite?

When computing the covariance matrix of a sample, is one then guaranteed to get a symmetric and positive-definite matrix? Currently my problem has a sample of 4600 observation vectors and 24 ...
• 1,078
8k views

• 6,187
10k views

### Sample size for categorical data

I have a population of phone calls - 200,000. There are different reasons for each call, but lets assume the number of reasons is known. i.e. 7 different call reasons: 1) Check on order 2) Cancel ...
• 41
14k views

### Is sampling relevant in the time of 'big data'?

Or more so "will it be"? Big Data makes statistics and relevant knowledge all the more important but seems to underplay Sampling Theory. I've seen this hype around 'Big Data' and can't help wonder ...
• 14.8k
15k views

### Difference between Randomization test and Permutation test

In the literature the terms Randomization and Permutation are used interchangeably. With many authors stating "Permutation (aka randomization) tests", or vice versa. At best I believe the difference ...
7k views

### How can I estimate unique occurrence counts from a random sampling of data?

Let's say I have a large set of $S$ values which sometimes repeat. I wish to estimate the total number of unique values in the large set. If I take a random sample of $T$ values, and determine that ...
• 370
11k views

### How does the proof of Rejection Sampling make sense?

I am taking a course on Monte Carlo methods and we learned the Rejection Sampling (or Accept-Reject Sampling) method in the last lecture. There are a lot of resources on the web which shows the proof ...
• 2,298
3k views

### How to calculate a sample size for validating correct/incorrectness of records in a data table?

I have read through existing answers on CrossValidated (plus elsewhere online) and can't find what I'm looking for, but do please point me to existing sources if I've missed them. Let's say I have a ...
44k views

### What exactly does 'representative sample' refer to?

When reading passages like the following: Based on a representative sample of 88 recent raids, we show that the Turkana sustain costly cooperation in combat at a remarkably large scale, at ...
• 3,147
5k views

### Simulate from Kernel Density Estimate (empirical PDF)

I have a vector X of N=900 observations that are best modeled by a global bandwidth Kernel density estimator (parametric models, ...
• 6,187
4k views

### Acceptance-Rejection Method Acceptance Probability Proof

I did not fully understand the proof of the acceptance probability. The acceptance-rejection algorithm is described as follows: suppose you have RVs $X$ and $Y$ with densities $f$ and $g$, ...
• 95
632 views

### How to estimate $P(x\le0)$ from $n$ samples of $x$?

Suppose, we have $n$ samples $x_i$ of a random variable: $$x \sim \mathcal N(\mu,\sigma^2)$$ Based on the samples, we want to estimate the probability that $x$ is negative: $$P(x\le0)$$ Intuitively, ...
• 1,230
4k views

### Sampling from conditional copula

I am having trouble finding anything on sampling from conditional copulas. I am only interested in the bivariate case. So, if $C(u,v)$ is my copula, I want to sample from it given a specific ...
• 73
315 views

### Using Rule of Three to obtain confidence interval for a binomial population

I have a large population of data instances (say, 1000 instances) that are either of class1 or of class2. I would like to obtain ...
• 171
3k views

### How to interpret the margin of error in a poll?

Recently the media reported on a political poll that stated that "46% of Republican voters in Mississippi think that interracial marriage should be illegal". One example story (of many around the '...
• 161
9k views

### Identifying the population and samples in a study

I apologise for the silliness of this question. I ran an e-learning experiment using a class of undergrads. Participation was voluntary, so only half of the class participated. I know that my sample ...
92k views

### How to sample from a normal distribution with known mean and variance using a conventional programming language?

I've never had a course in statistics, so I hope I'm asking in the right place here. Suppose I have only two data describing a normal distribution: the mean $\mu$ and variance $\sigma^2$. I want to ...
• 635
9k views

### The "Amazing Hidden Power" of Random Search?

I have the following question that compares random search optimization with gradient descent optimization: Based on the (amazing) answer provided over here Optimization when Cost Function Slow to ...
Suppose you had a bag with $n$ tiles, each with a letter on it. There are $n_A$ tiles with letter 'A', $n_B$ with 'B', and so on, and $n_*$ 'wildcard' tiles (we have $n = n_A + n_B + \ldots + n_Z + n_*... • 14.9k 25 votes 7 answers 13k views ### Can someone help to explain the difference between independent and random? In statistics, does independent and random describe the same characteristics? What's the difference between them? We often come across the description like "two independent random variables" or "... • 2,121 25 votes 2 answers 6k views ### Did I just invent a Bayesian method for analysis of ROC curves? Preamble This is a long post. If you're re-reading this, please note that I've revised the question portion, though the background material remains the same. Additionally, I believe that I've devised ... • 92.5k 19 votes 4 answers 1k views ### How to generate a non-integer amount of consecutive Bernoulli successes? Given: A coin with unknown bias$p$(Head). A strictly positive real$a > 0$. Problem: Generate a random Bernoulli variate with bias$p^{a}\$. Does anyone know how to do this? For instance, when ...
I am trying to generate random samples from a custom pdf using R. My pdf is: $$f_{X}(x) = \frac{3}{2} (1-x^2), 0 \le x \le 1$$ I generated uniform samples and then tried to transform it to my custom ...