## What is match prediction ?

When a player gives his best shot on the field , he is rewarded as the man of the match by the end of the game. And the predictioneer’s need to predict that player. These kind of predictions are very tricky and require a good research of the players in both the participating teams.

## How does this work ?

This topic will be divided into two most popular sports

• Football
• Cricket

There are different ways to predict these sports which are as follows

• ### How to Predict a Football Match ?

First things first , anyone predicting football match need to identify good enough betting opportunities. If one cannot , then it’s useless to predict a match. It is also important to have separate methodologies than others because there is a serious competition in the market.

Secondly , lets assume that you now have a method of your own to determine the result of a football match. It has found enough value too. But it finds a value bet only once in fifty games. An entire Premier League , you might just get only seven to eight bets.

• ### What to consider ?

Just when you begin to develop a methodology , keep a few things in mind.

The variables

Its the data which you are going to use to predict the match. Which is as follows –

• Goal Differential
• Possession
• Shots on Goal
• Shots on Target
• Location of Shots on Goal

The question now is will this data assist us in judging a team’s performance accurately ?

This is known as Goal Expectancy. We’ll discuss this further in the article , later.

• Data Sample Size

It is very obvious that the sample size you choose will provide you with a number of value bets. We are actually talking about how much data do we need. It is in relation to the number of matches a team has played so far. For example , you may take 20 matches a particular has played and then take the ratio of their shot on goal over the latest 10 or so matches.

But its is also important to know as to how are we placing a value on each match in our

Sample size. If we are taking each team’s goal differences in the previous 20 matches , but we could put one factor of 2 on goal differential in the previous 10 out of those 20 matches , we would make a club’s performance in the last 10.

• Collecting Football Data

There are hundreds of website over the internet for you to collect data for free or at very low costs. You also have an option for using certain softwares which would scratch data for you from desired websites.

• Tech Skills

This is also a knowledge of technicalities of prediction. The more of a techie you are , the better it is. You’ll be able to predict the game accurately and find its value .

To understand this further, we’ll continue with our previous example.

You betting methodology got seven to eight bets from throughout the Premier League. Although this is not efficient . But if you are good in the technical aptitude and your data is being updated regularly and if you are committed for the fifty football leagues around the world . You can easily score 300 football bets throughout the season.

You don’t have to be Bill Gates for this . But with every improvement you make to your data and to your skills , you’ll be able to predict matches accurately and earn good enough share from this.

• How to predict results ? Goal Expectancy?

In a layman language , goal expectancy is nothing but the number of goals we expect a team to score seeing their previous data and their potential to concede and that of their opponents. It is best to say that the more accurately one is able to predict the goal expectancy for a team , the better the value bets and higher the profits.

In a nutshell , the profit margins of any football betting methodology depends on the its ability to predict accurate scores match by match and then translate them into betting odds. This is what the Poisson Distribution is known as.

• Poisson Distribution

It calculates the probability of each score lines in a upcoming match if the goal expectancy is given. Its details need not be understood as Microsoft Excel has this feature in-built Poisson Function. Formula in Excel

=POISSON(x, mean, cumulative)

Mean = goal expectancy for an individual team

You must set cumulative to FALSE which would result in returning the probability as a random variable , take the value exactly as x.

Example

The probability that a team may score 2 goals in a match , your calculated goal expectancy is 2.127 goals

Formula

POISSON(2,2.127,FALSE)

Result would be .2696 – ie there is 26.96% probability that the team will score 2 goals in the match.

• Concerns with Poisson

First is it assumes that the goals score are independent of each other. It may be independent if we are using some random number generator but not in reference to football results and the way in which the football field interact and proceed .

Second , it may underestimate the likelihood of either one of the teams to score 0 goals. This may result as the elimination of probability of a match ending as a draw.

• Not perfect

Randomness is a major role in the game. Football predictions cannot be perfect. There will be a little difference here and there. When we are collecting data and making statistical categories , we must include a few crucial question –

It is undebatable that home ground advantage exists in every sports where in the team plays in alternating home and away stadiums. The debate is to the extent to which playing a match on a home field betters the chances of the home team to win. To what extent is the home team of the upper hand than other teams?

