# Help with maths calculations for basketball sim

Hi everyone, I am not the best maths person going around so I thought I would try here to ask for help! I am trying to work out how to calculate certain things based on stats of the offensive player vs the defensive player but also have some bit of randomness in it. For example: At the moment I am trying to calculate if a pass is successful based on the ints:

how easy the pass is

how good a passer they are

a Random offensive number

Vs the defenders

defensive ability

random number

All these values are out of 10 atm. I cant get the results I am after as I find altering the numbers doesnâ€™t give a radical change in outcome. Does anyone have any ideas? Am I overlooking something obvious?

Thanks for your time! Stay well!

Hello there!

I recommend you to use percentage to calculate all of this.

I mean, use numbers from 0 to 1 to calculate the final value.

This will make a initial value will decrease every time you apply a property.

``````10 * 0.98 * 0.95 *0.90 = 8.379
``````

So a pass initially have 10/10 possiblilities to sucess, you apply the player skill (0.98), the inverse defender skill (0.95) and any other thing (0.90) will result in a pass with 8.379 (meaning 8.379 of every 10 passes will suceed)

This about this, i mean to use numbers from 0 to 1 to decrease the efeectivity of a pass or anything. (you can use numbers from 0.5 to 1.1 so it can even incresae)

Bye!