Welcome to symthic forums! We would love if you'd register!
You don't have to be expert in bit baking, everyone is more than welcome to join our community.

You are not logged in.

## Is this formula for theoretical chance to hit correct?

Hey! If this is your first visit on symthic.com, also check out our weapon damage charts.
Currently we have charts for Battlefield 3, Call of Duty: Black Ops 2, Medal of Honor: Warfighter and Call of Duty: Modern Warfare 3

Posts: 6

Date of registration
: Mar 23rd 2015

Platform: PS4

Battlelog:

Reputation modifier: 1

Wednesday, January 10th 2018, 5:17pm

### Is this formula for theoretical chance to hit correct?

Hello everyone

I recently found this post on reddit:
[BF1]Why random spread really isn't that random. : Battlefield

In the original Post there is a formula mentioned that is used to determine the hit rate. it goes:
[Percentage chance of bullet hitting the target] = ([Area of target] / (pi * [Distance to target] * TAN([Spread in degrees])^2) * 100

now just based on the assumption that the game somehow tries to resemble reality to a certain degree this formula doesnt make sense right? shouldn't it be:
[Percentage chance of bullet hitting the target] = ([Area of target] / (pi * {[Distance to target] * TAN[Spread in degrees]}^2) * 100
the OP even gave an explanation in a later post actually confirming my assumption. he said
- "A=pi*r2." and "r=d*TAN(degrees)"
=> A=pi*(d*TAN(degrees))^2 but he wrote the equivalent to A=pi*d*TAN(degrees)^2
i was just wondering cause nobody in said post mentioned that. OP proceeded to use this (worng?) formula to calculate hit chances of weapons for different ranges....

so am i just messing up completely here or did this guy make a mistake?

furtherly i found a formula for spread calculation here: BF1 Miscellaneous Info | Symthic
this formula implies that the bullets are in fact not distributed uniformly over the concerning circle's. in the formula it says that the polar coordinates are used. Hence not the x and y coordinates are picked uniformly randomly but rather an angle and a distance to the 0 point. therefore the random variable that describes the distance to the center of the possible spread circle is actually uniformly distributed over the radius of the circle. This would imply that another mistake was made in OP's calculations?

can anyone bring some light into this? was the formula mentioned maybe changed since the guy posted this?

Posts: 21

Date of registration
: Oct 31st 2017

Platform: PC

Battlelog:

Reputation modifier: 1

Thursday, January 11th 2018, 2:14am

Yes, I think your hitting chance formula is right.

And that polar coordinates formula do imply an uniform distribution in a circle.

Posts: 6

Date of registration
: Mar 23rd 2015

Platform: PS4

Battlelog:

Reputation modifier: 1

Thursday, January 11th 2018, 2:26am

### Quoted from "stopbeefing"

And that polar coordinates formula do imply an uniform distribution in a circle.

so u disagree with me on the second part? sorry if i misunderstood you but for me intuitively a 'uniform distribution over a circle (or rather circular disk)' would be a distribution in which the probability of any subset of that circle is exactly its area divided by the area of the full circle, for which the distribution of the 'distance to the middle of the circle' is of course not uniform.

PvF 2017 Champion

Posts: 7,288

Date of registration
: Apr 3rd 2012

Platform: PC

Battlelog:

Reputation modifier: 19

Thursday, January 11th 2018, 3:27am

The formula is outlined here.

What the exponent r (set to 0.5 in game) is to change rand1 so that it isn't uniform anymore.

By taking the square root of rand1 which is between 0 and 1, the result is in fact uniform distribution over the area.

A quick test is 0.9 ^ 0.5 = 0.948
Data Browser

Passive Spotting is the future!

"Skill" may indeed be the most magical of words. Chant it well enough and any desire can be yours.

Are you a scrub?

### Quoted from "blahdy"

If it flies, it dies™.

Posts: 21

Date of registration
: Oct 31st 2017

Platform: PC

Battlelog:

Reputation modifier: 1

Thursday, January 11th 2018, 6:36am

I'm not being able to give you a precise mathematical proof.
This approach just reproduce the concept of polar coordinate formula, I can't figure out how to reflect the distribution of rand1 into the density of anything.
But here is how I prove its correctness in another way:

horizontal_dispersion = rand1^a * spread * cos(rand2)
vertical_dispersion = rand1^a * spread * sin(rand2)

Now leave rand2 alone being random, notice that rand1 in both formula is generated to be the same number.

So here we get a circle with its radius depend on rand1. Its radius is calculated by:

R = (horizontal_dispersion)^2+(vertical_dispersion)^2 =2*rand1^(2a) * spread^2

Now the parameter "spread" is a constant, so basically R is proportional to¯ rand1^(2a)

Only when "a" = 0.5, R is proportional to¯¯ rand1, that means circle radius R is as uniformly distributed as rand1

This post has been edited 2 times, last edit by "stopbeefing" (Jan 11th 2018, 7:18am)

Posts: 6

Date of registration
: Mar 23rd 2015

Platform: PS4

Battlelog:

Reputation modifier: 1

Thursday, January 11th 2018, 1:00pm

### Quoted from "NoctyrneSAGA"

What the exponent r (set to 0.5 in game) is to change rand1 so that it isn't uniform anymore.

One is at a clear advantage if he can read, which i apparently wasn't able to do when i read the spread explanation (i somehow got a=1 in my mind, don't ask me why).
sorry for wasting your time with that. but thx anyway