Some clubs may look to have high home ground advantage but this is typical variation in a limited sample size. Over the long term , all clubs have more or less the same home field advantage.

Applying this to a football predicting methodology is easy. Suppose , we have two teams. We have calculated the home team with a goal expectancy of 1.75 while the away has a goal expectancy of 1.55.

An easy way to incorporate home ground advantage is to take the average as +0.37, split it in two to return 0.185. We add this to the home team’s goal expectancy and reduce the same number from the away club =

• Home goal expectancy = 1.935
• Away goal expectancy = 1.365

Possession Data

It is actually meaningless, what is more important is the quality of the data. But it is very subjective and most of us don’t have the time and resources to evaluate.

If we take five minutes of possession on the opponent’s penalty area , it should be of the same worth as the amount of time spent passing the ball across the field. If you wish to use this , use it as a goal expectancy parameter. Using such data just because it is available doesn’t make sense. But the one which is useful is of shots.

Goal Differential

It is used to understand the strengths of the team which is most widely employed in all football statistics. It provides an indicator of a team’s overall potential.

In an inadequate sample size , goals tend to be random. Indeed , the better team beats the inferior one. But exceptions are always there. In a match on 90 minutes , the inferior one can turn the match upside down. Football has the ability to throw unexpected results.

Shots of Goal

These are fine if you are looking for a team to score but they aren’t perfect. They are not equal.

• ## How to use Shot location to Predict Football Results ?

The maths involved in the calculation of goal expectation is practically based on shot location. It is more reliable if there is a fair amount of data. The concept is easy to understand. In goal expectations models based on shot location , we would put forward three inputs to predict the chancers of an outcome.

The outcome we are looking for is obviously the goal , as opposed to a shot that strikes the post , shot saved and shot blocked or miss the goal completely.

Many things determine the probability of a successful goal attempt. The most important are –

• The perpendicular distance to the goal line in yards
• Horizontal distance from a centred vertical , in yards
• The ball being kicked or headed

Although there are millions of ways to make a football prediction , the fundamentals are same. While predicting a match , our concern is in assessing the quality of each team. We achieve this by analysing the categories that get us closest to predicting the match accurately as per the team’s and individual’s capabilities.

Any which way you wish to approach this field of foot ball forecasting , your methodology must look for value bets.

## How to Predict Cricket Match ?

Just like Football , Cricket is also very popular and unpredictable. It is played in three formats –

• Twenty Over ( T 20 ) – It is the shortest format in cricket. It has two teams playing over 20 overs with single innings.
• One Day International ( ODI ) – It has limited over, played between two international teams. It has fixed number of overs , generally 50.
• Test – Test format is the longest of all and is considered to be of the higher status. It is played between the national teams with selected best players by the International Cricket Council ( ICC ) . It is of 3 session for 2 hours each.
• Factors in Predication

It can be predicted like any other game. We just need to look for the best factors that rule the game. The result depends a lot of of more of in-game and pre-game attributes like Pitch , Team Strength , Weather , Venue , etc. and in game factors like run rate , strike rate, total etc. Discussing them below –

Pitch

A cricket stadium’s size and shape is not fixed except the measurements of the inner circle and pitch. The inner circle is 30 yards and the pitch is 22 yards. These have a substantial effect on bowling and batting. The spin of the all , the seam movement and the bounce depends on the kind of the pitch. It depends on the wetness of the pitch. The more it is , the slower it’ll be. If it is drying out , the ball spins will change. It also depends on the amount of grass on the pitch. A green pitch will have a greater amount of crease development especially if the pitch is hard. It’ll be difficult for the spinners to spin the ball. Pitches with no grass help spinners. Hard pitches will have a better bounce rate and the ball will reach the bat quickly. It gives equal chances to batsmen and bowlers.

Green pitches make the batsmen job easier. Wickets may be more dry or wet. They might break if they are soft.

If it rains , the pitch gets wet and ball bounces a lot . It is difficult for the batsmen to bat. According to the Duckworth Lewis method , the teams which first have their innings curtailed , it is easy to predict their total and it add to the runs that the first batting team did not even make. Batting first in rain affected areas is profitable.

