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.

792 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
116 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 ...
192 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 ...
165 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 ...
142 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 ...
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 ...
584 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 ...
440 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 ...
140 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 ...
244 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 ...
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. ...
620 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$, ...
209 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 ...
835 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)...
32 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 ...
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 ...
94 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 ...
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 ...
79 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$ ...
1k views

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 ...