The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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

2,169 questions
Filter by
Sorted by
Tagged with
29 views

### Dealing with non-representative samples of a larger population

I'm seeking some advice about a project that I am working on. In this project, my colleagues and I are planning on collecting a sample that is intended to be representative of the national adult ...
18 views

### Sample from known function

I am wondering how is it possible to not be able to sample from a function that is known. E.g. suppose the expression of $f(x)$ is known but we need to approximate it in order to sample from it, why ...
19 views

### Best way to measure treatment effect across two treatments

I have two sets of patient-level data for two distinct treatments, unfortunately, the data is only over a 14 week period and I'm hoping to build a predictive model to estimate/simulate what the data ...
33 views

### sampling mechanism for correlated variables [closed]

Assuming Y=f(x1,..,Xn), while doing Monte Carlo simulation, I need to sample x1, ..xn based ...
85 views

### What does it mean to generate a random variable from a distribution when random variable is a function?

I am looking at a reference for sampling from a distribution, and the first step of the so-called algorithm states:http://www.columbia.edu/~ks20/4703-Sigman/4703-07-Notes-ARM.pdf Generate a random ...
18 views

### Randomized blocking “after the fact”

I have 5 treatments that I'm going to randomly assign to visitors to my website. I'll have 10,000 or more visitors. Is it statistically valid to analyze the results based on visitor characteristics ...
50 views

### Does standard error for a sample mean make assumptions about the distribution?

Suppose I calculate standard deviation of a sample mean as $\sigma / \sqrt{n}$ where $\sigma$ is the population standard deviation and $n$ the sample size. Have I just made an assumption that the ...
18 views

### Why the ratio of (distance from expectation)^2 / expectation in a goodness fit test follow a chi-square distribution?

I know that the sum of square of normal random variables follow a chi-square distribution. But when I learn how to do a goodness-fit test I don't know why the ratio of (O-E)^2/E follows a chi-square. ...
23 views

### Gibbs Sampler for mixture models: shall I skip some samples to avoid to use correlated samples? [duplicate]

I am implementing a Gibbs sampler in order to estimate the parameters of a mixture model. Assuming that the parameters are contained in a vector $\theta$ what I will do is: Implement and run the ...
348 views

### What are some techniques to augment tabular data?

As we know we can perform data augmentation to "image dataset". We can apply random rotation, shifts, shear and flips over images. Are there techniques to augment tabular small dataset? I know the ...
133 views

23 views

### Determining probability of a sample proportion [ex. from Khan Academy]

I need a bit of clarification to understand sampling distributions through Khan Academy. My answer is widely different than the answers given in the sample The example question can be summarized as: ...
24 views

### Sampling methods - Stratified Vs. Probability Proportionate to Size Cluster

India has 29 States, each of which is further sub-divided into smaller administrative Districts of varying size and population. I need to download micro (firm-level) data from each state, but I do not ...
57 views

### Generating very few samples from a probability distribution using MCMC?

Since MCMC converges to target only after taking very large number of steps, what if I want to have just say 10 samples from target distribution? Do I still have to generate lots of samples, and then ...
56 views

### Resample from data with constraints to the marginal distribution

Motivation This problem comes from the situation where I have a non-random sample of individuals for which $p$ variables are measured. The target is to extract a subset of individuals which would be ...
240 views

### Should training data in each batch size be resample only one time or at each epoch when using mini-batch

I saw some related question regarding to the fact is one should use sampling with resampling or without when using minibatch. However my question is different. Let's assume that I use sampling ...
362 views

### How to use data_utils.WeightedRandomSampler and still be able shuffle training data in Pytorch?

I am working on the multi-label classification task in Pytorch and I have imbalanced data in my model, therefore I use data_utils.WeightedRandomSampler method ...
33 views

### sampling from multivariate distribution using copula

I'm trying to get a sample from a multivariate distribution which is constructed by copula. this is the steps that i go,is it true? at first i estimate the copula and the marginals then get a sample ...
1k views

### Sampling from empirical distribution

I have a vector of y (min is > 0, max could be 1), for which, i have no idea what distribution is. But based on the data we have, vector y, we can get the empirical cumulative probability distribution,...
19 views

### Measurement theory and sample size calculation for multivariate testing

Let $\mathbf{Y}$ be a vector of independent, normally-distributed random variables. Let $S_1$, $S_2$ and $S_3$ be three non-overlapping samples of sizes $N_1$, $N_2$ and $N_3$, respectively. Let $M_A$ ...
24 views

### Quality metric of sampled time series data

I have a time series that has too many points. I sample one in every 100 points, in order to reduce the amount of data I need to transmit from my measurement device. What accuracy metric can I use ...
119 views

### Gibbs sampler for Dirichlet Process concentration parameter

I am trying to implement a Gibbs sampler for Hierarchical Dirichlet process, but I cannot seem to correctly estimate the concentration parameters. I therefore started testing just this part of a ...
78 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 ...
82 views

### Can the Bayesian but not the frequentist “just add more observations”?

Since the frequentist's p-values are uniformly distributed under the null hypothesis, it is a highly problematic practice to add more and more data to your sample until you find a significant result. ...
62 views

### Use samples from each individual or pool samples from several individuals.

I have a system that can predict that can predict the blood pressure for hospitalized patients from zero to 120 minutes into the future. Now I want to see if my predictions are statistically ...
77 views

### Measure that takes samples that is minimized in expectation for a uniformly-distributed random variable?

I am having trouble thinking of a function that operates on a set of samples, that is, single-valued random variables between zero and one, $x_i \in (0,1), i\in\{1,2,...I\}$, and provides a measure of ...
86 views

### Conditional Distribution to sample

Suppose I have six data points (n,x): (14,5), (13,4), (7,3), (10,5), (12,7), (20,13) which are realizations of binomial experiments on n trials with x successes respectively.. And I assume I ...
76 views

### Sampling distributions seem to be quite useless

I am studying estimation and found the concept of sampling distribution hard to grasp. The book I am reading claims that "sampling distributions" answers the following question: how confident should ...
152 views

### How to create a distribution and sample?

Suppose we are given some small set of data on bundles of electrical wires and increasing voltages run through them, and we note how many of the individual wires fail. So for example, a large data ...
77 views

### Obtain a random sample from a sum of two dependent random variables

Suppose $X$ and $Y$ are dependent random variables and I know the marginal densities of $X$ and $Y$ (if simple we can assume they are Gaussian). Using a copula I may be able to estimate the joint ...
130 views

### Machine learning algorithm test/evaluation sample size

I have recently implemented a machine learning algorithm as a part of a new credit risk scoring system. I would now like to evaluate the accuracy/performance of the algorithm when used in a "real ...
27 views

### Almost Sure Convergence and Subsamples

My actual question is in the last paragraph, but I will start with a basic example. In the book "A Course in Large Sample Theory" (Ferguson), they present the Strong Law of Large Numbers as the ...