To calculate variance and CV from multiple (weighted) variables

In summary, the conversation discusses the calculation of weighted sum of variables in order to determine the variance and coefficient of variation (CV) of measured values in the network traffic field. The process involves obtaining mean and variance values over a period of time and using equations (1) and (2) to determine the mean and variance of the weighted sum. The CV can then be calculated using equation (3). The speaker is seeking feedback or suggestions for additional sources for references.
  • #1
sumetp
1
0
Hello everybody,

My name is Sumet. I am studying in network traffic field. My background in statistic is not so strong; however, I have to calculate weighted sum of variables in order to determine variance and coefficient of variation (CV) of measured values. Please see the following descriptions. Any comments or suggestions for solution or suggestions for additional sources for references are very appreciated. Thank you.

Let Xi is a random variable of the measured value of something at the ith second. And Wi=Ni/[tex]\sum[/tex]Ni, where Ni is the number of values obtain from measurement in the ith second.

Among Ni values, E[Xi] and var[Xi] are mean and variance of Xi (calculated and recorded in the ith second), respectively.

Over time T seconds, we obtain E[X1], E[X2],... ,E[XT], Var[X1], Var[X2], ..., and Var[XT].

Next, weighted sum of variables, [tex]\sum[/tex]WiXi, will be focused. It is clear that mean (over time T) of mean of Xi can be determined from

E[[tex]\sum[/tex]WiXi]=[tex]\sum[/tex](WiE[Xi]), for all i=1,2,3,...,T. ------------ (1)​

But, in many references, there is no clear description for determination of variance (over time T) of mean of Xi; they just say that

Var[aX+bY] = a2Var[X] + b2Var[Y] + 2abCov(X,Y).​

The followings are my understanding which I am not sure if it is correct. By the same manner as the above equation, the variance (over time T) of mean of Xi can be determined from

Var[[tex]\sum[/tex]WiXi] = [tex]\sum[/tex]Wi2Var[Xi] + Some_Covariance_Terms, for all i=1,2,3,...,T.​

If Xi is statistical independent for each second, the terms Some_Covariance_Terms will be 0 and the equation becomes

Var[[tex]\sum[/tex]WiXi] = [tex]\sum[/tex]Wi2Var[Xi], for all i=1,2,3,...,T. ------------ (2)​

And then CV can be calculated from the obtained mean from (1) and square root of the obtained variance from (2).
 
Last edited:
Physics news on Phys.org
  • #2
CV = \sqrt(Var[\sumWiXi])/E[\sumWiXi]. ------------ (3)Is my understanding correct? Any comments or suggestions for solution or suggestions for additional sources for references are very appreciated. Thank you.
 

1. Can you explain the concept of variance and coefficient of variation (CV)?

Variance is a measure of how spread out a set of data points are from the average. It is calculated by taking the sum of the squared differences between each data point and the mean, and then dividing by the number of data points. Coefficient of variation (CV) is the ratio of the standard deviation to the mean, and is used to compare the variability of data sets with different units of measurement.

2. How do you calculate variance and CV from multiple variables?

In order to calculate variance and CV from multiple variables, you first need to calculate the mean and standard deviation of each individual variable. Then, you can use the following formulas to calculate the overall variance and CV:

Variance = ∑w(x-μ)^2 / ∑w

CV = (σ/μ) x 100%

Where w is the weight of each variable, x is the value of the variable, μ is the mean, and σ is the standard deviation.

3. Can you provide an example of calculating variance and CV from multiple variables?

Sure, let's say we have three variables with the following values and weights:

Variable 1: Values = 5, 10, 15; Weights = 2, 3, 5

Variable 2: Values = 20, 30, 40; Weights = 4, 6, 8

Variable 3: Values = 50, 60, 70; Weights = 6, 9, 12

First, we calculate the mean and standard deviation for each variable:

Variable 1: Mean = 10; Standard deviation = 4.08

Variable 2: Mean = 30; Standard deviation = 8.16

Variable 3: Mean = 60; Standard deviation = 8.16

Using the formulas mentioned in the previous question, we can calculate the overall variance and CV:

Variance = ((2 x (5-10)^2) + (3 x (10-10)^2) + (5 x (15-10)^2) + (4 x (20-30)^2) + (6 x (30-30)^2) + (8 x (40-30)^2) + (6 x (50-60)^2) + (9 x (60-60)^2) + (12 x (70-60)^2)) / (2+3+5+4+6+8+6+9+12) = 95

CV = (8.16/33.33) x 100% = 24.48%

4. How do you handle weighted variables when calculating variance and CV?

Weighted variables can be handled by using the weighted mean and weighted standard deviation in the formulas mentioned earlier. This ensures that the variability of each variable is taken into account when calculating the overall variance and CV.

5. Can you use the same approach to calculate variance and CV from non-weighted variables?

Yes, the formulas for calculating variance and CV can be used for both weighted and non-weighted variables. However, if the variables are not weighted, the weights in the formulas will be equal to 1, and the resulting variance and CV will be equal to the regular variance and CV.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
833
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
842
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
813
Back
Top