# Questions tagged [weighted-sampling]

If you have survey data with weights, please use "survey-sampling" instead. If you need to draw Monte Carlo samples from a distribution that is intractable/inconvenient, and have to use a sampler from a simpler distribution that you would then correct with weights, please use "importance-sampling", "monte-carlo" and/or "simulation" instead.

133 questions
Filter by
Sorted by
Tagged with
20 views

### Stratified Sampling from a population according to given weights

I have a population and i want to take a sample from it in order to examine a mean of a characteristic (say $p$ the probability of having an infringment).My population is 13996 and are divided into 7 ...
27 views

### Logistic regression for case-control studies

If I have designed a study where participants from 3 disease groups of fixed size were being sampled and suppose the three groups A, B and C are of sizes n_A=50, n_B=50 and n_C=100. Group A is a ...
181 views

### Best way to construct a QQ-plot

I want to assess the normality of a dataset (which is log-normally distributed data transformed back to normal) using a Q-Q plot. I stumbled on the fact that there are many ways to build such a plot, ...
22 views

### Propensity Score Weighting in GAMLSS

in a project of mine i want to use a propensity score weighted gamlss model. However, the gamlss user guide states "In general using weights that are not frequencies is not recommended unless the ...
115 views

### How to estimate the (approximate) variance of the weighted mean?

Background: weighted mean In the context of survey statistics it so happens that a sample of respondents from a survey are fit some weights to adjust their answers to the general population. These ...
36 views

### An alternative sampling without replacement

Consider a set $X := \{x_1, \ldots, x_n\}$ with corresponding weights $p_1, \ldots, p_n$. Suppose we would like to draw $m < n$ distinct (i.e. unique) elements in a way that the probability of ...
11 views

### Comparing rates of different populations given as percentages instead of raw numbers

Here's an example of what I mean. 500 Consider a hypothetical game played by members of a population of unknown size. Group A is 13% of the whole population and scores 500 points in a game. Group B ...
14 views

### Handling class-imbalanced independent variables in binary classification

I am working on a binary classification model (in R, if that matters). I have done some research and reading on how to handle a class imbalance in the dependent variable, with different sampling ...
22 views

### Sampling with a variable number number of picks

Imagine we have N items and some weights w for each item, we first draw a random integer s (fom uniform) $s \sim int(U(1, N))$ and then we sample s items according to weights w (no replacement). ...
179 views

### How to calculate weighted average based on two variables: sample size and pollster grade?

Let's say I have a dataset with three columns with 5 rows and 3 columns. Each row represents a separate poll result of a single political party. The columns are poll prediction, sample size of the ...
19 views

### K-means++ for weighted clustering

I have implemented k-means for weighted points; that is, the final clusters take into account the fact that each input point is weighted. I wanted to initialize the clusters using k-means++, and I was ...
12 views

### "Weighted empirical distribution", terminology question

I have some weighted simulations of two variables. I would like to have an idea of how they are correlated. An option is to use a bivariate density estimate which allows the weights. Another option is ...
22 views

### How should one compute confidence intervals for means computed with inverse propensity weights (IPW)?

Inverse propensity weighing involves a machine learning model that takes features and outputs the predicted probability that this person is in the sample. Let $w_i$ be the inverse of the output for ...
298 views

70 views

### Sample unique elements from an array containing repeated values

I have a table containing elements in $[1,c]$. The elements may be repeated in the table. I want to sample $m$ unique elements from this table. I can reduce this problem to weighted sampling without ...
136 views

### Neural Networks: How to set the weights for weighted sampling for semantic segmentation?

I'm currently trying to do semantic segmentation with a deep learning model on images. The dataset is highly imbalanced and i would like to try weighted sampling. I'm using pytorch and a dataloader ...
18 views

### Help with weighting sample according to population

I am a beginner with basic knowledge of statistics - just learning. I have a doubt regarding weighting survey sample distribution to population distribution. I have to create a weighting variable that ...
1k views

### Is there any reason to factor in sample weights when applying a scoring function to a test set?

It's my understanding that sample weights are used to ensure that each observation used to train a machine learning model are given a weight corresponding to its perceived importance/value to the ...
83 views

### Nested Uniform Distributions in Monte Carlo Integration

In terms of importance sampling for numerical Monte Carlo integration we can proceed as follows: \begin{align} \int_{\Omega} p(\mathbf{x}) d\mathbf{x} &= \int_{\Omega} p(\mathbf{x}) \frac{q(\...
29 views

### Estimating from Biased Sample

ORIGINAL: This is a rather convoluted problem, but I will try to explain it as clearly as I can. I have a discrete, known population with 1,000,000 possible values (call this set A), with roughly ...
22 views

### Calibrate Sample: What kind of data do I need to address non-respondents? [closed]

I want to weigh my sample to include non-respondents in my estimations. We have multiple factors which should be taken into account. So it's not only about weighing after gender for example. We have ...
947 views

### Correct use of the sample weights in a complex survey design for association analysis (Logit OR)

I've doubts about the correct use of sample weights in the NHANES survey, which uses a complex, multistage probability sampling design (1). I'm aware about the importance of the use of the sample ...
472 views

### How to compute confidence intervals from *weighted* samples?

Imagine we have a webserver, which serves a total of N static URLS. There are users visiting the URLs every day. At the end of each day, we have data like this: ...
100 views

### why sampling weights that I have range from 1, not 0?

I am looking at a dataset from Pew Research Center. Inside the dataset, different survey waves have their own weight variable with sampling weights. I thought in general it is supposed to range from 0 ...
137 views

### How to use derivatives of a function to better estimate its variance over the domain?

How to use derivatives of a function to better estimate its variance over the domain? I have a scalar smooth function $f(x)$ and a multivariate random variable $x$ with known distribution (e.g. ...