Validate Data Mining In Tableau With A Chi-Square Test

validate validation

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

In this article we will start using statistics. Don’t worry we’ll do something simple, we’ll use the Chi-square test in a basic way. There is a special section to learn how to do statistics at an advanced level.

I’ll explain why we’re going to learn how to use the Chi-square test. The results we have with theses 2 bar charts are good. We see on theses 2 bar charts that age has a significant impact on the rate of client leaving the bank. We also see in which age groups the clients leaves the bank the most and which age groups the clients leave the bank the least. With that we have good insights.

In the A/B test « Gender », we can see that there is a correlation between the male and female sex and the choice to leave the bank. But as I said before, this A/B test is basic. The results of a basic A/B test visually shows us what is probably happenning in reality but we aren’t 100% sure of these results. To validate these results, we need do to use statistical tests like Chi-square test.

Doing a report based on basic A/B test is very risky and you can have completely false insights. I don’t advise you to do it (unless you want to leave your job). It’s for this reason that using Chi-square will help us to have strong insights.

Chi-square will allow us to know if our results are statistically significant. Our results are based on a sample of 10 000 clients and Chi-square test will tell us if these results are due to chance effects or if these results can represent all the client of the bank.

For example in our A/B test « Gender », we observed that in our sample of 10 000 clients, women are more likely to leave the bank compared to men.

tableau data mining science chi square test a/b test

Now, we aren’t sure if the results of this sample represent the behavior of all the bank’s clients.

To use basic Chi-square test, we use an online tool. Click here  .

tableau data mining science chi square test a/b test

On internet, there are plenty of websites to do a Chi-square test but we’ll use this one so that you can understand how it works. To do a Chi-square test, we need to use absolute values and in our A/B test we have percentage.

Let’s go back to Tableau. We’ll create a new tab with a version of A/B test with absolute values. In this way, we keep the A/B test with the percentages. Do a right-click on the « Gender » tab and select « Duplicate ».

tableau data mining science chi square test a/b test

Name the new tab « Gender Actual » to specify that it’s absolute values.

tableau data mining science chi square test a/b test

