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
2 votes
1 answer
15 views

how does `subsample` parameter work in boosting algorithms like xgboost and lightgbm?

From what I know, both of them are sequential learners and only the 1st tree in the sequence gets built on the data and all the following trees that get built are to correct the mistakes of previous ...
user avatar
0 votes
0 answers
31 views

How to determine the number of strata from stratified sampling? Any rule of thumb?

I have a continuous variable (proxy for difficulty) that I would like to discretize for stratified sampling. My sampling approach is equal allocation (I will choose an equal proportion of samples per ...
user avatar
2 votes
0 answers
24 views

When can we get unbiased estimate given biased data?

There was a recent "hot take" tweet by Andrej Karpathy (without any comment or clarification from the author): real-world data distribution is ~N(0,1) good dataset is ~U(-2,2) It provoked ...
user avatar
  • 113k
0 votes
0 answers
20 views

When taking a sample of a population with clusters, how do we set a threshold so that the clusters are significant?

For example, say we have a population of about 200,000 datapoints which can be sorted into about 10 clusters. However, performing the clustering process on the entire population is not feasible. Thus ...
user avatar
0 votes
1 answer
38 views

How could proving the result of variance of estimator in Latin Hypercube Sampling

Ok i almost freak out of this!!!! i've to doing some presented about this paper (M.D.MCKAY,J.BECKMAN, W.J.CONOVER (1979). It's about comparing methods for selecting values (Random Sampling, Stratifed ...
user avatar
0 votes
0 answers
33 views

How to propagate uncertainties for parameters whose upper and lower uncertainties are different?

If $A = A_0 \pm \sigma_A$, $B = B_0 \pm \sigma_B$, and $f = \frac{A}{B}$, the normal error propagation goes like (following Wikipedia) \begin{equation} \sigma_f = \sqrt{\sigma_A^2 + \sigma_B^2 - 2\...
user avatar
0 votes
0 answers
25 views

Extrapolating the total number of different molecules (equivalent of marble sampling) [closed]

We have a total material, 100%. We measured 2 samples of it, each 4.7%. We found 1538 different molecules in each sample, 1061 found in both, and 477, 477 found exclusively in either (but not both) ...
user avatar
0 votes
0 answers
23 views

Estimate the Numbers of samples required for each variable

I am tasked to help with organizing the driving experiments for a robot. The goal is that for each Terrain Class like forest, wet-meadows, dry-meadows we will measure the time it takes the robot to ...
user avatar
0 votes
0 answers
23 views

Is sampling from $\mathcal{N}(\mu, \sigma)$ equal to sampling from $\mathcal{N}(0, 1) * \sigma + \mu$? [duplicate]

This is a simple method to transform samples from $\mathcal{N}(0, 1)$ into samples from $\mathcal{N}(\mu, \sigma)$ with arbitrary $(\mu, \sigma)$, without having to re-sample from $\mathcal{N}(\mu, \...
user avatar
  • 3,134
0 votes
0 answers
15 views

How to incorporate uncertainty when inferring from a sample?

My question relates to the use of a representative sample to make inference regarding the number of individuals with a certain characteristic in a population. I am analysing a study that attempts to ...
user avatar
  • 121
2 votes
2 answers
49 views

Logistic regression simulation with respect to event occurrence (prevalence)

I am trying to simulate logistic regression data, but under the constraints of prevalence. $$\text{logit}(y_i) = \beta_0 + \beta_1 X_1 + \beta_2X_2$$ For example, I want to create a dataset that has ...
user avatar
0 votes
0 answers
22 views

Should you clean your data after or before selecting a sample?

Assuming a 500k dataset. For statistical modeling purposes (selecting up to 10% of 500k as a sample). Should I clean the 500k dataset first before selecting a sample or select the sample first and ...
user avatar
0 votes
0 answers
14 views

I tried to solve this problem but got stuck in the end - Sampling distribution

This is a problem about sampling distribution that got me a little confused.. The time it takes for students to complete their university degrees has a distribution normal mean 6,4 years and standard ...
user avatar
  • 1
11 votes
4 answers
819 views

What distribution to sample X from to get an uniform distribution in Y?

I have a random variable $X$ which is related to another random variable $Y$ as $Y = \text{cos}(X)$, where $X \in [0, \pi/2]$, and I would like to know what distribution I should sample $X$ from in ...
user avatar
  • 185
0 votes
1 answer
33 views

Choosing an equal number of samples from each strata - what is this called?

Suppose I have a highly skewed distribution and a proxy measurement. I use this proxy measurement to bin the samples of this distribution into different "strata". I then take N samples from ...
user avatar
5 votes
3 answers
993 views

Why is random sampling good?

First, is there any theory for random sampling being optimal? Second, consider the following example. Suppose there are two balls in an urn. Their colors can be either white or red. So there are three ...
user avatar
  • 51
0 votes
0 answers
14 views

Why Gumbel softmax and not other types of softmax?

Ignore the method name. Is there a reason why in the Gumbel softmax trick we sample from Gumbel distribution? Since we are doing something similar to a reparameterization trick, can't we just sample ...
user avatar
0 votes
0 answers
20 views

How to find expected value from cumulative distribution function?

Hello everyone, I'm currently doing research based on the model in Competitive fit-revelation sampling and mixed pricing strategy (Wu &Deng, 2021). And I don't understand how they can conclude the ...
user avatar
0 votes
0 answers
34 views

Single-sample self-normalized importance weighting

Self-normalizing sampling schemes (https://artowen.su.domains/mc/Ch-var-is.pdf) seem to require at least two samples to give non-trivial weightings under an importance sampling distribution. Is there ...
user avatar
  • 884
4 votes
1 answer
101 views

Markov Chain Monte Carlo with known normalisation

I would like to compute the expectation value $\langle O \rangle = \sum_x P(x) O(x)$ of some random variable over an extremely large sample space that I cannot simply exhaustively go through. Usually ...
user avatar
  • 141
0 votes
0 answers
24 views

How to weight probabilites of getting sampled depending on the frequency of occurrence?

Unfortunately I'm struggling to describe my problem mathematically. I have 2000 strings, many of which are repeated. Now I want to write a 'random' sampling algorithm that produces 100 samples out of ...
user avatar
  • 1
0 votes
0 answers
41 views

how to find standard deviation of sampling distribution without knowing population parameter σ

Standard deviation of sampling distribution is given as σ/sqrt(n). But usually the population parameter σ will be unknown. In that case, how do we calcuate the standard deviation of sampling ...
user avatar
  • 101
0 votes
0 answers
19 views

Identify name of sampling / simulation strategy

From what I've learned, it seems like in order to simulate draws from a distribution $X \sim p(X)$ one can take advantage of the fact that $p(X) = \int p(X, z)p(z)dz$ and use the following strategy: ...
user avatar
0 votes
0 answers
9 views

Empirical risk minimization for relu/max loss function

Classical risk minimization (RM) minimizes the expected loss over the training distribution $p_{\mathrm{train}}(x)$, $$\theta^*_{RM} = \arg \min_\theta E_{p_{\text{train}}}[\ell(x, \theta)].$$ As the ...
user avatar
  • 101
3 votes
1 answer
79 views

How to sample from a custom heavy tailed (e.g. custom Cauchy) distribution?

I would like to draw samples from a distribution with pdf $z \mapsto \frac{1}{1 + |z|^\gamma}$ ($z \in \mathbb{R}, \gamma > 1$). Notice, that for $\gamma = 2$, this is proportional to the standard ...
user avatar
2 votes
0 answers
16 views

Sampling order of rejection sampling

Consider a target density $f(y) \leq C \, g(y)$, where it is easy to make samples from density $g$. We can draw samples from $f$ by repeating the following routine: Draw $Y \sim g$ Draw $U \sim \...
user avatar
  • 355
0 votes
1 answer
39 views

Log-normal mean and standard deviation change after sampling

I have the log-normal standard deviation and the mean that I want to use to sample from a log-normal distribution in Python. However after I do the sampling and compute the arithmetic mean and ...
user avatar
0 votes
1 answer
43 views

Convert from log-normal distribution to normal distribution [duplicate]

For purposes of sampling I have the variance v and mean m of a log-normal distribution, I don't want to directly sample from the log-normal distribution so my question is how can I convert this into a ...
user avatar
0 votes
0 answers
21 views

the mean and standard deviation aren't the same as those of the input data i provided after sampling

I have a log-normal mean and a standard deviation. after i converted them to the underlying normal distribution's parameters mu and sigma, I sampled from the log-normal distribution however when i ...
user avatar
2 votes
1 answer
52 views

uniformly sample from gaussian distributed data

I have data that is roughly gaussian distributed, bounded on a range of [x0, x1], w/ mean m and stadard deviation s. I want to ...
user avatar
0 votes
1 answer
26 views

Inverse transform sampling : comparing bias, variance and mse for an estimator

Starting from the PDF of the Pareto distribution, \begin{equation} f_{\theta_1, \theta_2}(x) = \begin{cases} \frac{\theta_1 \theta_2^{\theta_1}}{x^{\theta_1 + 1}}, &\quad x \geq \theta_2 \...
user avatar
1 vote
1 answer
33 views

How to sample and compute the likelihood from a Mollified Uniform distribution?

I want to draw samples from the mollified Uniform distribution presented in another Cross Validated thread, cf the answer from whuber. What is the best way to do so?...
user avatar
0 votes
0 answers
11 views

Population statistics

Let’s say one has a small random size of 100 people, and the distribution of this small population is 60% male and 40% female. Now, say, there are 1,000,000 people that live in this region in total. ...
user avatar
  • 1,405
0 votes
0 answers
18 views

Estimating total number of consumers based on observed transactions

I read through most other questions of this type and didn't find a relevant situation. I want to predict the total number of consumers and repeat consumers that shopped in the past month, however, ...
user avatar
2 votes
2 answers
61 views

Showing that $E[\hat{\tau}_D] = P(n_D > 0)\tau_D$ and $\vert E[\hat{\tau}_D] - \tau_D\vert \leq \tau_D(1-\frac{N_D}{N})^n$

Consider the following double sampling scheme: We have a population of size $N$ with variable of interest $y_i$ for each $i \in \{1,\dots,N\}$, and (fixed) subpopulation $D$ of size $N_D$. Let $S$ ...
user avatar
  • 147
0 votes
0 answers
15 views

Sampling population to replicate another population

Disclaimer: This question is quite general and I assume there are multiple answers equally valid, and at this point I have no a priori opinion on what is "similar" population so everything ...
user avatar
  • 281
-2 votes
1 answer
28 views

Can you give an example of Metropolis and Metropolis-Hastings algorithm?

I have studied many books and tried to understand both the Metropolis and Metropolis-Hastings algorithm. Everywhere it is written in the context of the Ising model or Lenard-Jones Energy. I am having ...
user avatar
  • 1,518
2 votes
0 answers
48 views

Monte Carlo and function minimization (simulated annealing)

I posted this question on math.stackexchange, but did not get an answer and a limited amount of views, so I removed the question there and post it here. Recently I was asking myself some basic ...
user avatar
  • 663
1 vote
2 answers
22 views

Is there a method to select elements negatively proportionate to a categorical distribution?

I have a categorical distribution which depicts the probability of bad choices. I want to select elements negatively proportionate to that categorical distribution, i.e., if my categorical ...
user avatar
2 votes
1 answer
23 views

How to choose a sample of a text dataset to label?

I was reading about active learning recently and active learning seems to be used after the first model is generated. So, I was wandering if there are technics to choose what to label before ...
user avatar
0 votes
0 answers
19 views

Likelihood A>B, Given Margin of Errors For A and B

Let's say in a video game there are 2 different attacks I want to test, A and B. They have a RNG component so damage varies from one sample to next. Both follow a standard distribution. I test by ...
user avatar
0 votes
0 answers
30 views

Sampling Puzzle

There is a bag with N = 50 balls. Among which M = 10 balls are red, and N-M = 40 balls are blue. Further, say the red balls are numbered among themselves from 1 to 10, and the blue balls are numbered ...
user avatar
0 votes
0 answers
20 views

Probability of failure of Uniform Sampling [duplicate]

Say I have a bag with 10 numbered balls, and I pick one ball at each time step and then put it back in the bag. Since each ball is equally likely, therefore the current situation represents a uniform ...
user avatar
1 vote
0 answers
35 views

What is the correct way to sample from a large dataset with several years of data?

I'm a student doing a machine learning project. I'm using the Lending Club Dataset 2007-2018 to predict loan default. The original dataset contains over 2 million rows. I want use a sample from it to ...
user avatar
0 votes
1 answer
16 views

How to calculate sampling error for proportionate sampling?

I have done sampling using Proportionate Stratified Random Sampling. The table below shows the proportion of each groups in the sample and population. This is the formula for Standard Error (...
user avatar
  • 73
0 votes
0 answers
19 views

How to deal with limited sampling when analyzing a probability distribution

I constructed a probability histogram for my data and wish to construct a log-log plot to look at the distribution, but the sampling (I'm not quite sure how to phrase this) is very poor at the tail ...
user avatar
1 vote
0 answers
16 views

Is my sample sufficient for PCA?

I’m working on a project for my stats class and I’m wondering if my sample size is sufficient for PCA; I keep seeing mixed recommendations so I figured I’d ask. My sample size is 50 (unit of analysis ...
user avatar
1 vote
0 answers
17 views

Draw a stratified sample in panel data

Question: How can we draw a stratified sample in panel data context when the stratifying variables are not fixed over time? Background: I have panel data on workers (id) over time (t). I want to draw ...
user avatar
  • 253
1 vote
0 answers
34 views

How to check if the sample represents the population data?

The below table is similar to the population ...
user avatar
  • 73
2 votes
2 answers
93 views

8 out of 10 Cats - Optimal Sample

I was watching a lecture earlier by Marcus du Sautoy called: 'Thinking Better with Mathematics.' Marcus discusses the statistical sample sizes to verify statements about the population. In his own ...
user avatar
  • 174

1
2 3 4 5
59