Skip to main content

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.

Filter by
Sorted by
Tagged with
307 votes
16 answers
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 ...
Mike Lawrence's user avatar
88 votes
5 answers
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 ...
user1728853's user avatar
  • 1,077
57 votes
5 answers
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 ...
pbneau's user avatar
  • 1,251
44 votes
4 answers
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: ...
Sara's user avatar
  • 1,507
51 votes
1 answer
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 ...
Remi.b's user avatar
  • 5,152
21 votes
4 answers
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 ...
Abe's user avatar
  • 3,841
6 votes
1 answer
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 ...
woowz's user avatar
  • 329
36 votes
3 answers
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 ...
Kees Mulder's user avatar
  • 1,674
11 votes
2 answers
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....
user1265125's user avatar
43 votes
1 answer
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 ...
Remi.b's user avatar
  • 5,152
31 votes
1 answer
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 ...
lacerbi's user avatar
  • 5,226
12 votes
3 answers
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 ...
Christian's user avatar
  • 233
68 votes
5 answers
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 ...
Morten's user avatar
  • 1,078
28 votes
5 answers
8k views

Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?

To calculate the confidence-interval (CI) for mean with unknown population standard deviation (sd) we estimate the population standard deviation by employing the t-distribution. Notably, $CI=\bar{X} \...
Abhijit's user avatar
  • 383
20 votes
1 answer
12k views

MCMC on a bounded parameter space?

I am trying to apply MCMC on a problem, but my priors(in my case they are $\alpha\in[0,1],\beta\in[0,1]$)) are restricted to an area? Can I use normal MCMC and ignore the samples that fall outside of ...
Cupitor's user avatar
  • 1,615
17 votes
2 answers
5k views

Best suggested textbooks on Bootstrap resampling?

I just wanted to ask which are in your opinion the best available books on bootstrap out there. By this I don't necessarily only mean the one written by its developers. Could you please indicate ...
22 votes
4 answers
24k views

Are "random sample" and "iid random variable" synonyms?

I have been facing hard time understanding meaning of "random sample" as well as "iid random variable". I tried to find out the meaning from several sources, but just got more and more confused. I am ...
Silent's user avatar
  • 489
18 votes
1 answer
5k views

Sampling from marginal distribution using conditional distribution?

I want to sample from a univariate density $f_X$ but I only know the relationship: $$f_X(x) = \int f_{X\vert Y}(x\vert y)f_Y(y) dy.$$ I want to avoid the use of MCMC (directly on the integral ...
Rod's user avatar
  • 418
13 votes
1 answer
2k views

Intuitive examples of importance sampling

My background is computer science. I am fairly new to monte carlo sampling methods and, although I understand the math, I have hard time coming up with intuitive examples for importance sampling. More ...
James's user avatar
  • 131
8 votes
3 answers
3k views

How to Understand the Relationships Among Random Variables, Samples, and Populations?

I am trying to understand the relationship of a Random Variable to a population and random samples. I understand that a Random Variable is a function that maps each event in a sample space to a number....
verkter's user avatar
  • 307
7 votes
7 answers
6k views

How to prevent collinearity?

Ieno & Zuur 2015 describe a number of causes of collinearity among explanatory variables entered into a linear regression. One of these causes is what they call a 'data collection' cause. They ...
luciano's user avatar
  • 14.5k
2 votes
2 answers
2k views

Get quantile function of dynamic mixture model

I have a dynamic mixture distribution fitted to my risk data (i.e., I have all parameters) of Weibull and Generalized Pareto, with a Cauchy CDF mixing function, that can be written as: \begin{align} ...
Antoine's user avatar
  • 6,187
33 votes
7 answers
9k views

What is the name of the statistical fallacy whereby outcomes of previous coin flips influence beliefs about subsequent coin flips?

As we all know, if you flip a coin that has an equal chance of landing heads as it does tails, then if you flip the coin many times, half the time you will get heads and half the time you will get ...
oggmonster's user avatar
33 votes
5 answers
10k views

Why do political polls have such large sample sizes?

When I watch the news I've noticed that the Gallup polls for things like presidential elections have [I assume random] sample sizes of well over 1,000. From what I remember from college statistics ...
samplesize999's user avatar
32 votes
3 answers
31k views

What does "independent observations" mean?

I'm trying to understand what the assumption of independent observations means. Some definitions are: "Two events are independent if and only if $P(a \cap b) = P(a) * P(b)$." (Statistical Terms ...
RubenGeert's user avatar
32 votes
5 answers
7k views

Strategies for teaching the sampling distribution

The tl;dr version What successful strategies do you employ to teach the sampling distribution (of a sample mean, for example) at an introductory undergraduate level? The background In September I'll ...
smillig's user avatar
  • 2,393
24 votes
2 answers
9k views

What are some techniques for sampling two correlated random variables?

What are some techniques for sampling two correlated random variables: if their probability distributions are parameterized (e.g., log-normal) if they have non-parametric distributions. The data are ...
Pete's user avatar
  • 617
8 votes
1 answer
2k views

Sampling distribution of sample variance of non-normal iid r.v.s

In a first course in statistics we are taught that when we do not know the true variance, we can still perform certain basic tests on the sample mean using the sample variance, $S^2$, instead -- ...
pop_science_reader's user avatar
8 votes
2 answers
1k views

Simulate from a dynamic mixture of distributions

I need to sample from the following mixture of two distributions: $h_{\vec{\beta}}(r)=c(\vec{\beta})[(1-w_{m,\tau}(r))f_{\vec{\beta_{0}}}(r)+w_{m,\tau}(r)g_{\epsilon,\sigma}(r)]$ where $c(\vec{\beta}...
Antoine's user avatar
  • 6,187
4 votes
1 answer
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 ...
Zorro's user avatar
  • 41
57 votes
8 answers
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 ...
PhD's user avatar
  • 14.8k
22 votes
2 answers
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 ...
user avatar
21 votes
4 answers
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 ...
sanity's user avatar
  • 370
11 votes
2 answers
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 ...
Ufuk Can Bicici's user avatar
9 votes
1 answer
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 ...
Stuart J Cuthbertson's user avatar
9 votes
5 answers
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 ...
upabove's user avatar
  • 3,147
9 votes
2 answers
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, ...
Antoine's user avatar
  • 6,187
8 votes
1 answer
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$, ...
eok's user avatar
  • 95
8 votes
4 answers
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, ...
elemolotiv's user avatar
  • 1,230
7 votes
1 answer
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 ...
noclue's user avatar
  • 73
6 votes
1 answer
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 ...
thatWiseGuy's user avatar
6 votes
4 answers
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 '...
Peter M's user avatar
  • 161
5 votes
3 answers
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 ...
waitinforatrain's user avatar
49 votes
4 answers
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 ...
Fixee's user avatar
  • 635
34 votes
12 answers
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 ...
stats_noob's user avatar
27 votes
4 answers
4k views

Probability of not drawing a word from a bag of letters in Scrabble

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_*...
shabbychef's user avatar
  • 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 "...
tiantianchen's user avatar
  • 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 ...
Sycorax's user avatar
  • 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 ...
Pedro A. Ortega's user avatar
19 votes
1 answer
43k views

Generating random samples from a custom distribution

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 ...
Anand's user avatar
  • 1,212

1
2 3 4 5
9