A Pratical Tip To Validate Your Approach

data science tableau check

I have just enrolled in a Data Science course on Udemy  and I learned good stuff.

How was the A/B test « Number Of Product » ? Easy or difficult ?

Here is the result I found.

data science tableau check bar chart

I think you noticed there was something bizarre. There is an anomaly. We imagine that the more the client has products, the more the client is satisfied with the bank so this type of clients should stay in the bank.

In the first 2 bars we can see that a client who has 1 product is more likely to leave the bank than a client who has 2 products. But when a client has 3 or 4 products, we see a huge rate of clients leaving the bank.

Look, there is a little bizarre detail. In the 2nd bar, we can’t see the « Exited » label. This is because there is no place in the orange part to put the text. To make it simpler, we’ll remove the label « Exited ». Drag and drop on the « Exited » text label to the outside.

data science tableau check bar chart

data science tableau check bar chart

Perfect, we can read the percentages. On the 1st bar, we can see that among the client that have 1 products, 28% left the bank. On the 2nd bar, we can see that among clients who have 2 products, 8% left the bank. This show us that clients who have 1 products are more likely to leave the bank than clients with 2 products.

And for the next bars, we observe an anomaly. On the 3rd bar, we can see that among the clients who have 3 products, 83% left the bank. On the 4th bar, we can see that among clients who have 4 products, 100% left the bank. We clearly see that there is a problem and we need to do a deeper analysis to understand what is going on .

As a Data Scientist, we need to explain what happens in bars 3 and 4. Usually when a client has 3 or 4 banking products, that means he/she is satisfied and is loyal to the bank. But in our case, it’s the opposite because there is a high rate of client who left the bank. This is the time to do deeper analysis.

The first thing to analyze is the quality of the data. There is a very big anomaly and it may be because there is something insignificant in our data that disturbs the statistics. For example, it’s possible that when the bank selected these clients in this sample, there were very few clients with 4 products and all those clients with 4 products left the bank. Sometimes chance can create anomalies and you have to play attention to these effects of chance because they don’t seem important but they can create false interpretations.

To start, we will check the number of clients with 4 products.

In « Measure », move « Number Of Records » (which gives the number of observations) on « Label ».

data science tableau check bar chart

data science tableau check bar chart

We observe on the first 2 bars than many clients with 1 or 2 products selected for our sample. For clients with 3 or 4 products, we can see that there were fewer clients selected for our sample.

There are 220 clients with 3 products and 60 clients with 4 products. These small number of clients probably explain why we observe these anomalies.

In this sample of randomly selected clients, there are very few clients with 4 products and they all left the bank. In this situation, we can confirm that it’s a chance. When thing like that happen, you have to be very careful not to make conclusion too fast and make misinterpretations.

The conclusion is that a lot of clients have been selected for category 1 and 2. For category 3 and 4, there have been few clients selected so we can’t do accurate statistics. We need to do deeper analyze for these categories of clients with 3 and 4 products.

Now, let’s put the percentage back on the bar chart. Click on the « Back » button.

.

data science tableau check bar chart

Or do a click and drag of « SUM(Number of Record) » to outside.

data science tableau check bar chart

data science tableau check bar chart

We saw that there is an anomaly and what is interesting to do is to have a comment to remember to do a more in-depth analysis of columns 3 and 4.

Right-click between the bar chart’s title and the bars. Select « Annotate » then « Areas… ».

data science tableau check bar chart

A window appears. In this window, you write « Low observation in last 2 categories » and click on the « OK » button.

data science tableau check bar chart

data science tableau check bar chart

Click on the comment and move it on bars 3 and 4.

data science tableau check bar chart

data science tableau check bar chart

The next time you work on this bar chart, you will see this comment that will remind you to seriously analyze client who have 3 and 4 products.

Validate our approach

It’s time to show you how to validate an approach and how to validate the data. For this we will create a new A/B test.

