DATA INFERENCE IN PYTHON

Adegoke Adedoyin Anthonia
2 min readJul 10, 2021

As a data scientist, data analysis is quite imperative especially in the aspect of visualization. Let’s ride one, one question might spring to mind that WHY VISUALIZATION?

Basically, visualization helps in communicating clear information about something include data set to your audience especially to a layman. According to Krista Neher, ‘the human brain can process images 60,000 times faster than words’. As humans, we tend to remember images than words, for instance seeing someone for the first time, if you meet the person another time there is a very high tendency you remember the person’s face rather than his name.

In this article, I will summarize the analysis of income and spending scores of customers that visited the mall with the aid of visualization using python tools, the libraries which include pandas, matplotlib, seaborn.

The dataset consists of 200 Rows and 5 Columns using the function .shape(), of the 5 variables there are 4 numerical variables(Age, Annual income, and spending score) and gender is the only categorical variable. Also from the data information, it was seen that there is no missing value. I was able to generate the first 10 datasets using the function .head(10).

From the descriptive statistics which shows the average, minimum and maximum value, and quartile1, 2(median), and 3. Countplot shows that females are more than males i.e total no of female customers is 112 while that of the male is 88. Also, it shows 23years as the oldest among the first 10 customers.

From the regression plot it can be seen that there are both positive(which means that the actual value was more than predicted) and negative residual(over predicted values) for both age and annual income of customers

It can be deduced from the box plot that there is an outlier(a variable that is extremely far from the dataset) in the last 40 annual income of customers

Code is available in this GitHub link

https://github.com/pytoinette/AI_FUNAAB/blob/main/week_3_TASK.ipynb

--

--

Adegoke Adedoyin Anthonia
0 Followers

I am an active citizen. My hobby is to Organize