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.

937 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
0answers
1k views

How to generate 2 correlated Beta random variables

I was wondering if it might be possible to generate 2 correlated $Beta$ random variables? In other words, I want to generate two Beta random variables which can be said to have come from two Beta ...
6
votes
0answers
223 views

Multinomial distribution conditional on number of distinct items

I want to sample from the integers $\{1, \dots, k\}$ with probabilities $\{ p_i \}_{i=1}^k$, with replacement, until I see $m$ distinct elements (call that $n$ times). You can view the distribution I ...
6
votes
0answers
260 views

Sampling distribution of sample trimmed (truncated) mean

It is elementary probability theory that the sample mean of an i.i.d. sample follows normal distribution, if the background distribution is normal. But what about the trimmed mean? Is there any result ...
6
votes
0answers
169 views

Estimating population size, minimum variance estimators

I am trying to understand what can be proved about minimum variance estimators. I am a little confused by Cramér–Rao and how to apply it even to really simple examples or if it's even the right tool ...
5
votes
0answers
1k views

When is oversampling poor practice?

For my particular domain and problem, I have data on the entire population. However, my "event" only occurs in 0.5% of the cases. I want my model to be able to pick up on significant characteristics ...
5
votes
0answers
688 views

How to sample from a multivariate empirical distribution

Recently, I’m working on the multivariate conditional estimation issue. Considering $2n$ variables: $$\{X_{1},X_{2},\dots,X_{n},Y_{1},Y_{2},\dots,Y_{n}\}$$ where each follows an empirical ...
5
votes
0answers
459 views

Election fraud detection: the statistics of Quick Count

I’m reading the book Quick Count and Election Observation (chapter 5). I’m interested in understanding the statistics used in Quick Counts. Quick Counts is a methodology for verifying official ...
5
votes
0answers
142 views

Are the balls drawn randomly (independently of the number of balls existing in their colours)?

