My Math Forum  

Go Back   My Math Forum > High School Math Forum > Elementary Math

Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion


Thanks Tree1Thanks
  • 1 Post By Benit13
Reply
 
LinkBack Thread Tools Display Modes
May 15th, 2017, 10:35 PM   #1
Newbie
 
Joined: May 2017
From: Australia

Posts: 2
Thanks: 0

Trying to find the percentage of 2 numbers

Sorry I'm extremely bad at maths and I'm unsure where to place this haha.

Blue = 90
Red = 10
90% (the percentage increases the higher blue gets over red)

Blue = 10
Red = 90
10% (the percentage decreases the higher red gets over blue)

Blue = 960
Red = 480
75% (Blue is higher, I can do this equation in my head I THINK haha, but I want a way I can get it through equations?)

Blue = 45353
Red = 45353
50%

Blue = 453
Red = 0
100%

Blue = 0
Red = 5432
0%


I am attempting to do this with coding and was wondering if (hopefully) there is a way to find the percentage using easy arithmetic?

I really appreciate any help, this will help me so much if someone knows how to do this!
PyuaNaoko is offline  
 
May 15th, 2017, 11:11 PM   #2
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: CA

Posts: 1,264
Thanks: 650

Quote:
Originally Posted by PyuaNaoko View Post
Sorry I'm extremely bad at maths and I'm unsure where to place this haha.

Blue = 90
Red = 10
90% (the percentage increases the higher blue gets over red)

Blue = 10
Red = 90
10% (the percentage decreases the higher red gets over blue)
both above correct

Quote:
Blue = 960
Red = 480
75% (Blue is higher, I can do this equation in my head I THINK haha, but I want a way I can get it through equations?)
this one is wrong. it's 67.7%

Quote:
Blue = 45353
Red = 45353
50%

Blue = 453
Red = 0
100%

Blue = 0
Red = 5432
0%
these are all correct

I don't know what you're using to code with but I'd write a function that takes a list of values, sums that list, then returns the list divided by the sum times 100.
romsek is offline  
May 16th, 2017, 01:23 AM   #3
Newbie
 
Joined: May 2017
From: Australia

Posts: 2
Thanks: 0

Quote:
Originally Posted by romsek View Post
both above correct



this one is wrong. it's 67.7%



these are all correct

I don't know what you're using to code with but I'd write a function that takes a list of values, sums that list, then returns the list divided by the sum times 100.
You mean add both numbers together then divide by 100?
PyuaNaoko is offline  
May 16th, 2017, 01:34 AM   #4
Senior Member
 
Joined: Apr 2014
From: Glasgow

Posts: 2,018
Thanks: 665

Math Focus: Physics, mathematical modelling, numerical and computational solutions
Quote:
Originally Posted by PyuaNaoko View Post
You mean add both numbers together then divide by 100?
No, he means

Quote:
write a function that takes a list of values, sums that list, then returns the list divided by the sum times 100.
Let's put your red and blue values in a list...

[$\displaystyle 960, 480$]

Now sum the items in that list...

$\displaystyle 960 + 480 = 1440$

Then return the list divided by the sum times 100.

First item in the list: $\displaystyle (960/1440)*100 = 66.\dot{6}$
Second item in the list: $\displaystyle (480/1440)*100 = 33.\dot{3}$

The new list is [ $\displaystyle 66.\dot{6}, 33.\dot{3}$]

So basically, using fractions, 2/3 of your total is "blue" and 1/3 is "red".

The instructions that Romsek gave will allow you to calculate, for any number of values, the percentage contributions those numbers give in the list to the total.

Just so you know, there's a name for this process... it's called "Normalization". The resulting list is called a "normalized distribution". It's often used in data analysis and statistics. In your example problems you are normalising a discrete distribution and there's mathematics for doing the same thing with continuous distributions too
Thanks from romsek

Last edited by Benit13; May 16th, 2017 at 01:38 AM.
Benit13 is offline  
May 21st, 2017, 12:40 PM   #5
Senior Member
 
Joined: Oct 2013
From: New York, USA

Posts: 529
Thanks: 75

Quote:
Originally Posted by romsek View Post
this one is wrong. it's 67.7%
I think you know the answer and made a typo. It's 66.7% when rounded.
EvanJ is offline  
Reply

  My Math Forum > High School Math Forum > Elementary Math

Tags
find, numbers, percentage



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find the percentage wallywizard Elementary Math 4 August 3rd, 2016 10:46 PM
What percentage of real numbers are transcendental? mick7 Elementary Math 6 August 21st, 2015 09:18 PM
Find Percentage Correct loach Elementary Math 5 September 6th, 2014 04:33 PM
Find constant percentage OrangeLightning Elementary Math 6 April 23rd, 2013 02:14 PM
how to find percentage? Zshan96 Elementary Math 3 September 6th, 2012 06:18 PM





Copyright © 2017 My Math Forum. All rights reserved.