Toss

It is sure shot advantage for the team if the other team loses the toss. It does not decide the winner of the game but the toss winning team gets to decide the first half of the game.

Team Strength

It has to be a balance of all to win a match. Leadership or Captainship of a team is also a determining factor for its victory.

Past Records

The previous performances of the team shall be considered to predict the results of a match. How did the team perform at the same venue previously , performance agaisnt the opposition etc.

If everything is well known and experienced by the team like climatic conditions , pitch and the home crowd. Home team gets motivated.

Current Performance

The current scores and overall performance of the team and as individual players also decides the winner of the match. The performance of the batting depends on the average score of batting. Run rate is the number of runs scored by the team as per the number of over bowled. But it is the for the calculation of the final score of the match.

• Using artificial Intelligence to predict the match

Python 3+ provides helpful analytics and libraries. The following steps should be followed to set an Azure environment for Jupyter notebook –

• Provision Azure HDInsight cluster with Spark link to Azure Storage blob
• Source data matches.csv link Azure Storage blob via Azure Storage explorer
• Launch Jupyter from HDInsight Cluster blade. From quick links , click Cluster Dashboards to Jupyter Notebook to enter login name and password. Click upload ( source data ) . Click Kernel as Python 3.6
• Provision Azure HDInsight cluster using Spark with linked import numpy as np # linear algebra
• Import pandas as pd # data processing , CSV file I/O ( e.g. pd.read_csv)
• From pyspark.sql.types import*
• matches.info()

We first look into the missing data along with a process called Impute.

There are hundreds of ways to look for a missing file based on presumptions.

Example

-team1 , team2 , city, toss_decision, toss_winner, venue and winner. We find missing values in columns city and winner. Both will be updated manually .

Label the teams and encode them

encode = {‘team1’: {‘MI’:1,’KKR’:2,’RCB’:3,’DC’:4,’CSK’:5,’RR’:6,’DD’:7,’GL’:8,’KXIP’:9,’SRH’:10,’RPS’:11,’KTK’:12,’PW’:13},

‘team2’: {‘MI’:1,’KKR’:2,’RCB’:3,’DC’:4,’CSK’:5,’RR’:6,’DD’:7,’GL’:8,’KXIP’:9,’SRH’:10,’RPS’:11,’KTK’:12,’PW’:13},

‘toss_winner’: {‘MI’:1,’KKR’:2,’RCB’:3,’DC’:4,’CSK’:5,’RR’:6,’DD’:7,’GL’:8,’KXIP’:9,’SRH’:10,’RPS’:11,’KTK’:12,’PW’:13},

‘winner’: {‘MI’:1,’KKR’:2,’RCB’:3,’DC’:4,’CSK’:5,’RR’:6,’DD’:7,’GL’:8,’KXIP’:9,’SRH’:10,’RPS’:11,’KTK’:12,’PW’:13,’Draw’:14}}

matches.replace(encode, inplace=True)

In the first row , team1 against team2 is 2(kkr) against 3(rcb). 3(RCB) won the toss and chose to field first. The result was (2) KKR won.

• Outcome

The toss winners tend to choose to field first. It is thought that if a team chooses to field first and then later chases for the runs , it has higher chances of winning. Use the below code to find the correlation between the toss and match winners.

import matplotlib.pyplot as plt

fig = plt.figure(figsize=(8,4))

ax1.set_xlabel(‘Team’)

ax1.set_ylabel(‘Count of toss wins’)

ax1.set_title(“toss winners”)

temp1.plot(kind=’bar’)

temp2.plot(kind = ‘bar’)

ax2.set_xlabel(‘Team’)

ax2.set_ylabel(‘count of matches won’)

ax2.set_title(“Match winners”)

There are hundreds of algorithms available to predict a cricket match. Using such methods , provided reliable and precise predictions for the match.

Why choose us for Match Prediction?

From this article , we have provided ways of precise information for the people to understand how match predictions work. We choose not to rely on only one method .We run different methods for one match predictions , providing our consumers which the closest prediction possible.