Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [weighted-mean]

A weighted mean (or weighted average) is like an ordinary mean, but the observations don't contribute equally - more emphasis is placed on some data values than others; they are weighted by a bigger or smaller amount than 1/n.

0
votes
1answer
29 views

How to calculate weighted average of hourly sales in a day

I have hourly sales data & want to aggregate it to a day level. Out of 24 hours, we are classifying 6 hrs as peak hours and 18 hrs as non-peak. Assume peak hr sales for a day as: $X_1,X_2,\ldots,...
0
votes
0answers
17 views

Standard error or confidence interval of a weighted average

I am calculating a weighted average according to, $f = \sum_{x=1}^{3} a_{x} \sum_{i=1}^{10} d_{x,i}w_{x,i}$, where $d_{i}$ are the values being weighted and $w_{i}$ are the weights. $a_{x}$ is ...
1
vote
1answer
22 views

A good measure for skewed values

I have a table with the list of values as shown below. A Model Number is like a parent Disease. The below table can be read as Patients under Model Number 200(Stroke) are 2.456 more likely to have ...
0
votes
0answers
21 views

Mean and Variance of weighted sum of n random variables? [duplicate]

Suppose we have n jointly distributed random variables $x_i,i=1,...,n,$ with mean and variance $E(x_i)=\mu_i$, $Var(x_i)=\sigma^2_i$ and covariance $Cov(x_i,x_j)=\sigma_{ij}.$ Then the weighted sum of ...
2
votes
0answers
75 views

Weighted average of averages or average of weighted samples?

