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.

784 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
941 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
187 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
163 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
958 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
1answer
98 views

Distribution of sampling without replacement

Consider $N$ items with associated weights $w_i$. Each time, we sample one item from the remainder without replacement and the sampling probability is proportional to the weights. Continue sampling ...
5
votes
0answers
563 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
436 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
139 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
241 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 ...
5
votes
0answers
101 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
606 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
208 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
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)...
4
votes
0answers
29 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
1answer
98 views

Should we balance the data set if the data is intrinsically unbalanced?

Say I want to predict the cancer rate(regression)/predict the whether a person has cancer or not(classification). The data intrinsically has few cancer patients/low cancer rate, say 1/200. And the ...
4
votes
0answers
33 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
90 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
39 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
73 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
157 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
31 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
144 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
286 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
113 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
374 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
187 views

Optimization by random sampling

Around the internet, I have seen scattered references to the idea of rescaling an objective function and using that as a PDF for the purpose of optimization. (On this site for example: Do optimization ...
4
votes
0answers
93 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
378 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
538 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
78 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
146 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
47 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
292 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
80 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
719 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
296 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
81 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
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 ...
3
votes
0answers
149 views

Metropolis sampling for Bayesian networks

Gibbs sampling is a profound and popular technique for creating samples of Bayesian networks (BNs). Metropolis sampling is another popular technique, though - in my opinion - a less accessible method. ...
3
votes
0answers
107 views

Constructing an unbiased estimator

Suppose we have a finite population $I_N$ of size $N$ on which we define a variable $\mathcal{Y}$. We also have a generic sampling design $(\mathcal{S},p)$ with first and second order inclusion ...
3
votes
1answer
80 views

Gibbs Sampling vs. Using Raw Probability in Contrastive Divergence

In Hinton's Practical Guide to Training Restricted Boltzmann Machines, Section 3, he discusses different situations in which one should take a sample from the Gibbs sampling process, and other ...
3
votes
0answers
192 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 ...
3
votes
0answers
27 views

An urn problem: few red balls, many draws (with replacement)

So, this is a freshman probability problem and I am embarrassed to p[ost it, but I have been up for 35 hours and my brain is broken. I have an urn with 60,000 white balls and 6 red balls. From this ...
3
votes
2answers
111 views

How does the concept of a random variable come into play when sampling?

I have an (intuitive) understanding of what a random variable and a sample are. However, I am not sure how a random variable is related to a sample. Suppose we have a population of people. Sampling ...
3
votes
0answers
169 views

minimum number of rolls necessary to determine how many sides a die has

For example, say you have a black box that has a number of n-sided dice in it. You have 4-sided dice, 6-sided, 8, 10, 12, 20 and so on. The die sides are all A except for one side that says B, e.g. ...
3
votes
0answers
56 views

Sampling from a distribution: Where to find the basics

Part of my project requires that I do some sampling and although I can find some answers, i find my questions to be rather basic ( like sampling from a truncated normal or sampling from a marginal ...