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
0
votes
0answers
12 views

Sampling distribution of exponential sample variance (formal not empirical)

Addressing this problem: Let X1,...,Xn be independent identically distributed exponential variables with parameter θ, i.e. with pdf, f(x)=(1/θ)*exp(−x/θ). What is the distribution of the sample ...
0
votes
0answers
4 views

Aggregating a multivariate distribution

I'm currently trying to investigate how to 'quickly' measure the distance between a sample of data and a larger distribution of data. I have looked at the Kolmogorov-Smirnov test, which in some paper ...
3
votes
1answer
47 views

Optimal selection with multiple parameters

I have a problem of optimal selection given many parameters. I will try to simplify my problem in this example below: Suppose I have a basket with 100 balls in 10 different colors (not equally ...
0
votes
0answers
15 views

Minimum sample size for estimating unique followers of three Instagram accounts

I want to determine the number of unique followers between three (or more) large (>1e6 followers) Instagram accounts. Is there a way to determine the minimum number of followers per account I would ...
0
votes
0answers
41 views

How to generate the data from multivariate normal distribution defined for ordered arguments?

Let $N(x_i | \mu_i, \sigma_i)$ be the probability density of normal univariate distribution with mean $\mu_i$ and scale $\sigma_i$. Let $f(x_1, \ldots, x_n) = \prod_{i=1}^n N(x_i | \mu_i, \sigma_i)$ ...
0
votes
1answer
25 views

Sampling distribution of AUC in multivariate normal distribution

I need to derive the sampling distribution of the above equation, which is sample mean of the AUC from what I see. The first picture describes the distribution of the data, which I understand is ...
1
vote
1answer
30 views

Generating n distinct combinations from a weighted distribution

If I'm not mistaken, this is an extension of this question: How to resample in R without repeating permutations? I have a vector x representing a non-uniform ...
3
votes
2answers
179 views

Simulation from a multivariate distribution (How does it work in practice?)

My textbook says, for a multivariate case, say $f(x_1, x_2, x_3) = f(x_3 |x_2, x_1)f(x_2|x_1)f(x_1)$, we would simulate a value from the density $f(x_1)$, then using this value simulate from $f(x_2|...
0
votes
0answers
13 views

Systematic Sampling with Fixed Start

I'm confused about the definition of systematic sampling. Does it matter if I select the first population unit at random? For example, say I want to conduct a survey to find out the satisfaction rate ...
0
votes
0answers
17 views

What methods work for assigning population into groups while matching average parameters

I have $N=1000$ population size which is distributed into $K=10$ groups (A, B, C..) with a different number of people in each. Every person belongs to one and only one group. We know weight has 4 ...
0
votes
1answer
16 views

How to get a better importance sampling algorithm

I am trying to code some importance sampling algorithms, but I have a question about how importance sampling works. Say we want to estimate the expected value of some function $h(x)$, with samples ...
0
votes
0answers
10 views

Random sampling into two samples

I had a question about random sampling to create two datasets. Say I have a dataset $D$, with $N$ rows and $M$ columns. Each column is a feature $X_{1},X_{2}...X_{N}$, and each feature has an ...
1
vote
2answers
32 views

Why does it make sense for all the members of a random sample to come from the same distribution?

In all the examples I've seen so far, we always make the assumption that when we take a random sample from some population, each member of the sample comes from the same distribution as the other ...
0
votes
0answers
17 views

SKLearn/Python - How to sample dataset according to a certain distribution?

I have a set of training data and a set of test data. The test data itself is similar to the training data, however, it has a different distribution on its own than the whole training set. I'd like ...
0
votes
1answer
27 views

Problems with using Gibbs Sampling for Bayesian DAGs

Assume we want to sample from the variables of Bayesian belief network, which is a Directed Acyclic Graph (DAG), where we observe some of the variables, and do not observe the others. We can usually ...
2
votes
0answers
27 views

Why gradient boosting uses sampling without replacement?

In Random Forest each tree is built selecting a sample with replacement (bootstrap). And I assumed that Gradient Boosting's trees were selected with the same sampling technique. (@BenReiniger ...
1
vote
0answers
28 views

Sampling states of an “unnatural” Hamiltonian System

I would like to sample from a Gibbs distribution given by $$f(p, q) = \frac{1}{\mathcal{Z}}e^{-H(p, q; \omega, J)}$$ where $H$ is the Hamiltonian on generalized coordinates $(p,q)\in \mathbb{R}^{2n}...
0
votes
0answers
16 views

How do I select the sample in Disproportionate Stratified Random Sampling?

I'm conducting an experiment towards tenth graders in a school. The population comprises 903 students and the sample taken based on Isaac Michael table is 251 students. If the total subjects of each ...
5
votes
1answer
90 views

Sampling from dataset according to distribution obtained from another dataset

Suppose we have dataset $A$ with several categorical and numerical features: $A_{cat_1}$, $A_{cat_2}$, $\ldots;$ $A_{num_1}$, $A_{num_2}$, $\ldots;$ Also we have another dataset $B$ with the same ...
5
votes
1answer
210 views

How big should be a sample to be statistically significant?

This is my problem: I need to sample from a random variable that I assume to have a gaussian distribution. I want to estimate the mean and the std of the variable by doing as little sample as possible....
0
votes
3answers
59 views

In spatial data, does unevenly distributed data create model bias?

The scenario: Suppose there is a square shaped region with three cities in it. A dataset is collected by citizens, who collect data where they live. Thus, data is collected much more heavily in those ...
0
votes
0answers
24 views

How to sample in Bayesian inference model?

I have the following problem to model in R. If we have $X_1, ..., X_n \sim N(\theta,1)$ and want to estimate $\theta$, we assume $\theta$ has a prior distribution, and the Bayes estimate of $\theta$ ...
0
votes
0answers
16 views

Chaos Theory, and Logistic Function 𝑋_{𝑛+1}=𝑟⋅𝑋_{𝑛}⋅(1−𝑋_{𝑛}) For Sampling music

This is a curiosity question, and I'd appreciate some insight and sources to delve deeper. The question is about the logistic function and sampling signals. I just saw a video about the logistic map/...
0
votes
0answers
14 views

How to sample from 1 data set to match distribution of variable in another data set?

I have dataset 1 and another dataset 2. All values from dataset 2 are in dataset 1, however, dataset 1 has a variable X that does not match the distribution of data set 2. Is there a way I can sample ...
2
votes
0answers
187 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 ...
0
votes
0answers
10 views

Stratified Sampling: use and interpret Instance Weight for EDA and modelling

Context I am working on a data mining project (EDA + Predictive Modelling) using the US census income data, which consists of training and test instances obtained using stratified sampling over the ...
2
votes
0answers
36 views

Inverse sampling a direction over the hemisphere of a surface?

Let $S^2:=\{x\in\mathbb R^3:|x|=1\}$ denote the unit 2-sphere, $$\omega_{x\to y}:=\frac{y-x}{|y-x|}\;\;\;\text{for }x,y\in\mathbb R^3\text{ with }x\ne y,$$ $M\subseteq\mathbb{R}^3$ be the disjoint ...
0
votes
0answers
26 views

random of sample of more than you plan to use?

My client is asking me to randomly sample 20 clusters when they only plan to use 10. They are doing this in case something happens and some cannot participate. I'm thinking this is no longer a ...
0
votes
0answers
6 views

How do I set a benchmark for a laboratory measurement from known data?

A colleague is trying to gain formal control of a laboratory process and needs my help. The process involves transferring a liquid into an empty vial using a qualified liquid delivery device (e.g. ...
0
votes
0answers
39 views

Sample conditional multivariate random variable?

There's multivariate random variable, future prices of assets, 5 years from now: $$X = [Gold, Silver, SP500]$$ There's historical prices for $X$ available for last 50 years. It's possible to fit ...
0
votes
0answers
11 views

Does respondent-driven sampling benefit by designing recruitment to encouraging mixing?

In respondent-driven sampling (RDS), recruitment of respondents (aside from the initial seed respondents) is accomplished by incentivizing respondents who have participated in a study to recruit ...
2
votes
0answers
25 views

Inverse transform method with piecewise pdf

I am having trouble using the inverse transform method with the generalized inverse $$F^{-1}(u) = \inf \{x : F(x) \geq u\}$$ In this case, I have a piecewise pdf $$f(x) = \begin{cases}x, & 0 \...
0
votes
0answers
11 views

How to sample from a mixture of densities of transformed random variables?

Suppose we are given a set of $m$ random variables, $X_1$, $X_2$, ..., $X_m$, defined over the same set $\mathcal{X}$, with known densities $p_{X_i}$, for $i=1$, $2$, ..., $m$. Assume that getting ...
2
votes
0answers
37 views

Simulate correlated Poisson samples

I am wondering how I can simulate Poisson data that is correlated. Let's say, I collect data at two time points. At both time points, the data is Poisson distributed, at time point 1 with $\lambda=4$, ...
0
votes
0answers
22 views

Two-stage stratified cluster sampling with “overlapping” PSUs

Let's say I want to do a survey getting a representative sample for an entire population P, as well as groups A and ...
0
votes
0answers
25 views

Sampling big dataset

I am currently running some models on a very large dataset (instacart basket analysis, ~134MM rows) and was wondering on how to pick the right sample size to iterate and evaluate different models ...
4
votes
1answer
30 views

How do I sample a multivariate posterior when I can sample the likelihood and prior?

Suppose I want to sample the posterior distribution of a multivariate $\beta$ given some scalar $x$. By Bayes' theorem, this distribution is $$P(\beta|x) \propto P(x|\beta)P(\beta) $$ I don't have ...
0
votes
1answer
36 views

Parameter Estimation via MCMC

In general, we use MCMC method to sample from a distribution which is hard to compute. In Bayesian setting, we sample from the posterior distribution of the random parameters defining the underlying ...
2
votes
3answers
62 views

Random undersampling: is there a way to chose the best majority samples?

I'm modeling credit fraud, where I have a small number of samples that result in fraud (1), and most samples that are not fraud (0). I am creating a models for detecting fraud based on new data. I'm ...
0
votes
0answers
25 views

Gibbs Sampling for Order Restricted Bayesian Inference

I am trying to learn Gibbs Sampling for Bayesian Inference, I am very confused about the following setting. Suppose we observe $X :=(x_1 , \dots, x_N)$ where $x_i $ is binomially distributed ...
2
votes
2answers
175 views

Can a sample larger than 5,000 data points be tested for normality using shapiro.test by applying the test to a subsample?

I have a number of samples that I would like to test for normality. One of the samples exceeds 5,000 data points, the limit up to which the shapiro test accepts samples. This is the data: ...
1
vote
1answer
43 views

Estimating population defects from a sample size

2 questions: Question #1: I have a lot size of 240 and have drawn out a sample size of 20. Assuming I test the 20 units for go/no-go (i.e. it's binary, pass/fail) and I have Zero failures.....what is ...
2
votes
0answers
22 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 ...
0
votes
1answer
28 views

Standard deviation of sample proportions (standard error) in R

This resource states that the standard deviation of the sampling distribution (the standard error) is equal to: They provide an example where a population has p=0.6 and samples of n=25 are drawn from ...
0
votes
0answers
42 views

how to choose a sample?

I need to review 600 exams with burbles by hand (I have a software to read them all). How many exams do I need to review in order to have 95% of chance of my software is working properly? I think ...
1
vote
1answer
43 views

Problem of unbalanced data [duplicate]

unbalanced data is an issue that can effect the performnce of classification model ,several remides can be done to balance the data two of them are upsampling and downsampling , my questions is : how ...
2
votes
1answer
26 views

probability sampling calculating probabilities

Consider a population with 10 elements , N:{0,1,2,3,4,5,6,7,8,9}. The probability of drawing ...
0
votes
0answers
7 views

Seasonality affects samples on a heterogeneous system?

In a time window of a year, suppose that a social networks has a bimodal normal distribution that peaks at April and October approximately. Being a heterogenous social network, it has different types ...
1
vote
1answer
30 views

Standard deviation in Direct-Sampling

In a computational physics course, I was asked to do direct-sampling for the numerical value of $\pi$ and then I estimated the standard deviation of $\pi$ , ...
0
votes
0answers
17 views

statistic significance of proportions

Let's assume someone buys a bag of smarties, and finds that it includes 22 brown candies 19 red candies 16 yellow candies 15 blue candies 8 green candies How can we use a test of significance to ...

1 2 3 4 5 46