We have a big urn that contain $N_{Tot}$ balls. Balls are of $r$ different colours. The number of balls of the $i^{th}$ colour (before sampling) is $N_i$. John sampled $x$ balls in total (without ...
5
votes
0answers
107 views

Sampling methods and parallelization

A couple of years ago I learned about recent work in parallelizing slice sampling methods. More recently, I have read great things about NUTS and Hamiltonian Monte Carlo methods (HMC) in general (e.g. ...
5
votes
0answers
647 views

How do I sample from the posterior distribution with gamma likelihood with unknown alpha and beta?

I realize that this Wikipedia page provides the proportional form of the conjugate prior to the gamma distribution with unknown $\alpha$ and $\beta$ parameters, as well as the posterior values of $p$, ...
5
votes
0answers
211 views

Comparing term-frequency distributions with unequal sample sizes?

Background I have several datasets of word frequencies where some datasets have much more data than others: from 3000 samples to 20000 samples. I also have large reference corpora with millions of ...
5
votes
1answer
885 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)...
4
votes
0answers
724 views

Detailed Balance for Hamiltonian Monte Carlo

I am trying to understand the detailed balance proof present in this paper: https://arxiv.org/abs/hep-lat/9208011v2 (page 4). My question: Why do we consider the volume of a neighborhood of points ...
4
votes
0answers
35 views

Integration by sampling from truncated distribution

I'm reading the book Ben Lambert's Bayesian Statistics: problems and answers, which by the way I like. There is a group of problems in "Integration by Sampling" chapter 12. The first integral is $$...
4
votes
0answers
34 views

PDF for the ith ORDERED uniformly random sample compared to an evenly spaced sample

Let $r_1 ≤ r_2 ≤ ... ≤ r_N$ denote an ORDERED set of N realizations of real numbers that are uniformly random on the number line from 0 to 1. Let $R_1 < R_2 < ... < R_N$ denote a set of ...
4
votes
0answers
240 views

Is burn-in necessary for MCMC/Gibbs sampling if I have samples from the true distribution already?

Say I have some samples from a distribution $p$, and I want to get more samples using MCMC/Gibbs sampling. Since the existing samples are known from the equilibrium distribution $p$, if I use them as ...
4
votes
0answers
129 views

Maximizing a computationally expensive function

Let $f:[0,1]^{80} \rightarrow [0,1]$ be some function, and say I have a computationally expensive way to calculate $f(x)$ for each $x \in [0,1]^{80}$ (expensive = 40s per query). The goal is to ...
4
votes
0answers
48 views

Expected value of a “logistic uniform” multivariate

Let $\mathbf{a}_1,\ldots,\mathbf{a}_n \in \mathbb R^d$ and $b_1,\ldots,b_n \in \mathbb R$ be fixed. For $\mathbf{x} \sim \mathcal U([0,1]^d)$ and $j \in \{1,\ldots,n\}$, consider the real variable ...
4
votes
1answer
111 views

Sampling from multivariate normal conditional on a negative minimum

Let $X\sim \mathcal{N}(\mu,\Sigma)$, where $\mu\in\mathbb{R}^n$ and $\Sigma\in\mathbb{R}^{n\times n}$. How can I efficiently sample from $X | {\min{X}\le 0}$? (I.e. from the distribution of $X$ ...
4
votes
0answers
1k views

How to use LDA to predict topic proportion for new document?

I'm interested to learn how I can use a trained LDA (Latent Dirichlet Allocation) model to make predictions on the topic proportion of a new, unseen document using Naive Bayes. Let $z \in \{1, 2, ......
4
votes
0answers
291 views

Samples size with sample proportion close to 0 or 1

For a future monitoring program on small water bodies we want to calculate the sample size. The bodies of water are so small that their number easily exceeds 100.000 in the monitoring area and ...
4
votes
1answer
36 views

Can you derive density from a sample that includes different quadrant sizes?

I wish to estimate the percentage covering of vegetation in an area 1 km long and 600 m wide. Within this area I have percentage cover of vegetation for 10 circles with 10 m diameter and percentage ...
4
votes
0answers
76 views

Sampling from distribution defined variationally

Suppose I define a probability distribution $\mu\in\mathrm{Prob}(\Sigma)$ over some compact $\Sigma\subseteq\mathbb{R}^n$ using a variational problem: $$ \mu:=\arg\min_{\mu\in\mathrm{Prob}(\Sigma)} F[\...
4
votes
0answers
183 views

When will bootstrapping struggle to provide an accurate distribution?

Can someone give an example of a statistic for which bootstrapping might struggle to provide an accurate sampling distribution?
4
votes
1answer
338 views

Sampling from under/over-dispersed count data in R

I am currently working a some datasets with count data in R, in which the response is the number of activities of a given type that were performed in one day by a population. For each type, I build ...
4
votes
0answers
132 views

Does this sampling without replacement have a name?

There can be many ways and ad hoc variants to perform sampling without replacement from a limited population. Consider we have $k$ categories (types of objects) and the k-length vector of their ...
4
votes
0answers
438 views

Tuning MALA (Metropolis-adjusted Langevin) proposal

I'd like to implement a version of Metropolis-adjusted Langevin sampling, but I'm unsure how to go about tuning the parameters of the proposal density. My understanding is that in MALA, a proposal ...
4
votes
0answers
209 views

German tank problem: comparing two estimators

The following estimators can be used for the german-tank-like problems. If we collect a sample of size $k$ with sample mean $\bar{x}$ and highest number $m$, then we can estimate the population size ...
4
votes
0answers
106 views

Sampling from mixture of *unnormalized* densities

Suppose I have $n$ unnormalized densities $g_1(\textbf{x}), \ldots, g_n (\textbf{x})$, for $\textbf{x} \in \mathbb{R}^d$, and $n \gg 1$, which largely overlap but in a nontrivial way. I need to sample ...
4
votes
0answers
432 views

Sampling distribution of the skewness / kurtosis from non normal distributions?

Is there some sort of approximation or analytic definition of the sampling distributions of the skewness and kurtosis when samples are taken from a NON-normal distribution? I have been looking for ...
4
votes
0answers
112 views

Appropriate sample size for weighted sample

I have a population that is sampled such that each item has a different probability of being selected. That probability is separate and independent of the value of any given item. How do I determine ...
4
votes
0answers
601 views

Expectation and variance of sample mean with random sample size

I have a question regarding sampling where the sample size itself is a random variable. Say I have two sub-populations $A$ and $B$ from which I can sample a real valued random variable with ...
4
votes
1answer
87 views

Bayesian inference with unequal sampling

I have a "two-column" data set, with a multi-class categorical variable A, and two-class variable B. It is assumed that each observation is independent. For each category of variable $A$, I want to ...
4
votes
0answers
149 views

Bayesian inference with sampling and mixture models

I'm having some trouble doing Bayesian inference on an experience I have in hands. I apologize in advance if it is too complex, but I couldn't find a trivial way to split it in several parts. Let ...
4
votes
0answers
48 views

Is it necessary to sample a raster for spatial regression?

I'm looking to model land cover change using a variety of environmental predictors (e.g. elevation, rainfall, etc.) stored as raster layers. In most similar studies I've found in the literature the ...
4
votes
0answers
1k views

How to validate a random sample

I have been given two sets of data, one with 10,000 observations which is a subset of the other with 100,000 observations. It is claimed that the small dataset is a random sample of the large dataset. ...
4
votes
0answers
1k views

Gibbs sampling for LDA — does a small Dirichlet concentration parameter make a difference?

I'm using a Gibbs sampler for Latent Dirichlet allocation as described by Griffiths and Steyvers (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC387300/). The sampling of a new topic $j$ for word $i$ is ...
4
votes
0answers
1k views

Should the mean of the bootstrapped distribution always be asymptotically equal to the sample estimate?

Suppose I bootstrap the distribution of the sample mean. Normally, one would use the mean of the bootstrapped distribution as point estimate of the parameter and the s.d. as its standard error. The ...
4
votes
0answers
3k views

Generating samples from Copula in R

Suppose I want to model dependence between $d$ r.v.´s $Y_1,...,Y_d$ with the copula $C_\theta$, where $\theta$ are the corresponding parameters of that copula. I've also determined the correlation ...
4
votes
0answers
349 views

Convergence theorem for Gibbs sampling

The convergence theorem for Gibbs sampling states: Given a random vector $X$ with components $X_1,X_2,...X_K$ and the knowledge about the conditional distribution of $X_k$ we can find the actual ...
4
votes
0answers
81 views

Estimating repeat shoppers from an incomplete sampling

I'm trying to estimate how many people visited the farmers market once, twice, thrice, etc. in a given time period, using sampled data. We have interview data from approximately 50% of visitors as ...
4
votes
0answers
735 views

Why might the mean of a bootstrapped distribution not equal the original summary statistic?

Background: I have n samples and their average. The mean of this empirical bootstrapped distribution seems quite different form the average of my original sample. My original average for the n samples ...
4
votes
0answers
301 views

Gibbs sampling from full conditionals

I have the following joint density: $p(x_1,x_2,y_1,y_2) \propto \exp\left(−\left(x_1^2+x_2^2+c_1(y_2-y_1)^2+c_2(y_2-y_1)^4\right)\right)$ Can I use Gibbs sampling to sample from that? How can I get ...
4
votes
0answers
87 views

How to pick from a set of random variables the one with the highest mean using a fixed number measurements?

Suppose we have $N$ approximately normally distributed continuous random variables $X_1, X_2, X_3, \ldots,X_N$, each with an unknown mean and variance. I'd like to find the random variable with the ...
4
votes
0answers
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 ...
3
votes
0answers
36 views

Weighing toilet paper with an imprecise scale

A practical, topical problem: Consider a typical roll of toilet paper (TP) with perforated sheets of fairly uniform size, and suppose we're interested in the distribution of a sheet's weight $W$ but ...
3
votes
0answers
25 views

How Does Variance Propagate From Likelihood Function To MCMC Posterior?

Suppose we are trying to obtain the posterior distribution of three parameters that influence a discretely observed population. The likelihood function is unfortunately intractable, as it is a mix of ...
3
votes
1answer
31 views

Sampling from conditional multivariate normal distribution (“conditioned on ellipses” / stratified sampling)

I have an issue related to stratified sampling. To explain, I need to start with one-dimensional case: Let $N\sim \mathcal{N}(0,1)$, i.e., a standard normal variable with cdf $F$. Partition $\mathbb{R}...
3
votes
0answers
84 views

Estimate number of duplicate items in a population by sampling

I have a data source that allows me to pull big sets of numbers (~1e12) with unknown distribution. let's define Mostly distinct as more than MD percent of the population is distinct numbers. For each ...
3
votes
0answers
22 views

Sampling from Gaussian distribution subject to a quadratic inequality constraint

Would it be possible to generate samples $x \in \mathbb{R}^n$ from $\mathcal{N}(\mu, \Sigma)$ subject to an inequality constraint $x^\top Q x/2 + b^\top x \le c$, $Q = Q^\top \succeq 0$. We also know, ...

1
2 3 4 5
19