I have to estimate the average amount of goods that will be produced by machines per resource unit. Each machine will be working in one of two modes (A or B) and I know their proportions ($p_A$ and $...
0
votes
0answers
11 views

With few respondents on a 1 to 10 scale, is it better to use a weighted mean or the median?

I have survey data where ~20 respondents replied to some questions on a scale of 1 to 10. For the most part, none of the distributions are Gaussian. A set of questions look to find out a participants ...
1
vote
1answer
41 views

Combine mutliple predictions

This question had been asked several times in here, but I think I have something new to add. I'm interested in predicting if some specific event will happen (binary classification). I have two ...
1
vote
0answers
20 views

Error on distribution of values with uncertainties

I'm currently analysing a measurement which results in a high number of values, each having a slightly different uncertainty. These values are following a gaussian distribution, so I wrote a python ...
0
votes
0answers
5 views

change a categorical variable to a numeric variable in Stata [duplicate]

if income in the data was asked as an interval qs, i.e. individuals allocate themselves within an income interval/category, how do I convert it into a numeric variable in order to get the average ...
3
votes
1answer
52 views

What's a good measure of spread when using a weighted average

It's often useful to display a measure of spread when presenting an average. Example: the average revenue per customer per transaction is \$100, meaning that (assuming a distribution roughly ...
2
votes
0answers
15 views

Is there a term to refer to a weighted mean that's weighted by a function of percentile (using a kernel)?

I came-up with a type of central tendency which is a weighted mean. The weighting is based on percentile, with values closer to the median having a higher weight. It's similar to the idea of a ...
2
votes
0answers
29 views

Need help choosing appropriate weighted average (noble cause)

We are lobbying our council to open a primary school in our area, and I'm trying to demonstrate the need. I have location information for all houses and schools in the county, I can calculate ...
1
vote
1answer
57 views

What does it mean by “approach the performance of the Bayesian gold standard”?

It is a sentence in Dropout paper(Dropout: A Simple Way to Prevent Neural Networks from Overfitting). "This can sometimes be approximated quite well for simple or small models, but we would like to ...
2
votes
2answers
52 views

Combining two means and SDs of one group [duplicate]

I have the mean & SD of several different time points, I want to combine them into one mean and SD. Is it possible? Example; At 1 hour; mean=5, SD=1, n=42 At 2 hours; mean=6, SD=3, n=42 and so ...
0
votes
0answers
25 views

How do I weigh values by their relative frequency and then get an average?

Suppose I have three values that were measured repeatedly in a study. The conditions imply that the values should be close to each other, i.e. ideally three times the same value. The measured ...
1
vote
1answer
514 views

Show posterior mean can be written as a weighted average of the prior mean and MLE

Suppose $Y_1, \dots Y_n$ are exponentially distributed: $Y_i | \lambda \sim Exp(\lambda)$. Find the conjugate prior for $\lambda$, and the corresponding posterior distribution. Show that the posterior ...
0
votes
0answers
19 views

Mean of data with different probabilities

I'm asking this question here on the suggestion of a user on StackOverflow where it was originally posted (here). During an experiment I gathered the counts of events per channel (detector). Plotting ...
0
votes
1answer
67 views

Calculating mean of continuous time series

I'm calculating the arithmetic mean of values in a continuous time series, weighted by duration. Points in the time series are not guaranteed to be evenly spaced. Example data: ...
0
votes
1answer
26 views

Comparison of means from different sample sizes

I have a data set which contains avg profit and the number of samples for each data point, no more information. I'd like to compare the data points and decide which one to focus on more. However, I'm ...
6
votes
2answers
135 views

Can an optimal weighted average ever have negative weights?

I've got a few measurements $\vec{x}$ for some real-world value $\hat{x}$. These measurements have some uncertainty, and are correlated. Given these estimates, and their covariances, I want to take ...
1
vote
1answer
57 views

Log response ratio of means not agreeing with linear mixed model output

I have a linear mixed model structured like so: Richness~Time*Treatment+(1|Site) Time has two levels (Pre and Post) as does Treatment (Treatment and Control). ...
0
votes
1answer
36 views

Can I roll-up forecasts to analyze against benchmark methods?

There's a software product (call it Main) we use to allocate parts to various locations. The way it works is it sums up the demand history of all locations to the part level. For example, if part A ...
0
votes
0answers
13 views

Weighted Standard Deviation in Excel [duplicate]

I have a dataset in excel that looks like this: ...
0
votes
0answers
23 views

Show that these two sums involving sample means are equivalent

Let $C_{ij}$ be observations with indices where $i=1, \cdots, M_j$, $j=1, \cdots, J$. That is, there are $J$ groups and each group $j$ has $M_j$ observations so that in total there are $N=\sum_{j=1}^{...
0
votes
0answers
9 views

dispersion of a sample where each item has its own error

I have a question relating the calculation of dispersion of a sample. A standard deviation is typically used, however in my situation each element in the sample has its own error prescribed (i.e. each ...
1
vote
0answers
129 views

Inverse weighted average

Is there something like an "inverse weighted average"? In my case, I have daily prices and daily units sold of a bunch of products and I would like to give prices with more units higher weights than ...
2
votes
1answer
68 views

Standard deviation of a ratio and calculation of weight

I have several "skilled" and "unskilled" wage observations for a number of countries, and would like to construct a single skilled-unskilled wage premium by country as the ratio of the simple average ...
1
vote
0answers
44 views

Standardizing Scores: Validity of Weighted Average of Percentile Ranks

All, I have a set of several test scores for a large group of students. The goal I have is to quantify each students' overall performance across each of these tests, as it relates to his or her ...
1
vote
0answers
62 views

How to weigh samples (representative of population) when comparing group means

I want to clarify my understanding of using sample weights when comparing means of sub-groups of a sample. Here is an artificial case with data that can be replicated in r (see code below): Let’s ...
4
votes
2answers
343 views

Calculate classifier accuracy from per label accuracy

I would like to have a per Label accuracy and classifier level accuracy, but my calculations seem incorrect. Here is my full example. Let's say I have a multilabel classifier which predicted in the ...
0
votes
1answer
17 views

Interpretation of sum of squares divided by sim

For the collection of numbers $S=\{x_1,x_2,...,x_n\}$ consider the term, $T_S =({\sum_{i=1}^n x_i^2})/({\sum_{i=1}^n x_i})$ where $\forall i, x_i \in [0,1]$ . Is there any specific name for this ...
0
votes
0answers
38 views

Combining both arithmetic and geometric mean in dataset with zeros and extreme values

I have a some datasets that I want to take an average of - a typical dataset might look something like this: 0 0 0 1 100 100 10000 30 10 10 0 0 0 0 0 Ordinarily ...
0
votes
1answer
40 views

How should I approach statistically?

I am conducting a meta-analysis on the therapeutic benefits of drug A - treated vs placebo. I would like to address the possibility of side effects/tolerability/likeliness of developing side effects. ...
1
vote
1answer
45 views

Estimating the mean when there is missing data

Let's say that we have one area and in this area there are designated 5 points, $a, b, c, d, e.$ For these 5 points we count the number of a specific feature. We capture the values for two different ...
1
vote
0answers
803 views

Standard error of weighted mean

I found it on wikipedia page: https://en.wikipedia.org/wiki/Weighted_arithmetic_mean Under Statistical properties section, the variance of weighted sample mean is: $$ \sigma_\bar x ^2 = \sum w_i^2\...
1
vote
0answers
79 views

Standard error for correlated measurements

I have the following problem: a measurement produces a certain value $x_i$ and I have an associated error $\Delta x_i$ for every measurement; the $i$ measurements are not independent and there are ...
0
votes
0answers
152 views

Weighted average with multiple weighing criteria

I've tried searching for a general method for calculating a weighted average with multiple weight variables, but no luck so far (almost all search results are related to Excel implementation and I don'...
16
votes
2answers
415 views

How to calculate average length of adherence to vegetarianism when we only have survey data about current vegetarians?

A random population sample was surveyed. They were asked if they eat vegetarian diet. If they answered yes, they were also asked to specify how long they’ve been eating vegetarian diet without ...
0
votes
0answers
93 views

Degree of freedom in t test involving weighted mean

Suppose I have repeated measurements of the same sample done by different people. Each person has different number of repeats. Here are the measurement data: Person #1: 2, 3, 2 Person #2: 3, 3, 6 ...
1
vote
1answer
194 views

LS estimator of linear regression as weighted average

I have to prove that LS estimator of $\beta_1$: $\hat{\beta}_1=\frac{\sum_i(Y_i-\bar{Y})(X_i-\bar{X})}{\sum_i(X_i-\bar{X})^2}$ can be expressed as some weighted average, specifically as $\frac{\sum\...
4
votes
1answer
298 views

Meta-analysis: How to find the mean age of all studies?

I understand how to find the weighted mean. However, I am wondering if it is possible to find mean overall age (for all the studies) when I have a list of means and medians for the ages (e.g., some ...
2
votes
0answers
28 views

propensity score weighting in estimating population mean

I have a survey data like, it has three covariates, age, gender and marital status: ...
1
vote
0answers
88 views

Weighting vs. regression to take into account different auxiliary characteristics of groups

I'm interested in comparing different hospitals by their performance in a number of metrics (for example waiting times). Unfortunately the patient characteristics vary between hospitals (hospitals in ...
0
votes
0answers
2k views

Formula for inverse weighted average (smaller value gets higher weight)

In Python, I have some 'VALUE' with a metric for 'WEIGHT' in a pandas DataFrame: ...
3
votes
1answer
74 views

Weighted average factor change

Let's say, we have some product in an online store, which overall rating calculates by weighted average of the following sub-ratings left by customer: ...
3
votes
1answer
1k 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
43 views

Should Average Be Weighted or Kept As Is

I am investigating the sentiment of television viewing. Armed with a matrix of sentiment scores like so. ...
0
votes
1answer
138 views

Calculate weighted mean of different sized groups with different interests

In a conference format you often try to find "the best talk" by letting the attendees vote. Of course the primary factor is the quality of the talk itself. The problem I see is that you have ...
1
vote
0answers
71 views

Comparing percentage increase of datasets with different scales

I have N different datasets and my goal is to find the dataset with the biggest percentage increase in average price over all available years (Each dataset has the same number of years). What is is ...
1
vote
1answer
79 views

Interpreting arithmetic mean in regression

Problem Suppose I have two variables: (1) heat index for each county in a state, $h_{it}$, and (2) acres in each county, $acres_{it}$. The data has 10 years and also includes a variable for the ...