Duplicate this worksheet with a right-click on the « NumberOfProducts » tab and select « Duplicate ».

data science tableau check bar chart

And rename the tab « Validation ».

data science tableau check bar chart

For this tab, we will erase the comment. Select the comment and press the « Delete » button on your keyboard.

data science tableau check bar chart

data science tableau check bar chart

Everything is ready, the idea is to find a variable that doesn’t affect our results. That is a variable that has no impact on a client’s decision to leave or stay in the bank.

Take for example, the variable « Customer Id ». Client’s identification number has no influence on the client’s decision to stay or leave the bank.

We’ll do an A/B test with the last digit of the « Customer Id » and we’ill check that there is the same clients proportion who leave the bank in the 10 categories of the last digit of the « Customer Id ». The 10 categories are the numbers 0,1,2,3,4,5,6,7,8,9.

Let’s g.To start, we will create the variable that contains the last digit of the « Customer Id ». To have this variable, we will create a « Calculated Field ».

Right-click on « Customer Id », select « Create » and click on « Calculated Field ».

data science tableau check bar chart

data science tableau check bar chart

Name the calculated field « LastDigitOfCustID ». In the text field, we use the « RIGHT » function with « Customer Id » in parenthesis to select the last character of the « Customer Id ». In our case, the last character of the « Customer Id » is the last digit.

Here is the code to write in the text field : Right ({Customer Id},1)

data science tableau check bar chart

data science tableau check bar chart

Oooops, you see there is a small mistake => The calculation contains errors.

There is an error in the formula because « Customer Id » is a number variable and the « RIGHT » function applies to a variable of type « STRING ».

To use the « RIGHT » function, we will convert « Customer Id » into a string. We will use the « STR » function with « Customer Id » in parenthesis.

Here is the code to write in the text field

And click on the « OK » button : Right (STR({Customer Id}),1).

data science tableau check bar chart

Now, you can see that our calculated field « LastDigitOfCustID » is in « Dimensions ».

Click on « LastDigitOfCustID » and move it on top of « NumOfProducts » in « Columns ».

data science tableau check bar chart

data science tableau check bar chart

Now we have a new bar chart and we see that for every last digit of the « Customer Id » there is about the same proportion of clients leaving the bank. All these proportions don’t correspond exactly to the average of 20% but these slight variations aren’t important.

Seeing this uniform distribution allows us to validate our data because these data are homogenous.

Conculsion

Here’s how you can check the homogeneity of your data. You take a variable that has no impact on the fact that a client leaves or stays in the bank. The example we did with the last digit of the « Customer Id » is excellent. We were able to verify that in each of the categories taken by this variable, if there was the same proportion of clients leaving the bank. As is the case, we can validate our data.

Imagine another result. When we do the test with the last digit of the « Customer Id », we observe that for one of the numbers, the rate of clients who left is really higher than the average. This shows us that there is a problem in our data because it indicates an anomaly.

You can find other ways to verify your data by using other « insignificant variables » to see if the distribution is homogeneous. But be careful when you select an « insignificant variable » because there may be traps.

Here is an example. If you create a variable that takes the first letter of the first name, the distribution will not be homogeneous. The reason is simple, there are many more people who have a name that starts with the letter « M » than with the letter « Y ».

Share this article if you think it can help someone you know. Thank you.

-Steph

Do The Inevitable

inevitable

As Agent Smith says in the movie « Matrix » : « Do you hear that Mr. Anderson ? That is the sound of inevitability ».

When a character from a movie ou comic says it, it’s impressive but it’s more than that.

Inevitability can manage our lives and become a self-fulfilling prophecy :

  • Person a

    Well, I will become fat and have blood pressure problems like my father. I will have a family and I will become like him. Not suprising that I fail everything.

  • Person b

    Well, I will break this circle. My children will be the first of the family to have healthy a healthy father. Children with parents who have healthy habits. This is what will happen.

  • Person A

    I will not succeed to lose weight like I did a lot of time. I can’t win against my genetics. Why continue ?

  • Person B

    I will be healthy. It’s a long journey and I will have difficult obstacles but it’s to me to take my success. I know that it will be long and I go forward step by step. I will go where I want to go.

