Expected goals (xG) is used in football to predict how many goals a team is expected to score in a game. This is calculated using several factors and it is measured on a scale of 0-1 for each chance.
Such factors that are taken into account when giving an xG for a chance are:
Distance from goal
Angle of the shot
Strong foot, weak foot or a header
Open-play or a set piece
The shot - was it a rebound or a direct shot on target without a deflection
All of this data is put into an algorithm to give a value for each shot. The higher the value, the more likely that chance is to result in a goal.