# 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,127 questions
Filter by
Sorted by
Tagged with
563 views

### Can I use “left eye” and “right eye” in my sample as two different subjects?

My data is as follows. I have two groups of patients. Patients in each group had a different type of eye surgery. 5 variables were measured on patients in each group. I want to compare those variables ...
2k views

### Inference to the population when the survey response rate is only 30%

I have conducted a survey in which the questionnaires were sent out to 450 individuals, but only 30% of them answered the questionnaires. Is it still valid to interpret the usual inference analysis (...
101 views

### How many samples account for all the variance?

I have a data set of 100,000. If I want to pick a subset (sample), how can I ensure that it's a "good" sample? I know that I can make it unbiased by picking at random, but how do I know how many to ...
837 views

### How to sample from $c^a d^{a-1} / \Gamma(a)$?

I want to sample according to a density $$f(a) \propto \frac{c^a d^{a-1}}{\Gamma(a)} 1_{(1,\infty)}(a)$$ where $c$ and $d$ are strictly positive. (Motivation: This could be useful for Gibbs ...
20k views

### Can non-random samples be analyzed using standard statistical tests?

Many clinical studies are based on non-random samples. However, most standard tests (e.g. t-tests, ANOVA, linear regression, logistic regression) are based on the assumption that samples contain "...
185 views

### Generalization of basic probability question

This is the motivation for my question: Suppose we have $n$ tickets in a bag, and we draw $k$ of them uniformly at random without replacement. Now, repeat the same procedure independently (same $n$ ...
3k views

### Ways to overcome small number of survey responses

For one of my academic project I ran a sample survey. But unfortunately the respondents were not very proactive & I get just 25 responses for my study. With this small response I guess I can't do ...
124 views

### Sampling from a marginal when full density is given

I want to sample from a distribution with density $$f(\mathbf x) = \int f(c) \prod_{i=1}^n f(x_i|c) dc$$ where $\mathbf x=(x_1,x_2,...,x_n)$. In my particular setup, is easy to sample according to ...
171 views

### How do you call this dynamic sample-size selection strategy?

Imagine that you want to assess the compressibility of a large document very fast. You could randomly pick a subsequence, try to compress it. This can serve as a prediction for the overall ...
845 views

### Importance sampling in mixed, discrete/continuous variables

Consider the following model $$X \sim |\mathcal{N}(X;0,1)| \qquad Y|X \sim Q(Y;X)$$ where I define $Q(Y=-x|X=x)$ with probability mass $\int_{-\infty}^{-x}\mathcal{N}(x;0,1)dx$, $Q(Y=+x|X=x)$ with ...
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 ...
342 views

### How do I determine how well a dataset approximates a distribution?

Quite simple, I have some probability distribution p(x), how can I measure whether one empirical density (set of delta masses) is a better approximation than another. I know that KL-divergence is a ...
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\...
404 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 ...
653 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 ...
737 views

387 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!
234 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, ...
362 views

### Definition of quantile

Given N sampled values, what does the "p-th quantile of the sampled values" mean?
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.―,...
383 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% ...
27k 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, ...
107 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 ...
994 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'...
832 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)...
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 ...