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
225
votes
12answers
65k 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 ...
45
votes
5answers
24k 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 ...
54
votes
5answers
13k 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 ...
21
votes
1answer
39k 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 ...
23
votes
1answer
22k views

Explanation of finite 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 a correction on the sample's mean and standard error using this formula: $\...
12
votes
3answers
707 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 ...
16
votes
4answers
15k 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 ...
22
votes
2answers
16k 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 ...
18
votes
1answer
10k 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 ...
24
votes
1answer
3k 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 ...
13
votes
2answers
2k 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 ...
16
votes
4answers
13k 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 ...
7
votes
7answers
3k 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 ...
10
votes
1answer
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 ...
2
votes
2answers
796 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} ...
30
votes
5answers
6k 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 ...
16
votes
1answer
7k 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 ...
10
votes
1answer
2k 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 ...
7
votes
2answers
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}...
54
votes
8answers
11k 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 ...
32
votes
5answers
34k 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 ...
14
votes
2answers
4k 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 ...
32
votes
5answers
8k 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 ...
15
votes
1answer
10k 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 ...
8
votes
2answers
3k 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, ...
8
votes
1answer
1k 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 ...
7
votes
5answers
40k 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 ...
4
votes
3answers
5k 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 ...
21
votes
1answer
2k 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 ...
34
votes
4answers
56k 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 ...
9
votes
3answers
3k views

Recommend references on survey sample weighting

Let's aim for some at an introductory level, some articles and some textbooks. Applied is more helpful, including R code is great. Thanks!
9
votes
2answers
5k 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....
9
votes
3answers
693 views

How can I simulate census microdata for small areas using a 1% microdata sample at a large scale and aggregate statistics at the small area scale?

I would like to perform an individual-level multivariate analysis at small levels of geographic aggregation (Australian census collection districts). Clearly, the census isn't available at these ...
18
votes
4answers
730 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 ...
7
votes
1answer
2k 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 ...
28
votes
7answers
6k 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 ...
6
votes
4answers
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 '...
6
votes
1answer
126 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 ...
8
votes
2answers
2k views

Subsample of a random sample: random sample?

Let's say you have a large random sample of soccer players in Europe but you are only interested in what happens in Spain. Could you reduce your sample to players in Spain and still call it a random ...
2
votes
1answer
1k views

Sampling from Truncated Normal

I am trying to sample from a truncated normal using the standard probability integral transform as described on wikipedia with $$ x = \Phi^{-1} ( \Phi(\alpha) + U*( \Phi(\beta) - \Phi(\alpha)))*\sigma ...
2
votes
1answer
2k views

How to combine subsets consisting of mean, variance, confidence, and number of sampled points used?

I have a data set that has been divided into $n$ data subsets. I am sampling from each of these subsets and getting a tuple consisting of mean, variance, confidence and number of sampled points used. ...
91
votes
3answers
53k views

Can someone explain Gibbs sampling in very simple words? [duplicate]

I'm doing some reading on topic modeling (with Latent Dirichlet Allocation) which makes use of Gibbs sampling. As a newbie in statistics―well, I know things like binomials, multinomials, priors, etc.―,...
28
votes
3answers
18k 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 ...
16
votes
1answer
30k 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 ...
14
votes
2answers
1k views

Managing error with GPS routes (theoretical framework?)

I'm looking for the appropriate theoretical framework or speciality to help me deal with understanding how to deal with the errors that the GPS system has - especially when dealing with routes. ...
14
votes
1answer
7k views

How to draw random samples from a non-parametric estimated distribution?

I have a sample of 100 points which are continuous and one-dimensional. I estimated its non-parametric density using kernel methods. How can I draw random samples from this estimated distribution?
7
votes
1answer
669 views

Optimal importance sampling with ratio estimator

This is probably a stupid question, but here goes: so we want to approximate the following expectation: $$\mathbb{E}[h(x)] = \int h(x)\pi(x) dx$$ Where $h(x)$ is an arbitrary function and $\pi(x)$ is ...
27
votes
4answers
3k 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_*...
21
votes
7answers
6k 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 "...
14
votes
2answers
39k views

What is the difference between sample variance and sampling variance?

What is the difference between sample variance and sampling variance? They seem same. Aren't they?