Skip to main content

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.

1,186 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
14 votes
1 answer
3k 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 ...
rnorouzian's user avatar
  • 4,006
10 votes
0 answers
876 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 ...
Ruben van Bergen's user avatar
8 votes
0 answers
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. ...
Alex's user avatar
  • 4,402
7 votes
1 answer
685 views

Probabilities arising from permutations

Certain interesting probability functions can arise from permutations. For example, permutations that are sorted or permutations that form a cycle. Inspired by the so-called von Neumann schema given ...
Peter O.'s user avatar
  • 1,194
7 votes
1 answer
91 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 ...
dohmatob's user avatar
  • 558
7 votes
0 answers
2k 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, ......
zzhengnan's user avatar
  • 171
7 votes
0 answers
186 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 ...
Willem's user avatar
  • 71
6 votes
0 answers
1k views

Calculating a sample size based on the target width of a confidence interval with stratification

I am reviewing a sampling design devised by a colleague and completely fail to understand it, although I am not a novice in statistics (but not a huge expert either). The said colleague is no longer ...
Mihail's user avatar
  • 532
5 votes
0 answers
243 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 ...
lacerbi's user avatar
  • 5,206
5 votes
0 answers
569 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 ...
S. Punky's user avatar
  • 773
5 votes
0 answers
1k 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 ...
SJ.STEVEN's user avatar
5 votes
0 answers
1k views

rejection sampling in high dimensions

I read that rejection sampling might fail in high dimensional settings, as the rejection rate becomes too low. Intuitively - i can understand this - but i would like to understand the formal proof as ...
Wouter's user avatar
  • 2,192
5 votes
0 answers
120 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. ...
Amelio Vazquez-Reina's user avatar
5 votes
0 answers
61 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 ...
Matt SM's user avatar
  • 206
5 votes
0 answers
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 ...
Ben's user avatar
  • 473
5 votes
0 answers
750 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$, ...
Brash Equilibrium's user avatar
5 votes
0 answers
89 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 ...
Jonathan's user avatar
  • 1,303
5 votes
0 answers
240 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 ...
Sarkom's user avatar
  • 279
4 votes
0 answers
184 views

Sampling from a Gaussian distribution with normalization constraint

How can one efficiently sample $x \in \mathbb{R}^N$ from a multivariate normal distribution $x \sim \exp(- \frac{1}{2}x^T \Sigma^{-1} x)$ given a normalization constraint $x^T x = 1$? In my ...
Kipton Barros's user avatar
4 votes
0 answers
473 views

Thompson sampling when the reward is not simply one

I am trying to implement a simple simulation of Thompson sampling for pricing inspired by Python code from here. Another very similar/realted post can be found here. The idea is that I have different ...
cs0815's user avatar
  • 2,245
4 votes
0 answers
151 views

Measure-Theoretic Importance Sampling: Do we need equivalence of measures?

Let $\pi$ and $\mu$ be the target and proposal measures on $(X, \mathcal{X})$ respectively, with $\pi \ll \mu$. Suppose $\lambda$ is the reference measure on $(X, \mathcal{X})$ and that $\pi\ll \...
Euler_Salter's user avatar
  • 2,226
4 votes
0 answers
61 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 ...
Adam Hafdahl's user avatar
4 votes
0 answers
2k 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 ...
Georgia S's user avatar
  • 141
4 votes
0 answers
74 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 ...
Correlations's user avatar
4 votes
0 answers
672 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 ...
yossico's user avatar
  • 161
4 votes
0 answers
101 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 $$...
iot's user avatar
  • 275
4 votes
0 answers
254 views

When to use ordinary, balanced, antithetic, or permutation resampling for bootstrap?

I am using boot and would appreciate any explanation as to when using each of these resampling methods would be recommended in practice. I have come across Do who says that: Simulation results ...
Krantz's user avatar
  • 585
4 votes
2 answers
113 views

coverage index?

Suppose I have a space of potential outcomes X with a probability distribution on it. I assume that there is a distance function between elements of X (e.g. X is a metric space). I also have a set S ...
amit's user avatar
  • 549
4 votes
0 answers
175 views

Adaptive selection of Mass values in Hamiltonian Monte-Carlo?

I know there are good solutions for adaptive selection of path lengths and step-size for Hamiltonian Monte-Carlo (e.g. the NUTS sampler), but for the sampler to work efficiently we also require that ...
CBowman's user avatar
  • 613
4 votes
0 answers
48 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 ...
user59152's user avatar
4 votes
0 answers
375 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 ...
dontloo's user avatar
  • 16.5k
4 votes
0 answers
1k 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 ...
andschar's user avatar
  • 143
4 votes
1 answer
49 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 ...
Joe_P's user avatar
  • 41
4 votes
0 answers
82 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[\...
Justin Solomon's user avatar
4 votes
0 answers
233 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?
Matt J's user avatar
  • 41
4 votes
0 answers
177 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 ...
ttnphns's user avatar
  • 57.8k
4 votes
0 answers
153 views

Sampling from the conditional distribution of continuous random variables?

Suppose I have a prior $\pi(\theta)$ and likelihood $f(x|\theta)$, where $\theta$ takes values in $\{0,1\}$. I implement the following procedure For $i = 1, \dots, T$ Simulate $\theta_i \sim \pi(\...
jII's user avatar
  • 631
4 votes
0 answers
277 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 ...
Jivan's user avatar
  • 571
4 votes
0 answers
121 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 ...
thornate's user avatar
  • 151
4 votes
0 answers
497 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 ...
PolBM's user avatar
  • 1,583
4 votes
0 answers
700 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 ...
slyyah's user avatar
  • 41
4 votes
0 answers
2k views

Calculating the standard deviation of the mean of average rates of speed

Is it possible to determine the mean value of a point by averaging the average rate of ranges that contain that point, and if so, how can the uncertainty of that value be accurately determined? I ...
Nick Anderegg's user avatar
4 votes
0 answers
71 views

Sampling vector so they will have a given euclidean distances matrix

Given a matrix $M\in\mathbb{R}^{P\times P}$ , is it possible to sample $P$ vectors $u_i\in\mathbb{R}^N$, $i=1..P$ so that $\|u_i-u_j\|=M_{ij}$. Obviously for not any $M$ this is possible, i.e. it has ...
Uri Cohen's user avatar
  • 427
4 votes
1 answer
114 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 ...
NaiveBayesian's user avatar
4 votes
0 answers
162 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 ...
Rui Gonçalves's user avatar
4 votes
0 answers
2k 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 ...
tomka's user avatar
  • 6,604
4 votes
0 answers
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 ...
Good Guy Mike's user avatar
4 votes
0 answers
912 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 ...
Sim's user avatar
  • 192
4 votes
0 answers
881 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 ...
Alex Charl's user avatar
4 votes
0 answers
347 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 ...
user21048's user avatar

1
2 3 4 5
24