0

Currently i did some work with a data set within Java script. I need help writing an equation for some math. Lets say there is List of devices, lets call them X, X1, X2, X3, and so on. Each X has a community(500+) of values assigned to it. lets call those y. To get my ending result I added up all values(y) assigned to X and then divided that by the total number of Y values assigned to ALL x values.

How would this be written in equation form? I appreciate any help!

1 Answers1

0

Let the values for $X$ be $X_i$, so they are indexed by $i$, and there be $n$ of them. Then the sum of all the values would be $S(X)=\sum_{i=1}^nX_i$. You could give $S(X)$ a different name if you want. Your final value is then $$\frac {S(X)}{S(X)+S(X1)+S(X2)+S(X3)}$$

Ross Millikan
  • 374,822
  • Thanks for the response but I have a question. If each end value per device is calculated by the sum of all values assigned to that device divided by the total sum of values for all devices wouldn't the first equation be the sum of values per device? – mister.cake Oct 18 '19 at 15:02
  • Yes, that is what I understood you wanted to do. You said you wanted to add up all the values assigned to $X$. – Ross Millikan Oct 18 '19 at 16:05