
Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion 
 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! 
May 15th, 2017, 11:11 PM  #2  
Senior Member Joined: Sep 2015 From: USA Posts: 1,941 Thanks: 1008  Quote:
Quote:
Quote:
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.  
May 16th, 2017, 01:23 AM  #3 
Newbie Joined: May 2017 From: Australia Posts: 2 Thanks: 0  You mean add both numbers together then divide by 100?

May 16th, 2017, 01:34 AM  #4  
Senior Member Joined: Apr 2014 From: Glasgow Posts: 2,103 Thanks: 704 Math Focus: Physics, mathematical modelling, numerical and computational solutions  No, he means Quote:
[$\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 Last edited by Benit13; May 16th, 2017 at 01:38 AM.  
May 21st, 2017, 12:40 PM  #5 
Senior Member Joined: Oct 2013 From: New York, USA Posts: 600 Thanks: 82  

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 