You can't just add the balances and expect it to amount to the same as the spend. Consider this: you spend 0, 0, 0, 50. Your balances are 50, 50, 50, 0. Adding up the balances you get 150. What does this mean? Absolutely nothing.
Maybe 1, 1, 1 -> 49, 48, 47 is a better example though. But same thing.
I wanted to keep it simple and avoid a factorial sum. My example also shows that the remainder sum goes up even when nothing is spent.
“I am your father’s brother’s nephew’s cousin’s former roommate”
"What's that make us?"
The balance has no reason to add up to 50. So there is no extra anything. If you kept spending 1 each row, and then summed the balance at the end, it would be massively higher than the 50 you started with.
Yeah you're right
This calculation is a bit wrong.
Lets say for example you keep spending 5 after your first payment, then your totals at the bottom would be wrong and would look like this.
The correct way to do this is to accumulate the expenditure as your balance goes down, so that total for both spend and balance equals 50.
I hope this makes sense.
Summing a balance column is never correct. Take any example that doesn't end in a zero balance and it's easy to see that the balance column's sum is meaningless:
The sum of spend will always be $50.
The sum of balance doesn’t mean anything and reflects the number of transactions rather than their size.
Do the same thing again spending $1 at a time and you’ll see.
OMG I do math all the time and the way the question was phrased I fell for it. (Summing balance)
I'm going to feel dumb for the rest of the day.
Data scientist here! What you have discovered is what's known in data analytics as a semi-additive measure. Instead of summing the balance column, you would count it, and get a measure that showed how many transactions took place, but not a balance. Of course, there's no reason to simply count the one column, a row count would suffice and return the same.
add a "spend 0 / balance 50" column
There's no reason to expect that the sum of the balances remaining would be equal to the initial amount. If you spend in 1$ increments, the balances would be 49, 48, 47,... which sum to much larger than 50. If you spend 49$ followed by 1$, right away, the balances sum to 1$, which is much less than 50. This particular example has been "cooked" to give a value of 51. You can cook up another example to give whatever value you want.
Adding up the balance column doesn't make sense to do in the first place.
Am I missing something here? The numbers are different between the columns. The "extra 1" comes from the 30.
Remember in school when they made a big deal about the order of operations? This is why. It's not clear as to why, as you're not seeing the entire picture though, just some numbers.
This has nothing to do with order of operations.
Put the 50 where the word balance is, and go diagonal. 50-20=30, 30-15=15, 15-9=6, 6-6=0
No Stupid Questions
No such thing. Ask away!
!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules (interactive)
Rule 1- All posts must be legitimate questions. All post titles must include a question.
All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.
Rule 2- Your question subject cannot be illegal or NSFW material.
Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding META posts and joke questions.
Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.
On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.
If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.
Rule 7- You can't intentionally annoy, mock, or harass other members.
If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here.
Credits
Our breathtaking icon was bestowed upon us by @Cevilia!
The greatest banner of all time: by @TheOneWithTheHair!