To have the absolute values, move « Number of Records » in « Measures » to the « Marks » area and put it over top of « SUM(Number of Records ».

tableau data mining science chi square test a/b test

tableau data mining science chi square test a/b test

Move « Number of Records » in « Measures » to « Rows » over « SUM(Number of Records ».

tableau data mining science chi square test a/b test

Cool, we have our absolute values.

tableau data mining science chi square test a/b test

We also need total absolute values, which means the total number of men and women. There is a very fast way to get that. Right-click on the vertical axis and select « Add Reference Line ».

tableau data mining science chi square test a/b test

Then in « Value », click on the drop-down on the right and select « Sum » to have the total sum of the observations.

tableau data mining science chi square test a/b test

And in « Scope », you select « Per Cell » option to specify that you want the total sums for each category, male and female.

tableau data mining science chi square test a/b test

Now, we have the total sum at the top of the bars. We will modify labels to have the absolute values. In « Label », we will change « Computation » to « Value » and click on the « OK » button.

tableau data mining science chi square test a/b test

tableau data mining science chi square test a/b test

Perfect, we have the total amount of observation at the top of each bar : 4543 women and 5457 men. We have what we need to use our online tool.

tableau data mining science chi square test a/b test

OK, I’ll explain how this tool works. « Sample1 » and « Sample2 » correspond to the independent variable « Gender ». You choose in which order you enter the data, « Sample1 » for men or the opposite. In our case, we use « Sample1 » for women and « Sample2 » for men.

« #success » corresponds to the result Y=1, which means in our case « yes, the client left the bank ».

« #trials » is the total number of observations, which means the total number of women in « Sample1 » and the total number of men « Sample2 ».

That’s how you enter the data :

  • For « Sample1 » in #success, you enter 1139 because there are 1139 women who left the bank. For « Sample1 » in #trials, you enter 4543 because there are 4543 women in total.

 

  • For « Sample2 » in #success, you enter 898 because there are 898 men who left the bank. For « Sample2 » in #trials, you enter 5457 because there are 5457 men in total.

tableau data mining science chi square test a/b test

Here is the verdict : « Sample1 is more successful ». « Sample1 » corresponds to women and #success is :« yes, the client left the bank ». This verdict means that of all the bank’s client, women are more likely to leave the bank than men. And look, there is something important, it’s « p<0.001 ». This means that the « p » is strictly less than 0.001.

tableau data mining science chi square test a/b test

« p » is the value that indicates whether an independent variable has a statistically significant effect on a dependent variable. In our case, the independent variable is « Gender » and the dependent variable is « Exited », which is : « yes, the client left the bank ». So « p » is strictly less than 0.001, which means that the independent variable « Gender » has a statistically significant effect on the dependent variable « Exited ». This shows us that out of the total number of bank’s clients, women are more likely to leave the bank than men.

This is how we use Chi-square test with this online tool. This is the same principle on all online tools that you can find on Google or DuckDuckGo . You can repeat these instructions that I gave you with other tools, you will get the same results.

It’s cool with the Chi-square we validated the A/B test and to specify that this A/B test is validated, we’ll color the tab in green.

Right-click on the tab, select « Color » and select « Green ».

tableau data mining science chi square test a/b test

tableau data mining science chi square test a/b test

Perfect, now we’ll validate another A/B test. Selects « HasCreditCard » tab.

tableau data mining science chi square test a/b test

We’re going to create an A/B test « HasCreditCard » only with absolute values. To save time, right-click on « Gender Actual » tab and select « Duplicate ».

tableau data mining science chi square test a/b test

We’ll remove the green color on the tab « Gender Actual (2) ». Right-click on the tab and select « Color » and « None ».

tableau data mining science chi square test a/b test

You rename the tab « HasCreditCard Actual ».

tableau data mining science chi square test a/b test

Move the variable « HasCrCard » over « Gender » in « Columns ».

tableau data mining science chi square test a/b test

tableau data mining science chi square test a/b test

Excellent, everything is ready to do a Chi-square test. We’ll remove « Exited » labels to better see the absolutes values. Make a click and drag out.

tableau data mining science chi square test a/b test

tableau data mining science chi square test a/b test

Perfect, let’s go back to our online tool. In this case, « Sample1 » is « no », which means client who don’t have credit card and « Sample2 » for « yes », which means clients who have a credit card.

That’s how you enter the data :

  • For « Sample1 » in #success, you enter 613 because there are 613 clients who left the bank. For « Sample1 » in #trials, you enter 2945 because there are 2945 clients who don’t have a credit card.
  • For « Sample2 » in #success, you enter 1424 because there are 1424 clients who left the bank. For « Sample2 » in #trials, you enter 7055 because there are 7055 clients who have a credit card.

tableau data mining science chi square test a/b test

Let’s look at the verdict, it’s « No significant difference ». « p » value is very high, it’s above 5%. This confirms that the independent variable « HasCrCard » has no statistically significant effect on the dependent variable « Exited ». That was the conclusion we had made when we had done the A/B test with percentages.

We had seen that there was 21% of « Exited » (clients who left the bank) in the category « no » and 20% in the category « yes ». With these results we concluded that most likely the variable « HasCrCard » had no impact on the rate of clients who left the bank. Chi-square test confirms our conclusion and we can put the tab « HasCrCard » in green to say that it’s OK.

Right-click on the tab « HasCreditCard » => « Color » => « Green ».

tableau data mining science chi square test a/b test

tableau data mining science chi square test a/b test

Excellent, now, you can do a statistical A/B test with 2 categories. Soon, we will do statistical A/B tests with more than 2 categories.

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

-Steph

Please follow, like and share:

Business Ideas From Abroad

world map drawing

I watched an Oliver Roland’s video  and I learned good stuff.

It’s very interesting to be part of a group of entrepreneurs (mastermind or other) to see what they do in your country but also internationally. Being part of a group of entrepreneurs makes it possible to share good methods/techniques.

There is an extraordinary rewarding to be part of an entreprenarial group because there are people from all over the world. It’s true that often half of the people come from English speaking countries (United States, United Kingdom, Australia, Canada ) but there are many people from different continents and that is a phenomenal force.

It’s a bit complicated when you start your company and you’re in an international business group, but it’s interesting to know what’s happening in your industry in another country. To start, you can be part of a entrepreneurs group who speak the same language as you but who live in others cities and other countries.

Once you master a foreign languange, you may be interested in seeing what is happenig in other countries.

Case study

Imagine that you have a turtle shop. You sell turtles, turtle accessories and you have a turtle blog. It’s interesting to see what happens in English speaking or Spanish speaking countries. Tu vas sur Google.com (United States verision) , Google.ca (Canada version), Google.co.uk (United Kingdom version ), Google.com.mx (Mexico version), Google.com.ar (Argentina version), Google.com.co (Colombia version). You write keywords related to your professional field and you look at websites,forums, social media. You look at what competitors are doing, but in others areas.

Language

language diffrent language foreign

Despite the incredible progress of Google Translate or other translation tools, markets are very isolated. The majority of people are interested only in their own market and their own language. This is a shame because it means that good methods will be used in one country and these good methods will be completely hallucinating and innovative for another country. And because of that, there is a loss of knowledge because there is no exchange between countries, there is no transfer of knowledge.

We entrepreneurs, we are not artists. There is no point in saying : « I’ll be the first to invent the wheel ! ». Once the wheel has been invented, it’s done and you can’t do anything. On the other hand, you can bring the wheel in your country and improve the wheel to find other use with. There is no shame in seeing good ideas in other countries and bringing them to your country. It allows you to create opportunities.

It’s true that the first interesting market to see is United States. Often this country is 4-5 years ahead of other countries in several different areas. But beware, new countries that are very dynamic have interesting innovation like Bresil (Google.com.br)  or several countries in Africa like Nigeria (https://www.google.com.ng ), Angola (https://www.google.pt ), Algeria, South Africa (https://www.googl.co.za ) and Asia like China (a tool to translate Baidu in english => http://www.baiduinenglish.com ), Singapore (https://www.google.com.sg ), South Korea (https://www.google.co.kr ).

What I want to tell you is that there is a lot to learn from other countries in the world. You need do be curious and to meet entrepreneurs from other countries with an exchange of ideas or innovations to create opportunities.

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

-Steph

Please follow, like and share:

Techniques To Learn Quickly And Efficiently Based On Science (Part 1)

learn to learn

I watched an Olivier Roland’s video  and I learned good stuff.

I discovered that there were techniques to learn quickly and effectively based on science. These are things I didn’t learn at school and I think it’s the same for you.

The concept of the school system is to teach you how to memorize and use your new knowledge « at best » in new situations. It means that the school prepares you « at best » for your life. In fact, you prepared to have the minimum in your life.

You can spend 20 years or more in school and the school never teach you to learn. In fact, you only memorize for your exams.

it’s true that school can’t do everything so if the school doesn’t teach us to learn, we’ll learn that elsewhere. Here are some simple tips and tricks to learn effectively. These are things that help you improve your ability to learn to have more success in your life.

There are several universal skills you need to train to have an excellent learning ability :

Long-term memory

Learning how to properly memorize things you need or want to learn allows you to memorize more easily and for longer. Having an elephant memory is really handy.

Working memory

Working memory is where you download the element of your long-term memory to process them.

Ability to focus

Improving your ability to focus allows you to focus on something without being distracted. This improves your productivity and allows you to truly experience the present moment.

Will

Improve your will allows you to have the strength to reach your goals without self-sabotage. For example, you make a diet and your will allows you not to eat chocolate cake or you have a workout program and your will allows you not to play video games every days.

Motivation

Learning what motivates you and keeping this flame of motivation allows you to be more motivated than 80 % of people. Motivation means having more energy, more enthusiasm and more creativity in all that you do.

Know that there is good news. You can improve all these skills with tools and method in mode 20/80 (Pareto’s law).

Case study

case study

In 2008, researchers from the University of Bern in Switzerland and the University of Michigan in the United States found something revolutionary. What they discovered is that it’s possible to significantly increase our fluid intelligence. Let’s make a comeback in the past. In 1970, psychologists Raymond Cattel and John L. Horn found a concept that accepted by the majority of psychologists. This concept is that our intelligence divided into 2 main categories : fluid intelligence and crystallized intelligence.

Fluid intelligence is our raw intellect. This means that it’s our ability to think logically and solve problems in new situations.

Crystallized intelligence is our intelligence regarding our skills our knowledge and our experience.

Before 2008, researchers thought it was impossible to improve our fluid intelligence. These researchers believed that fluid intelligence was innate and that the crystallized intelligence was tied to what we learn.

In 2008, Dr Jaeggi and a researchers team created a software designed to train working memory and tested it on 70 people divided into 4 groups.

Here the scientific study .

The groups used this software 20 minutes a day for 8 to 19 days. They passed an IQ test before training with the software and after training with the software. The results compared to 4 other groups that hadn’t used this software.

The results were extremely surprising. All the people who have used this software have had a better IQ test. Here is the detail of the test result :

  • Fluid intelligence increased on average by 40 %.

  • The increase of fluid intelligence is directly related to the time going on to train with this software. People who trained for 19 days had increased their fluid intelligence 4 times more than those who trained for 8 days.

This show us that we can train our working memory as we can train our physical strength and endurance by doing sport.

This is what this software does, it trains our working memory. We use our working memory to count, read, play chess, think and so on. We can train our working memory as a muscle.

This is the end of Part 1. In Part 2, we’ll see how to concretely improve our intelligence.

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

-Steph

Please follow, like and share:

Be Really Constant

constant

I watched an Oliver Roland’s video  and I learned good stuff.

Sometimes I subscribe to a blog or a Youtube’s channel because I find the content is interesting and bring me value. But, I don’t know why, the creator of the blog or the Youtube’s channel publishes content once a month. It’s frustrating because this creator has a talent but he’s not constant.

Being constant means doing something regularly. More precisely, it’s to do something that works regularly.

What I’ve noticed with people who have a website and use social media to promote their website is that they find something that works, that attract trafic and that’s all. They do this think that works once and they’re happy.

That is not how theses people are going to be successful over the long term. When you find something that works and attract trafic to your website, you have to do it several times. You need to be an expert in this thing that works to perfect it and use it frequently

It’s not a stroke of luck

dice role playing game

For example, you do a fighting sport. During a fight, you find a technique that works. What do you think : « Wow this technique worked, but I’m going to stop using it. I will not use this technique all my life » or « Wow, this technique worked. I will use it in each fight and perfect it to win the most fight possible all my life » ?

I think you’re like me, you want to win the most fight possible all your life but we’re a lot not to do that. I reassure you, before I was like that. When I found something that worked, everybody said : « Bravo » but in my heart I felt it was a stroke of luck and I couldn’t do it again. It was a huge mistake.

There is a really cool tool to see the number of views and subscribers of some social media (Youtube, Twitch, Instagram, Twitter). If you want to do analyzes, social blade  is interesting for that.

Case study

case study

I’ll take the example of Olivier Roland’s Youtube channel. Olivier Roland have a little more than 136,000 subscribers. When he publish a video, he has around 5 %-10 % views compared to his subscribers number (6,800 views-13,600 views).

There are many Youtubers who have more subscribers than Olivier Roland. And when they publish a video, there are 50 %-100 % view compared to their subscribers number. Beware, there 50 %-100 % views weren’t only made by subscribers. Generally on Youtube there are 40 % of views that were by subscribers.

You know that there are Youtubers with more subscribers than Olivier Roland and they make more views than Olivier Roland each time they publish a video. And these Youtubers make fewer views per month than Olivier Roland. Olivier Roland has about 450,000 views – 500,000 views.

There are Youtubers who have 150,000 – 200,000 subscribers and who easily have 50,000 views – 100,000 views when they publish a video but they have 100,000 views – 200,000 views per month. When you look at the monthly figure, you see that it makes about 1/4 of the Olivier Roland’s views.

Do also research with social blade , you’ll have surprises (that is why, now, I learn data science). Why are these monthly figures low ? This is because they don’t make enough videos and they’re not constant. Making a video per month is not enough.

Making a video per month is very bad for trafficking, it’s bad for the community (audience/subscribers). It’s impossible to retain someone and it diminishes the ability to reach more people. The result is that these Youtubers have fewer view of what they might have, It’s a spoiled talent.

All make sense. When there is little content, there is less to watch, less to share and less to critize.

Be regular

regular

Because there is not enough content, the audience (the community) is frustrated and loses interest and confidence in these Youtubers.

Attention, Youtube is just an example. It’s necessary to be constant in all fields. Being constant create something strong and powerful. Olivier Roland published more than 1000 videos and he was able to do this by being constant.

Being constant to create content regularly creates options to explore new topics for the creator. This create a habit or respect to a pat of the audience. And most importantly, create content regularly, create possibilities to be known, to be shared, to be discussed and to have a better impact in the lives of people.

Quantity VS Quality

quantity quality

Do videos published per day have the same quality as weekly video ? Honestly, it’s not possible. But when you have 7 times more videos in you Youtube channel, it has tremendously more strength and values than some 4K videos.

Sometimes a 4K video can have more impact than 10,000 video in average quality, but it’s just « one shot » as won at the Lotto. And you know that the majority of people who win the Lotto are ruined a few years later.

What about you

what about you morpheus

Yeah, what about you ? I mean, what are you doing in your life that works ? Could you do this more often so that it brings more value to yourself and to the world ?

For exemple, imagine that you like to write and you write 200 words once a week to create your book. Could you increase that to 400 words or write twice a week or write 400 words twice a week ?

Another example, you do sport once a week and it really good for you. Could you increase it twice a week ?

In the comments, I would like you to answer this question : « If you put in place a plan for you to do something that works consistently and regularly, what can it bring as happiness or as value in your life ?

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

-Steph

Please follow, like and share:

Improve Discipline

discipline

I watched an Olivier Roland’s video  and I learned good stuff.

Here is how I worked, a few year ago. I had a project that I really wanted to do and I thought to myself : « When I come back home tonight after eating, I work on it ». And after eating, I preferred to play video games or watch a TV show until sleep. I think that situation has already happened to you.

Regret is a poison

regret

Now I realize that if I had done these projects, I would have had more fulfilling lifestyle, I would have leaned to manage my money earlier and I would have interesting contacts earlier. Maybe I wouldn’t have had it all earlier but in any case a part, that’s for sure.

Discipline and productivity are important skills to create and evolve a project. I did project but these weren’t my most ambitions projects. These weren’t projects with big risks, so I dissatisfied inside of me. The problem is that all this insatisfaction transformed into frustration.

There are a lot of things I wanted to do in theory and that I never did.

As you know on my blog, I mainly talk about fitness/bodybuilding and I notice that many people enroll in a gym with a 3 months subscription and go to the gym only 2 times. This is a classic case.

Know that there is a solution because before I had very little discipline and productivity and now it’s improving more and more.

Track you progress

track progress

To have more discipline and productivity, you need to make sure that this is a long-term goal. This requires several years to have concrete results like for sport. We would like to have results right away but the best things take time because it’s an exploration in yourself.

This is not going to be Disneyland every day because there are times when you’re going to tell yourself you’re not going get there. That’s why you need to keep track of your results. It’s interesting to note why you’re less motivated to continue your project to better understand yourself. You’ll read books on personal development, follow training, meet people who have the same goal as you. With this methods you’ll build your own toolbox to improve your discipline and your productivity.

What is cool when we keep track of our results is that we can see our evolution from month to month, year by year. It’s funny to see your results 2 years ago to really realize your progress.

Increase your success

increase success

To find a way to improve my discipline and productivity, I read on internet that enrolling in a group of people who shared the same goals as me could be extremely motivating. So I looked for websites and Facebook’s groups. What is interesting in groups is that every week a person offers a challenge. Then everybody share their results and everyone shares their impressions.

It’s also possible that you find a person in your entourage who has the same goal as you. I find it really cool to put people around you into groups because the more people there are the greater the motivation.

You see, the fact of telling everyone that you are challenging, force you to be disciplined and productive to complete the project. And there were always funny punishments for people who didn’t show their project. And little by little, you improve and often you have proposals to make competitions.

I used to do this for sport at first but this concept is used in all fields such writing, photography, dancing (I like dance salsa), cooking, etc. And in all these field there are competitions several times in the year. Here is an example that astonished me, watch the paper airplane world championship .

No need to be a shaolin monk

shaolin monk

By tracking your results, you’ll find ways to boost your will without it being painful. You know, you don’t have to work to have the discipline’s level of a Shaolin monk, you just need to have a discipline’s level that allows you to make your projects a reality.

Several scientific studies have made an important discovery in order to better understand human beings. This is because the will is an element that trains as a muscle to develop. Which means that to develop your discipline, you have to train it like a muscle and it doesn’t happen overnight.

Here are resources, this article. Kelly McGonigal’s book « The Willpower instinct ». Viktor E. Frankl’s book «  Man’s search to meaning »  on attitude and discipline in the worst circumstances.

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

-Steph

Please follow, like and share:

Have A Lot Of Ideas For Articles Or Videos

ideas

I watched an Olivier Roland’s video  and I learned good stuff.

Here is an idea for having several ideas to create articles and videos. This idea is to write a book of at least 50 pages.

The concept is to share regularly with your audience your reflections and the development of your book.

While you’re writing your book, you’re going to learn new things because you really want your book to help people. It’s for this reason that you show your book’s content before your publishing it.

Maybe for you it’s something stupid because your audience can read your book’s content for free but here is the detail of the process.

Infinite source

When you’re writing a book, you’re in a research mood much more powerful and motivating than usual and your brain will look for ideas for your book constantly with information, scientific studies, case studies, etc. All this will stimulate your creativity to make articles or videos.

Share

share

Share your book’s contents as quickly as possible, allowing you to see how people react to a theme or a chapter. When you know people’s reaction, you can correct your content if you see that it doesn’t interest anyone or change the way you present or write that. There are also people who will give you additional information.

Share allows you to avoid losing 2 years of your life writing a book in your bedroom and on the day of publication, no one wants to buy it because it’s not interesting.

Now it’s up to you to choose the content’s type with which you are most comfortable, written or video version. As you know, each one has its advantages and disadvantages.

But it’s always possible to give an excerpt from your book on a theme and start doing trailer videos while waiting for the book’s publication.

Write your book

It’s really interesting to write a book at any stage of your entrepreneurial life (beginner of expert) and it’s easy to write a digital book (e-book). All word processors convert a text file into PDF and it’s really cool.

Share your book’s content regularly with you audience in a text or video format to update your book’s contents and meet the needs of your audience with a theme that interests you. In addition with this process, this will create you unexpected opportunities that will help your to grow your business.

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

-Steph

 

Please follow, like and share:

Good Use Of Book Information

book

I watched an Olivier Roland’s video  and I learned good stuff.

I bought a lot of books to learn new skills but sincerely, there is little that I have put in place concretely in my life. I took notes, made summaries but it was alwys theoretical.

Here another way to take notes. It has nothing to do with taking the maximum information from the book but rather taking as much information as possible to use it effectively in our lives as quickly as possible.

That things be clear, I don’t talk about science fiction books but practical books that teach us to have a new skill.

A pratical book allows us to take action more effectively than if we hadn’t read the book.

Of course by reading we’ll take notes but we’ll not take notes like at school. We’ll highlight actions we can put in place today in our lives.

Study Case

study case

At this momet I’m reading a book about Tai-Chi. I’m learning to meditate and for years I have been pacticing martial arts so Tai-Chi is perfect for me. Each time that I see an action that I can use today in my life, I put the infomation in highlight. I put this information in uppercase, bold, underlined or in a different color. By this way I’ll read my notes later, this information will jump to my eyes.

We can take notes to have theoretical knowledge, there is no problem.

Once we’ll finish the book when we’ll read back our notes, we can immediately see actions we can use in our lives. The concepts is to choose actions that are the simplest and the fastest to set up in our lives.

Baby step

baby step

The best strategy to start is to take only one action. This action is the most interesting and the easiest to set up in your life.

The problem that we have to use book’s information, it’s that we are too ambitious in the first step. We want realize great things in the first step so we don’t have the experience yet.

To avoid falling into this trap and be disappointed, imagine that your evolution is like baby steps. Choose an interesting and easy action to set up in your life today. It’s today that your work on it and not tomorrow or after tomorrow. By this way, you can immdiately adjust this action to improve it step by step.

What is the most ambitious action you wanted to do right after reading a book ?

-Steph

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

Smartphone apps :

To track my calories, I use MyFitnessPal 

To track my training program, I use Jefit 

Please follow, like and share: