# 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.

2,165 questions
Filter by
Sorted by
Tagged with
259 views

### How to sample uniformly from an intersection of simplices?

The title says it all. Specifically: given strictly positive real numbers $a_1,\dots,a_T$ and $b_1,\dots,b_T$, I want to sample from \mu:=\text{Uniform}(\{p\in[0,\infty)^T : \sum_{t=1}^T a_t p_t = 1\...
412 views

### Choosing the number of latin hypercube samples [closed]

I'm using latin hypercube sampling to draw parameter values for an epidemiological simulation model (about 30 parameters, following various distributions), and so far I haven't been able to find any ...
654 views

### Sample size to achieve given confidence level

I am trying to estimate number of different unique visitors who visited a given website (online store). There are hundreds of millions of visits to the store and so this task is too difficult to ...
751 views

399 views

### Exponential moving average with sub-interval relevance / varying timeframe

I need to calculate an exponential moving average for a series of data. The intended sampling interval is fixed (say 1s) but the data stream has varying intervals (data intervals vary from 0.01s to ...
1k views

### Monte carlo integration in spherical coordinates

I was playing around with writing a code for Montecarlo integration of a function defined in spherical coordinates. As a first simple rapid test I decided to write a test code to obtain the solid ...
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!
237 views

### Who first developed the idea of “sampling distributions”?

Who created sampling distributions? I have looked everywhere and I'm writing a paper, but, so far, all I've been able to come up with is the theory and the definition. Please help me find the who, ...
370 views

### Definition of quantile

Given N sampled values, what does the "p-th quantile of the sampled values" mean?
55k 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.―,...
384 views

### Modeling multinomial problems with unknown sample size in BUGS

I'm trying to estimate the design effect of a series of relatively small sample size surveys ($n\sim 70$) with multiple responses. Design effects roughly correspond to how much larger actual sample ...
222 views

### Sampling dataset, choosing among N dimensions

I'm new in stats, and maybe this is a duplicated question, but I could not find a similar one. I'm trying to reduce a dimension of my dataset. Maybe reduce is not a good word. I need to sample some ...
2k views

### How to handle skewed binary target variables? [duplicate]

Possible Duplicate: Supervised learning with “rare” events, when rarity is due to the large number of counter-factual events I am trying to predict diabetes using the BRFSS dataset by ...
4k views

### How to compute margin of error with a given confidence interval?

I was given the following question: A survey found that 89% of a random sample of 1024 American adults approved of cloning endangered animals. Find the margin of error for this survey if we want 90% ...
28k views

### Sampling error example

I've read the sampling error examples in Wikipedia, but I still don't understand. Could you give me a simple and characteristic example for sampling error?
198 views

### Resampling within a survey to account for missing data

Suppose I have survey responses that look like this: ...
404 views

### How to check reliability of a given sampling technology?

Very basic question, I suspect. It's sort of the inverse of this one, and the same disclaimers about my own ignorance apply, but here goes: I have a sampling technology. I know the total population, ...
108 views

### Estimating the number of registered interaction designers in a given territory

I plan to conduct a research study about Interaction Designers. Prior to starting on sampling methods I am finding it very hard to get my hands on some demographics and statistics, e.g. How many ...
127 views

### How do I compare a matrix of population values to a matrix of sample values?

Let's say I have a matrix where the underlying data is from the entire population. Let's say I also have a matrix where the underlying data has been sampled from population. How would I analyze how ...
999 views

### Nonparametric expected value estimation of sample from unknown distribution

I have a data sample (in this case an EEG data sample, but my question refers to any type of data samples of prior unknown distributions). I would like to do a nonparametric estimate of the expected ...
2k views

### How to use/interpret empirical distribution?

First of all I'd like to apologize for the vague title, I couldn't really formulate a better one just now, please feel free to change, or advice me to change, the title to make it better fit the core ...
2k views

### Using MCMC to evaluate the expected value of a high-dimensional function

I am working on a research project that is related to optimization and recently had an idea to use MCMC in this setting. Unfortunately, I am fairly new to MCMC methods so I had several questions. I'll ...
1k views

### Do confidence intervals apply to quota sampling?

French polling institutes are currently facing a major crisis after they recently published what can only be called the most ridiculous poll so far on the 2012 presidential election horse race. The ...
2k views

### Choosing sample size to achieve pre-specified margin-of-error

If I want to achieve a margin-of-error of <= 5 % for a representative population sample, how large a sample do I need when: The interviewees are picked from X regions and from Y age groups? That is,...
1k views

### How to quickly sample X if exp(X) ~ Gamma?

I have a simple sampling problem, where my inner loop looks like: v = sample_gamma(k, a) where sample_gamma samples from the ...
1k views

### How to calculate confidence interval when only a part of the samples are valid?

I will simplify our problem in this way. Say there are 100,000 cases in total to examine. Due to the time limitation, we randomly selected 2,000 of them. Then we found 1,000 of them are invalid, so we ...
2k views

### Percent error or percent difference?

Using either percent error or percent difference, I want to compare one of my measured values from a set to the mean of the set. By reading the Wikipedia article on percent difference, it's still not ...
292 views

### Can I estimate the frequency of an event based on random samplings of its occurrence?

Some edits made... This question is just for fun, so if it isn't fun then please feel free to ignore it. I already get a lot of help from this site so I don't want to bite the hand that feeds me. It'...
835 views

### Assessing the representativeness of population sampling

I am looking for some suggestions about assessing the representativeness of a particular dataset I am analyzing. In this dataset I am looking at the relationship between two variables (e.g., X and Y)...
5k 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 ...
19k views

### How to make representative sample set from a large overall dataset?

What are the statistical techniques to create a sample set, which is representative of the entire population (with a known confidence level)? Also, How to validate, if the sample fits the overall ...
683 views

### Sampling from a fixed population

Here's a real basic question. I'm trying to teach myself a bit of stats with Verzani's Using R for Introductory Statistics. In question 5.13 he asks: A sample of 100 people is drawn from a population ...
1k views

### How to correct uneven sampling distribution when calculating the mean?

Suppose I have a function f, and I want to sample it at 100 points in the interval [0, 100]. For some reason (that seemed smart ...
249 views

### Checking the distribution of classes in a sample of a dataset

I am new here, so I might have missed a similar question. I am trying to do things good in my research and using proper statistical approaches, but in computer science, we had quite a weak training ...
147 views

### Information content of examples and undersampling

As I have written in my question "How much undersampling should be done?", I want to predict defaults, where a default is per se really unlikely (average ~ 0.3 percent). My models are not affected by ...
917 views

### Which one should be applied first: data sampling or dimensionality reduction?

I am working on binary classification problem. Data set is very large and highly imbalanced. Data dimensionality is also very high. Now I want to balance data by under-sampling the majority class, and ...
2k views

### Multistage sampling in R

I've got a dataset similar to this: ...
555 views

### How much undersampling should be done?

My aim is to predict quarterly customer-default probabilities: I have data on ~ 2 million individuals, who default on average with a probability of ~ 0.3 percent. Therefore I am thinking about ...
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 ...
357 views

### Is “every blue t-shirted person” a systematic sample?

I'm teaching an intro stats class and was reviewing the types of sampling, including systematic sampling where you sample every kth individual or object. A student asked if sampling every person ...
279 views

### Sample selection and variation in the variable of interest when using panel data

I wonder how to reason when selecting samples. I am doing a panel data regression analysis about how the euro membership correlates with the budget deficit in the member countriues. Using R that is: ...
924 views

### Balanced sampling for network training?

I have a very unbalanced sample set, e.g. 99% true and 1% false. Is it reasonable to select a balanced subset with a 50/50-distribution for neural network training? The reason for this is, that I ...