If you look like Person a and A, it’s the moment to take the first steps to become like Person b and B.

Inevitability

agent smith matrix inevitability

I remember in what state I was when I read for the first time « 4 hours workweek of Tim Ferriss.

I ask to myself for several weeks if it was possible to live this. I was doing a lot of research on internet to find evidence. After all this evidence, I said to myself : « If people can do it, I can do it ». I don’t know how but I will test the indications of the book.

After creating several blogs and websites, I created my blog THEstephaneANDRE.

After few months, I watched a Gary Vaynerchuk’s video  that proposed rather than to create content, document ma days about my training and my blog. Like a reality show. This concept make me change my mindset to reach my goals. I have more success and I start to have the mindset « positive inevitability ».

Relation with yourself

relation love yourseff

Paolo Coelho said in this book « The Alchemist » : « When you want something, all the universe conspires in helping you to achieve it ».

You will tell me that you know this kind of story and I need a vision board, the book « The Secret » and wait that others people help me.

Ok,ok, remove the vision board and the book and ask yourself this question :

Are you the kind of person who look bad things go bad or wait that bad things go bad to say : « I told you ! ». Or you’re the kind of person who assume that things are going well and take step to make them better ?

Whatever you believe, it’s true. We know that pessimitic people always seem to have bad luck and optimistic people always seem to have good luck.

You work for the inevitability you want

We know what we want and we know we need to work hard to have it, so we do it. While other wait for luck to come to them, we create our own chance.

Winston Churchill say : « Success consists of going from failure to failure without loss of enthusiasm ».

Each fail is an element that can slow us down to this inevitable success. Like scientists have wrong hypotheses, each fail is a chance to get closer to the goal. No reason to give up.

We expect to win. We hope to succeed. Break obstacles to prove that this possibility is correct. We have a responiblity to our inevitability.

Prove it to yourself

prove it

I just understood that « expect to win » or « feel more positive about yourself » is the half of the equation.

Wait that good luck or bad luck come to me is the same result : nothing !

As say Andy in the movie « The Shawshank Redemption » : « Hope is nothing without action ».

In the book « Unbroken », Louis Zamperini endured incredible obstacles and he never gave up hope. He always did what he could to prove that he was fighting nonstop for a good reason.

The best way to prove to yourself that your success is inevitable, it’s to do small victories :

  • You want a better health ?

    Proves to yourself that you can change by walking for 5 minutes during 30 days nonstop.

  • You want have a company ?

    Earn 1$ or help a person. Then hustle and scale.

  • You want run a marathon ?

    Run for 1 minutes. Then, find a way to run more than the day before.

Identify the version of yourself at the level 50 and go forward step by step in this direction.

Make a change and it doesn’t matter if it’s small. By adding all these changes and each small victories, this future become more and more concrete.

Expect the inevitable

It doesn’t matter if you try to lose weight, run a marathon or gain muscle, stop to wait things go bad and start to expect things go good.

You know what you need to do and everydays you do a little step to be closer to your goal.

You deserve it, you deserve to be happy, you deserve to be healthy.

Each day is a chance to be closer to your success or a chance to simply delay your success.

Did you have to prove a win to yourself before you started to believe ?

-Steph

P.S. Do you want a free training program ? Click here 

Upgrade Your Life

upgrade your life

I read an Nerd Fitness article  and there is good stuff.

I play video games since I can use a controller and I was always excited to know :

  • What is there in this castle ?

  • What is there behind this door ?

  • What is there in this way ?

This possibility to explore, improve skills and have harder challenges everytime gave me more desire to play. There was always a new bad guy to beat, a new place to expore ou a new weapon.

