+0  
 
0
511
3
avatar

For Example:

 

Say I have 10 items each having a value or worth to it.

 

Square = 5

Rectangle = 5

Pentagon= 10

Hexagon = 15

Stop sign = 15

Heptagon = 20

Octogon =  25

Nonagon = 30

Decagon = 40

Circle = 60

 

How would I calculate the chance of each item based on it's value, with the chance ranging from 1% to 10%?

 

I need this equation for a piece of code I'm writing where the maximum vaue is 4,000,000 and the minimum value is 0.

But when I use my equation, all the chances are blown out of proportion.

 Jan 16, 2016
edited by Guest  Jan 16, 2016
 #1
avatar
0

The lowest values (5)  will be 1%  per your description.

The highest valeu (60 ) will be 10% per your description

Interprolate to find the others

 

5    10   15........................... 60    Unit value

1.....?      ?  ..........................10   percent

 

Example for '10'

 

(60 -5) / (10-1)  =   ( 60 -10)/(10-?)

55/9 = 50/(10-?)

10-? = 50 (9/55)  = 8.181818

10 - 8.181818 = ? = 1.8181 %

 

Example for '15'

(60-5)/(10-1) = (60-15)/(10-?)

results in ? = 2.6363 %  for 15         etc etc   

 Jan 16, 2016
 #2
avatar
0

Say I have 10 items each having a value or worth to it.

 

Square = 5=1

Rectangle = 5=1

Pentagon= 10/5=2/1.2=1 2/3

Hexagon = 15/5=3/1.2=2.5

Stop sign = 15/5=3/1.2=2.5

Heptagon = 20/5=4/1.2=3 1/3

Octogon =  25/5=5/1.2=4 1/6

Nonagon = 30/5=6/1.2=5

Decagon = 40/5=8/1.2=6 2/3

Circle = 60/5=12/1.2=10

 

This is what I would do. I would use proportionality to set the percentages up as follows: Since you want the scale of: 10:1, but you have the ratio of: 60:5. Since 60/5=12, which is: 12/10=1.2 too high. So, you reduce every ratio by dividing by 1.2. Look at what I have done above. Hope this will get you on the right track.

 Jan 16, 2016
 #3
avatar
0

Guest 2 is an approximation, but not exact.  The interprolation method is better if you need exact values.

 Jan 16, 2016

2 Online Users