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.

Filter by
Sorted by
Tagged with
0
votes
0answers
31 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 ...
0
votes
0answers
11 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 ...
1
vote
0answers
10 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 ...
1
vote
0answers
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 ...
1
vote
1answer
67 views

Questions about object function and loss function in weighted logistic regression

According to what i learned in machine learning, the loss function is derived by the Maximum likelihood estimation of training data. Taking logistic regression as an example: we got a train data set $\...
0
votes
0answers
10 views

How to compute longitudinal weights for the two waves I have (in STATA)?

The first wave (w1) has 1000 participants and the second wave (w2) has 450 participants. Those 450 participants from w2 are recruited from the w1 (so they have definitely participated in w1). I now ...
0
votes
0answers
5 views

selecting sub-groups on one variable before correlating with another

I am wondering what the potential pitfalls are of the following approach. I want to check whether a neural measure is related to a questionnaire measure. I know that this is rarely the case (...
0
votes
1answer
43 views

How can I prove that two algorithms for weighted sampling without replacement are equivalent?

I have a table with N rows and n unique elements. Let j denote the row index and i denote the element. In the table below $N=9, n=3$. Let $w_i$ denote the count of element i. For example, $w_1=4, w_2=...
0
votes
0answers
54 views

Calibration of RF classifier: with sample_weight vs. without sample_weight

I am working with Random Forest binary classifier and use isotonic regression (using CalibratedClassifierCV from sklearn) for probability calibration. The question: assuming that RF classifier is ...
0
votes
1answer
38 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 ...
0
votes
0answers
54 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 ...
0
votes
0answers
23 views

Adding Post-stratified Weights to IRT 3PL Model

I am using IRT, 3 Parameter Logistic Model (3PL) for parameter estimation of my question parameters. As my data is biased I calculated Post-stratified weights using sample and population data. I want ...
0
votes
0answers
21 views

Post Stratification & Calibration? - Adding weight's - CALMAR

Let's suppose that I want to compare the average spending of both groups and I have two groups with 2 features in each one: Each client is unique and CityCode has only 2 groups CA and CB and AgeCode ...
0
votes
0answers
17 views

sample weights for time series classification

I am using time series of macro data (i.e. FX rates, commodity indices, sentiment indices, bond yields/spreads, and equity indices and change in their P/E estimates, etc) for predict market pullback. ...
0
votes
0answers
11 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 ...
2
votes
2answers
388 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 ...
2
votes
1answer
77 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(\...
0
votes
0answers
34 views

Understanding weighting class estimator

What I understand is that in this scenario, the data is partitioned into Z weighting classes on the basis of variables observed for respondents and nonrespondents. $n_z$ represents the sample size, $...
1
vote
0answers
28 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 ...
0
votes
1answer
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 ...
3
votes
1answer
661 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 ...
4
votes
1answer
315 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: ...
1
vote
1answer
38 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 ...
0
votes
1answer
100 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. ...
0
votes
0answers
27 views

Computing the Sample Size for the sum of Bernoulli RVs with different probabilites times a constant

I have the following statistic for which I need to figure out a sample size: $$S= \frac{1}{n}\sum_{i=1}^n \left(c_i+\sum_{j=1}^{100} b_{ij}X_i\right)$$ where $c_i$ and $b_{ij}$ are constants and $...
5
votes
2answers
1k views

Which is the right way to handle imbalanced data in a regression problem?

I'm working on a regression problem with imbalanced data, and I would like to know if I'm weighting the errors correctly. I'll try to illustrate the concept with a simple example. Imagine I'm ...
0
votes
1answer
17 views

Uncertainty-minimizing stratified sampling strategy

Suppose there is a school, and I want to know what proportion of students like the color red better than green, or vice versa (suppose there is no "other" option, just a binary variable). The school ...
0
votes
1answer
16 views

Resampling to get equal predictive power per observation

Cross posted from data science due to lack of response This is probably a thing I am just not searching for correctly, but essentially my idea is this: given some machine learning classification $C$ ...
1
vote
1answer
760 views

How to calculate importance weights for update step of an SIR (Sequential Importance Resampling) Particle filter?

I understand that one may use a particle filter to solve the filtering problem (estimating the hidden state of a system which can be described as a Hidden Markov Model). If I have a system where I ...
2
votes
0answers
326 views

Equivalence of svyglm and glm for simple random surveys

I have been exploring the use of the svyglm function in R's survey package to analyse surveys with both equal and unequal sampling probabilites. For an unequal ...
3
votes
1answer
229 views

Finding median without raw data?

I have only summary statistics for each state in the United States. I have the mean and median prices for each state and that’s it. How can I estimate an “overall” median price for the nation? I ...
2
votes
1answer
66 views

Application of Bayesian Averaging for Ranking

I have a sample with two metrics and one ratio per attribute. I am trying to rank the attributes based on the ratio and variable amounts and from my research I have found that most people find ...
1
vote
0answers
276 views

What is the Effect of Weighting observations when training a Classifier and how it can be combined with Subsampling?

My question is what is the effect of assigning weights to observations when training a Classifier such as a Logistic Regression model. The glm function documentation in R for example states: Non-...
0
votes
1answer
2k views

Equivalent to weighted random sample? [closed]

Let's say that you have a list of numbers and a weight for each number e.g. X = [(1, 2342), (2, 55), (3...] In the above example, 2342 and 55 are weights. Is weighted random sampling N items from ...
2
votes
0answers
202 views

Hypothesis testing on Weighted Poisson Binomial Distribution

Suppose I have $i$ coins, all of which are weighted to have a different probability $p$ of flipping heads. This results in $i$ Bernoulli distributions with different $p_i$. Cumulatively, this results ...
0
votes
1answer
62 views

Can someone point me towards research works relevant to Importance or Weighting Datapoints like SAW(Stepwise adaptation of weights) technique?

I am working on Fitness case importance for Symbolic Regression and found a Paper "Step-wise Adaptation of Weights for Symbolic Regression with Genetic Programming" which talks about weights of ...
1
vote
0answers
97 views

what is weight vector and bias in svm [duplicate]

I'm trying to understand the SVM algorithm but not able to understand what weight vector and bias is ? Could anyone explain it in laymen terms.
3
votes
1answer
3k views

SE of weighted mean

$X$ is a random variable with unknown distribution. A number of experiments are conducted to estimate $X$. Each experiment has a different reliability measure in estimating $X$. These $n$ experiments ...
1
vote
1answer
622 views

Survey sampling : normalised weights or not?

I work in epidemiology on a sample which is stratified, and 2 – level cluster (801 individuals). I use the "survey" package on R for data analysis. In the sample, the sum of weights is the size of ...
0
votes
1answer
663 views

How Do I Weight a Dataset to Match Needed Demographics in R?

If I have the attached file of 100 people with this dataset with the following demographics/regions: Region: Center: 12%, East: 62%, West: 26% Sex: Female: 82%, Male: 18% Party: D: 89%, R: 4%, O: 7% ...
3
votes
1answer
204 views

Ranking with weighting amount of data

I'll try to ask this question in a form of a hypothetical: I have 10 different advertising spaces and I want to rank them according to their conversion rate (conversions/views). BUT, I have an uneven ...
4
votes
0answers
116 views

Appropriate sample size for weighted sample

I have a population that is sampled such that each item has a different probability of being selected. That probability is separate and independent of the value of any given item. How do I determine ...
1
vote
1answer
94 views

Test fitness proportionate selection algorithm implementation

I implemented a couple of algorithms for fitness proportionate selection (roulette-wheel, alias method and roulette-wheel via stochastic acceptance) and now I want to write a test to ensure that ...
4
votes
1answer
646 views

“representative sampling” from a distribution [closed]

I'm drawing samples from a distribution to train a machine learning classifier (training it via mini-batches of 32 samples at a time). It's just a toy dataset, so I know that the samples are coming ...
1
vote
1answer
34 views

Evaluating quality of a sampler on a small subset of the entire sample space

Assume a multi-dimensional discrete sample space $X$, which is "large", e.g. millions of possible objects. Function $f: X \rightarrow (0;1]$ that assigns a "reward" to each object $x \in X$ (the ...
1
vote
0answers
58 views

Biased coin randomization with adjustments over time

Assume an experiment that was going to consider different randomization strategies to address different challenges. The experiment involves an experimental (active treatment) and control group (usual ...
0
votes
1answer
91 views

Power Analysis Weighted Data

Suppose an outcome depends on the intensity of a treatment intervention $\pi$, where $\pi \in [0,1]$. Given intensity of treatment $\pi$, the data generating process is $$Y_i = \beta_0 + \beta_1 \pi +...
3
votes
0answers
333 views

For classification w unbalanced datasets, is class-weighing the same as oversampling?

in unbalanced classification problems, I find myself using class_weigh = "auto" or similar parameters often, but I don't think I'm fully understanding what it's doing. I know that it's the industry ...
0
votes
0answers
678 views

Ranking based on weight for multiple variables and objectives

First of all, I know very little about statistics. I need help ranking a set of multiple solutions (about 138 solutions) based on three objectives. I work on the architectural design field, I analyzed ...
3
votes
0answers
70 views

What is the Big O of rejection sampling from large sets of weighted items (like billions of records)?

On average, how many "rejections" will I get before I get an acceptance (for large sets using weights)? This answer suggested O(log n)?