Is it possible to use video games principles to improve lifestyle ? Let’s see.

Blocked

Here an Onion’s article . « Alarming New Adult Trend – Plateauing In Your Career And Relationship – Sweeps Nation ».

With this passage :

It’s called « plateauing in your career and relationship », and it involves adult men and women hitting a wall in their professional and romantic lives and doing absolutely nothing to reinvigorate them, an activity that researchers at University of Chicago’s Department of Comparative Human Development warn may be, while popular, highly dangerous and unhealthy.

Sources confirmed that plateauing in your career and relationship is merely the latest fad to grip adults in recent years, following on the heels of popular trends such as giving up on your dream of writing a novel, having kids because it’s a box to check, and gradually feeling alienated in your own body after steady weight gain.

OK,OK, stay calm, stay calm. Me too, I thought : « But it’s my life ! ». So if we reach this plateau, ours lives are adrift and I was this guy !.

Gaming

push start mario yoshi

What video games have to be so addictive ? Video games pay my attention for 3 reasons :

  • A chance to live vicariously through a tough guy

  • A constant source of improvement and rewards

  • A chance to interact with people of minds

I like Legend of Zelda because I can see myself like Link, a little boy with a wood sword who explore a big scary world to save a princess (sometimes the princess don’t need to be saved). There is always something to find or a place to discover.

All these video games like Chrono Trigger, Final Fantasy, GTA gave me a lot of entertainment but they gave me something else, something I didn’t know.

Run away

  • Run away a new school’s day because there is no challenge, this isn’t interesting and there is no progress.

  • Run away a new job’s day that wasn’t interesting and didn’t match with my skills.

  • Run away a new day of my life that wasn’t excited like the life of video games characters.

We all do it with a book, a movie or something else and it’s cool to run away and live the life of sombody else. We all want a chance to do something that doesn’t exist in the real life. it’s fun to live a life in a fantasy world to relax after a long day. This isn’t bad except if this make us forget to upgrade ours lifestyle. Have a job just to pay rent and eat, an unfulfilling relationship and don’t be excited to do an activity outside of a screen, it’s like to be plugged to the Matrix. Did you watch the movie ?

Since I realized the Matrix, I adjusted my vision about books, movies and video games. Instead to use them to run away to my life, I use them like inspiration to improve my mindset.

Be excited to be better

In gamers community, there is a section like : « Who can best this game faster ? ». Beat Super Mario Bros in less of 5 minutes ou Legend of Zelda Ocarina of Time in less of 20 minutes. Those games train to beat the game as fast as possible. They’re felt in love with the concept of be better or be the best.

Now, how to do in the real life ? Identify a skill that you like to do and you like to improve. Think about this skill with which you like challenge yourself, this skill who make you feel alive and work to improve this skill.

For me, it’s bodybuilding and I have some challenge like :

  • Can I run faster ?

  • Can I be stronger ?

  • Can I be more agile ?

If it’s a fail, instead to say to myself I’m not able to do this. I say to myself this fail isn’t crucial to be successful. Learn from failure is what allows you to succeed. Exaclty like in a video game when you push restart.

Find a skill and challenge yourself to improve it.

Everydays

everydays make things happen

A quest to improve your lifestyle to infinity. Here the list of my challenges. I must do at less one per day. If I do more, it’s BOOOM :

  • Find my main quest

  • Learn the basics of strenght training

  • Try a new exercice

  • Improve my social skills

  • Master my habits

  • Save some money for an adventure (travel)

  • Learn a recipe

In the real life :

  • Do I lift more weight at the gym ?

  • Do I do one more set ?

  • Do I help anyone to improve its life ?

  • Do I save some money for my next adventure ?

  • Do I reach the job I want ?

  • Do I improve my job ?

Are you improve our lifestyle this year ?

-Steph

P.S : Do you want a free training program ? Click here.