## Building a machine learning model for marketing

This blog is in continuation with the AI Driven Marketing 101 Series — Part 1 where we looked at the basics of Artificial Intelligence and Machine Learning.

We also listed down some interesting use cases in AI powered Marketing.

### Building the Model — Statistics Basics

“Data is the new Oil and Artificial Intelligence is the new Electricity”

This is a powerful phrase which defines the data economy. Statistics is the study of data and, in the data economy, it becomes a critical skill to harness. In an indication of the shifting tides, Microsoft recently announced Excel 2019 would support machine learning tools.

### Understanding a “Variable” and the basic “Data Types”

**To understand statistics, we need to understand the basic building concepts.**

The basic way to handle a data is with a “variable”. Just as the cell is the basis of the lowest form of structure in human biology, in statistics we talk of a “variable” as the basic form to store data.

For example, sales volume and customer satisfaction are two types of variables which store different types of data.

There are two main types of data: Scale / Numerical and Categorical. Sales volume is numerical and customer satisfaction is categorical. Understanding different types of data helps in choosing the different types of techniques that may be used to get insights from the data.

● For **numerical** **data**, this represents some quantifiable thing that you can *measure*. This can be *discrete*, which is normally the counts of some event.[1]For example, the number of articles of clothing a customer buys on an e-commerce platform. Numerical data can also be *continuous*. A characteristic of continuous data is that the range can be infinite. For example: rainfall in a region over a given year and so on

● With **categorical** **data**, there is no inherent numerical meaning. Generally, numbers are assigned to these values but the numbers themselves don’t mean anything

For more details, read this article: Basics Of Statistics For Machine Learning Engineers

### Independent and Dependent Variables

The relationship between variables can be modeled on the concept of independent and dependent variables. For example, sales revenue is a “dependent” variable, which is dependent on a number of “independent” variables, including your product, price and promotion.

To create a model, the output is the dependent variable and the input is the various independent variables. A statistical analysis is then applied to the model and the result of the optimal value of the dependent variables (in this case the sales revenue).

During the creation of a model, some critical decisions that a marketing professional needs to take and inform the data scientist about are the dependent and independent variables that need to be considered in a model. A choice of the right statistical analysis is then made.

For more details on you can read the following Dependent Variable vs. Independent Variable in Marketing

### Seven Types of Statistical Analysis

The two main types of statistical analysis and methodologies are descriptive and inferential. However, there are other types that also deal with many aspects of data including data collection, prediction, and planning.

For example, you have an existing model which consists of the sales transaction for a product over a month that you want to analyze.

● **Descriptive Statistical Analysis** — describes the basic features of information and shows or summarizes data in a rational way. Central Tendency ( mean, median, mode), variances, skewness etc. are all examples of descriptive statistics

● **Inferential Statistical Analysis **— descriptive statistics *only* allow you to make summations about the objects or people that you have measured. However inferential statistics allow you to infer trends about a larger *population* based on *samples* of “subjects” taken from it.

### Other analysis types include:

**Predictive Analytics **uses statistical algorithms and machine learning techniques to define the likelihood of future results, behavior, and trends based on both new and historical data.

**Prescriptive analytics** examines data to answer the question “What should be done?” It is a common area of business analysis dedicated to identifying the best move or action for a specific situation.

**Causal Analysis** — This type of analysis answer the question “Why?”.

**Exploratory Data Analysis** — EDA is an analysis approach that focuses on identifying general patterns in the data to find previously unknown relationships. It is complemented with inferential statistics.

**Mechanistic** **Analysis** — Mechanistic Analysis is a not common type of statistical analysis examines the exact changes in given variables that lead to changes in other variables.

For more details, you can read up on The Key Types of Statistical Analysis .

### Conclusion

For marketing professionals, understanding how and when to use AI technology will play an increasingly significant role in their field, now and in to the future.

“80 percent of all marketing executives predict artificial intelligence will revolutionize marketing by 2020”

In this blog, we have attempted to cover the basics of AI. Next we will deep dive into each of the AI Marketing Use Cases in our continued series on AI -101 for Marketing Professionals. Stay tuned.