Percentage problem

• Oct 9th 2010, 11:19 AM
bashtun
Percentage problem
Hey guys, this my first post here and I hope that there is someone that can help me with a problem that I came across. I'll try to explain :)

Basically I haveis one table with two rows. At one point of the table I have percentage P1 of sums of all previous values of x and y rows. At some other point I have second percentage P2, but also I know the values of x and y which made percentage increase... The problem here is to find what is the value of 1% at second point.

If we say that Sx is sum of x row, and Sy sum of y row, that percentage at some point is P=Sx/(Sx+Sy)... Just so you know what percentage am I talking about :)

Here is a picture of a table: http://img221.imageshack.us/img221/3903/percent.jpg

I hope that someone could help me with this one :) I guess that I just get lost somewhere in my calculations :)
Thanks...
• Oct 9th 2010, 12:26 PM
emakarov
Hi,

It's curious that you use the word "row" to mean "column" and "point" to mean "row"...

Please tell us if the following rephrasing is correct. You have two sequences of numbers: $x_1,\dots,x_n$ and $y_1,\dots,y_n$. Also, there is a number $k < n$. Let $X_k=x_1+\dots+x_k$, $Y_k=y_1+\dots+y_k$, $X_n=x_1+\dots+x_n$, $Y_n=y_1+\dots+y_n$. Also, let $P_1=X_k/(X_k+Y_k)$ and $P_2=X_n/(X_n+Y_n)$. Do you need to find $X_n+Y_n$, or $0.01(X_n+Y_n)$ in the end?

If so, let $X=X_n-X_k$ and $Y=Y_n-Y_k$. Then you have two equations:

$X_k/(X_k+Y_k)=P_1$
$(X_k+X)/(X_k+X+Y_k+Y)=P_2$

with two unknowns $X_k$ and $Y_k$, so the equations can be solved.
• Oct 9th 2010, 12:52 PM
bashtun
Hi emakarov, thanks for your answer :) I'm sorry for swapping row and column, about the point, I meant as a point in the time, since values are added every few seconds, as table changes all the time... Just that wasn't the issue so I didn't mentioned it :)

About the solution, funny thing is that I solved it 15mins ago... I guess that sometimes is a good thing to take a break :) You are right about the problem, and you described it very good... My solution went in a bit different way, but end result is the same, so thank you very much...

Oh, and sorry if my English is not perfect, it's not my native language :)

Thank you very much again...