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
11
votes
5answers
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 ...
4
votes
6answers
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 (...
3
votes
1answer
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 ...
19
votes
3answers
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 ...
23
votes
3answers
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 "...
4
votes
1answer
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$ ...
4
votes
3answers
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 ...
6
votes
1answer
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 ...
8
votes
1answer
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 ...
4
votes
2answers
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 ...
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 ...
6
votes
1answer
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 ...
4
votes
1answer
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\...
6
votes
0answers
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 ...
4
votes
0answers
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 ...
1
vote
2answers
737 views

Expectation of the variance of the sampling set without replacement

Select $n$ numbers without replacement from the set $\{1,2,...,m\}$, and generate the set $S=\{a_1,a_2,...,a_n\}$. I want to calculate the expectation of the variance for the sampling set $\mathbb{E}[...
4
votes
2answers
1k views

How to calculate the number of trials for a 'meaningful' result

Apologies for newbie question but have failed to understand what I've read about in this area so pointers to the correct methods would focus my attention. I have a piece of software which when tested ...
9
votes
3answers
8k views

Acceptance rates for Metropolis-Hastings with uniform candidate distribution

When running the Metropolis-Hastings algorithm with uniform candidate distributions, what is the rationale of having acceptance rates around 20%? My thinking is: once the true (or close to true) ...
7
votes
1answer
454 views

Estimating the variance of poker win rates

Suppose you have a casino with n poker players. Each player has a win rate - the amount of money he wins or loses per hand. We assume that these win rates are normally distributed with a mean of 0. (...
5
votes
1answer
589 views

How to combine two independent repeated experiments with different success probabilities?

Repeating an experiment (about which I asked before) with $n$ possible outcomes $t$ times independently, where all but one outcomes have probability $\frac{1}{n+1}$ and the other outcome has the ...
9
votes
1answer
6k views

What is a propensity weighting sampling / RIM?

I have come across the sampling method called "Propensity Weighting Sampling/RIM", but I do not have a good idea of what these survey methods are all about. What references in the literature cover ...
3
votes
2answers
190 views

Bias in sampling for set intersections

Say I have 2 sets, $A$ and $B$ with $n_{A}$ and $n_{B}$ elements respectively, which I assume is known. I would like to estimate $| A \bigcup B |$ using samples of $\tilde{A} \subset A$ and $ \tilde{...
3
votes
0answers
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 ...
3
votes
1answer
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 ...
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!
8
votes
1answer
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, ...
10
votes
1answer
362 views

Definition of quantile

Given N sampled values, what does the "p-th quantile of the sampled values" mean?
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.―,...
5
votes
1answer
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 ...
1
vote
2answers
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 ...
1
vote
1answer
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 ...
1
vote
1answer
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% ...
2
votes
2answers
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?
6
votes
2answers
198 views

Resampling within a survey to account for missing data

Suppose I have survey responses that look like this: ...
3
votes
3answers
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, ...
2
votes
2answers
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 ...
0
votes
2answers
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 ...
2
votes
1answer
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 ...
8
votes
1answer
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 ...
10
votes
3answers
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 ...
8
votes
2answers
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 ...
3
votes
2answers
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,...
12
votes
2answers
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 ...
3
votes
1answer
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 ...
1
vote
2answers
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 ...
9
votes
1answer
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'...
5
votes
1answer
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)...
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 ...
9
votes
2answers
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 ...
4
votes
1answer
670 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 ...